Difference between SharePoint list and Document library

This SharePoint tutorial explains the difference between the SharePoint list and document libraries.

Once you start with concepts like list and document library, this question comes to mind first, what is the difference between a list and a document library? Where should I use the list and where should we go to a document library?

Well, rather than thinking of a straightforward answer, we should understand what is a list and what is document libraries in SharePoint? And a few differences between lists and libraries.

Difference between SharePoint list and Document library

A SharePoint list is like a table in SQL server database or an excel spreadsheet that will have columns or fields or properties. A list also can contain one or more attachments or files.

On the other hand, SharePoint libraries are special types of lists that are created to store documents. Each file in a SharePoint document library is like one item. It also has columns or fields or properties.

Document library has check-in and check-out features but the list does not have in SharePoint. A document library can have a major version and minor versions but List will have major versions only.

Without a document, you can not create an item in a document library but in the list, you can, the list can contain additionally attachments. Similarly, you can not have document sets in the list whereas you can have in a document library.

Files are handled a little differently by the search. When a user searches for a keyword in a document, if the document is in a library, they find the document listed in the search results. But when the document is a list attachment, the search returns the list item. The user would then need to click the list item and then click on the attachments.

SharePoint also provides various libraries for specific proposes like picture library, form library etc.

Mostly SharePoint represents structural data where our library we use to store unstructured data.

List and libraries are almost the same, both have few common functionalities like both can contain documents, both can have columns, versioning, views, etc. While choosing you should choose based on the type of information you are working with, which one is important for your business requirement?

For example for a training institute, if you want to keep track of your students then you should choose a SharePoint list and on the other hand, if you want to keep or share training related documents then you should go for a document library.

Some Points on document library in SharePoint:

Whenever you will create a document library SharePoint creates a folder with the same name as the document library at the root of the website.

Then it creates another folder with name Forms. And SharePoint creates a set of site pages like below inside the Forms folder:

  • DispForm.aspx
  • EditForm.aspx
  • AllItems.aspx
  • Upload.aspx

These pages are required to add and manage content for that document library.

This site pages can be accessed using the SharePoint object model using the SPFile class like below:

SPWeb site = SPContext.Current.Web;
SPFile sitepageAllItems = site.GetFile("[Document Library Folder Name]/Forms/AllItems.aspx");

SPFile class has different methods like Delete, MoveTo, CopyTo methods to work with site pages. Suppose by using Delete method you can delete the site page from the site.

You may also like following SharePoint list and document library tutorials:

I hope this SharePoint tutorial explains, what are the difference between a list and document library in SharePoint.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com