Lecture6(2) - 01/11/12 Lecture 6 on Physical Database DBMS...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 01/11/12 Lecture 6 on Physical Database DBMS has a view of the database as a collection of stored records, and that view is supported by the file manager which has a view of the database as a collection of pages, and that view is supported by the disk manager. The physical database design is initiated to a certain extent in the logical design. The physical organization is determined largely by the need for operational efficiency, fast response times, and cost minimization. Most data storage devices record data as a stream of bits. The groups of bits which we can read with one machine instruction are called physical records. The physical records are stored at locations which are identified by a means of machine addresses. A program identifies a logical record or sequent by means of a key. 01/11/12 DBMS File manager Disk Manager Stored database The DBMS, file manager and disk manager Request stored record Request stored page Disk I/O operation Store record returned Stored page return Data read from disk 01/11/12 Sequential file With the physical sequential access method, the physical records are stored in logical sequence. If the storage medium to be used is a tape, the programmer has to present the physical records in a logical sequence. If the storage medium is a direct access one, the system will interconnect the physical records so that they are in logical sequence, even if they were not presented in logical sequence. The records must be read in a fixed sequence from begin to end sequential. 01/11/12 Overflow area With ISAM files the records are grouped so as to fit onto physical disk tracks, and one track on each cylinder contains an index to the records stored in that cylinder. When new records are inserted after the original sequential file has been set up these are stored in an overflow area. The index track contains pointers both to the prime data area and to the overflow area. 01/11/12 01/11/12 Indexed File: B+-Tree A common scheme for extremely large files is to induce a hierarchy of indices that follow the hierarchical nature of the secondary storages devices on which the file resides. We can view the hierarchy of indices as a tree. The benefit of index file is efficient space utilization in searching indexes. 01/11/12 Third-Level Index (Index Block) (Root) Second-Level Index (Index Block) First -Level Index (Index Block ) Main File (Leaf Block) Multilevel Index B+ Tree 01/11/12 B+ Tree File k e y w o r d A d d r e s s 3 8 5 6 7 8 8 0 5 7 8 9 k e y w o r d A d d r e s s 1 5 0 3 8 5 1 2 k e y w o r d A d d r e s s 5 3 6 6 7 8 3 4 k e y w o r d A d d r e s s 7 8 5 8 0 5 5 6 0 0 1 0 0 3 : : : 1 5 0 2 5 1 : : : 3 8 5 4 5 5 : : : 5 3 6 6 0 5 : : : 6 7 8 7 0 5 : : : 7 8 5 7 9 1 : : : 8 0 5 I n d e x F i l e B l o c k 1 0 I n d e x F i l e B l o c k 7 I n d e x F i l e B l o c k 8 I n d e x F i l e B l o c k 9 F i r s t l e v e l I n d e x S e c o n d l e v e l I n d e x D a t a F i l e B l o c k 1 D a t a F i l e B l o c k 2 D a t a F i l e B l o c k 3...
View Full Document

This note was uploaded on 01/11/2012 for the course CS CS3462 taught by Professor Drlee during the Spring '11 term at City University of Hong Kong.

Page1 / 36

Lecture6(2) - 01/11/12 Lecture 6 on Physical Database DBMS...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online