Difference between SharePoint list and Document library

This SharePoint tutorial explains the difference between the SharePoint list and document libraries. There is a difference between a SharePoint list and library, let us check it out.

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.

SharePoint List vs SharePoint Library

Before understanding what is the difference between list and library in SharePoint? let us first try to understand what is a SharePoint list and what is a library?

We should have a very good understanding about list and library in SharePoint.

What is a SharePoint List?

A SharePoint list is like a table in a database or a table in excel. The SharePoint list will have rows and columns that we will use to store information.

For example, we may like to store Training Course details like below:

  • Training Course Name
  • Duration
  • Price
  • Future Updates (Yes/No)
  • Lifetime Access (Yes/No)
  • Other Information

If you want to store the above information in a SharePoint list, then it will looks like below:

SharePoint List vs SharePoint Library
SharePoint List

We can also easily attach documents to a SharePoint list items. You can see in the above pic, I have added a few attachments to a few SharePoint list items.

You can check out more about SharePoint List.

See also  PowerApps filter SharePoint list Example

In SharePoint, calendars are also lists.

What is a SharePoint Library?

A SharePoint library is a special kind of list that stores documents or files. We use library to store files. File is a like an item in a document library.

To enhance our example, if you want to store training course related documents, then you can create a document library.

You can add a columns that will define the course type:

  • Course (Choice columns) values – SharePoint Development Training/SPFX Training/SharePoint Site Owner Training/Power Platform Training/Nintex Forms and Workflows for Office 365
difference between a sharepoint list and library
sharepoint list vs library

You can check out more on this article What is a document library in SharePoint.

Difference between SharePoint list and Document library

Now, let us understand the difference between a SharePoint list and library or SharePoint list vs 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 additional attachments. Similarly, you can not have document sets in the list whereas you can have them 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. Actually, the list attachments are not indexed by SharePoint.
  • You can use the document set with the SharePoint document library to organize related documents in SharePoint. But in SharePoint lists document set is not available. You can not use the document set in a SharePoint list.
  • 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.
See also  Customize SharePoint site page

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 is the difference between a list and document library in SharePoint. So these are the difference between a sharepoint list and library. Do you think you learn SharePoint list vs library.