Components:
➣ Page
➣ Extents
➣ Table / Index
➣ Database File
➣ Database File Group
➣ Transaction Log file
➣ Extents
➣ Table / Index
➣ Database File
➣ Database File Group
➣ Transaction Log file
1 . Page:-
- Page is the smallest unit of storage in SQL server.
- Page size is 8 KB.
- Page begins with a 96 byte header that stores page number, page type, the amount of free space on the page, and the allocation unit ID of the object that owns the page. After header, data rows are stored one after another. At end of the page a row offset table exists; one row for each data row in page.
- Following is the lay out of page
2. Extents :-
- An extents consists of 8 adjacent pages.
- There are two types of extents –
- Extent type Contents Uniform Extent All 8 pages in the extent are owned and used by a single object. Each of the 8 pages in the extent may be owned and used by Mixed Extent different objects.
- A new table or index is generally allocated pages from mixed extents. When the table or index grows to the point that it has eight pages, it then switches to use uniform extents for subsequent allocations.
- While creating an index on an existing table that has enough rows to generate eight pages in the index, index is allocated in uniform extents.
3.Table :-
- A table is contained in one or more partitions and each partition contains data rows in either a heap or a clustered index structure.
- The pages of the heap or clustered index are managed in one or more allocation units, depending on the column types in the data rows.
➣ Heap – is a table without clustered index.
➣ Clustered Table – is a table with clustered index.
4. Index:-
- SQL Server uses B-tree data structure for index.
- The top node of the B-tree is called root node. The bottom level nodes are called leaf nodes. Any index levels in between are known as intermediate levels.
- Index are of two types –
➣ Non-clustered Index – The leaf layer of a non-clustered index contains index pages instead of data pages.
5. Database File:-
- SQL Server uses three types of files to map a database to file system of operating system
- Primary Data File (.mdf) – It is the starting point of the database and points to the other files in the database. Every database has one primary data file.
- Secondary Data File (.ndf) – Any data file other than primary data file. A database may or may not have secondary data files.
- Log file (.ldf) - Log files hold all the log information that is used to recover the database. There must be at least one log file for each database.
6. Database file Organisation :-
7. Database File Group :-
- Database files can be grouped into file groups for allocation and administration purposes.
- File groups are of two types –
group if no other file group is specified while creating.
User-defined – These are created by database users.
➣ Every data modification (insert, update, or delete) by system stored procedures or data definition language
User-defined – These are created by database users.
- One file can be part of only one file group.
- For large objects e.g. tables and indexes created in a file group, all their pages will also be part of the same file group or objects can be partitioned.
8.Transaction Log File :-
- DB engine uses transaction logs to maintain integrity of database and for data recovery.
- Transaction log file consists of log records of operations performed and are stored sequentially.
- Following types of operations are logged –
➣ Every data modification (insert, update, or delete) by system stored procedures or data definition language
(DDL) statements to any table, including system tables.
➣ Every extent and page allocation or deallocation.
➣ Creating or dropping a table or index.
➣ Rollback operations
- Either of below two is put in a log record for an operation-
➣ The before and after images of the modified data
Reference:
https://www.slideshare.net/divya071/physical-architecture-of-sql-server
https://technet.microsoft.com/en-IN/library/ms179276(v=sql.90).aspx
kayseriescortu.com - alacam.org - xescortun.com
ReplyDeleteI truly appreciate the time and work you put into sharing your knowledge. I found this topic to be quite effective and beneficial to me. Thank you very much for sharing. Continue to blog.
ReplyDeleteData Engineering Services
AI & ML Solutions
Data Analytics Services
Data Modernization Services
En Son Çıkan Perde Modelleri
ReplyDeletesms onay
Vodafone mobil ödeme bozdurma
Nftnasilalinir.com
ankara evden eve nakliyat
trafik sigortası
dedektör
site kurmak
aşk kitapları
smm panel
ReplyDeleteSmm Panel
İs İlanlari
instagram takipçi satın al
hırdavatçı burada
beyazesyateknikservisi.com.tr
Servis
Tiktok Para Hilesi
urfa
ReplyDeleteantakya
ısparta
aydın
diyarbakır
XX1
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
DA3URX
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
TAZX2