The fundamental unit of data storage in SQL Server is the page. The disk space allocated to a data file (.mdf or .ndf) in a database is logically divided into pages numbered contiguously from 0 to n. Disk I/O operations are performed at the page level. That is, SQL Server reads or writes whole data pages.

Extents are a collection of eight physically contiguous pages and are used to efficiently manage the pages. All pages are organized into extents.

Page 

Every piece of data in SQL Server is stored in 8 KB database pages. 

A page is a basic unit of I/O operation. 

A page starts with a 96-byte header in which all system information (the amount of free space, the page type, the page number, and the allocation unit ID of the object that owns the page) is stored. 

Another part of the page is its body or data rows (8,060 bytes). The body contains all the data in rows. 

The last part of the database page is row offsets that are located in reverse sequence from the sequence of the rows on the page (36 bytes).

Database Page

Take a regular book: all content in it is written on pages. Similar to a book, in SQL Server all the data rows are written on pages. In a book, all pages are the same physical size. Similarly, in SQL Server all data pages are the same size - 8 kilobytes. In a book most pages contain the data - the main content of the book - and some pages contain metadata about the content - for example table of contents and index. Again, SQL Server is not different: most pages contain actual rows of data which were stored by users; these are called Data pages and text/image pages (for special cases). The Index pages contain index references about where the data is and finally there are system pages that store variety of metadata about the organization of the data (PFS, GAM, SGAM, IAM, DCM, BCM pages).

Page Types

There are several types of database pages:

  1. Data Page details how the data is stored inside the data files, database.
  2. Index Page contains index entries.
  3. Text and Image contains textual and image data.
  4. GAM (Global Allocation Map) and SGAM (Shared Global Allocation Map) contain information about whether extents are allocated.
  5. PFS (Page Free Space) contains information about the free space available on pages and about page allocation.
  6. IAM (Index Allocation Map) contains information about extents used by a table or index.
  7. Bulk Changed Map contains the extent information that has been modified by bulk operations since the last BACKUP LOG.
  8. Differential Changed Map contains the extent information that has changed since the last BACKUP DATABASE.

Extent

Eight physically contiguous pages in SQL Server database are called the extent. One page is 8 KB, therefore one extent is 64 KB.

There are two types of extents in SQL Sever:

  1.  All eight physically contiguous pages belong and can be used only by a single object. This is a uniform extent.
    Uniform extent
  2. Each of the eight physically contiguous pages belongs and can be used by eight different objects. This type of extent is known as mixed.
    Mixed extent

Usually all new tables or indexes are allocated pages from mixed extents. SQL Server extent switches from mixed to uniform type only when a table or index has at least eight or more pages.


Ref:

https://sqlbak.com/academy/database-page

https://docs.microsoft.com/en-us/sql/relational-databases/pages-and-extents-architecture-guide?view=sql-server-ver15#:~:text=The%20page%20is%20the%20fundamental,all%20versions%20of%20SQL%20Server.