Presentation is loading. Please wait.

Presentation is loading. Please wait.

DBMS P HYSICAL D ESIGN IN FILE ORGANIZATION Physical design is concerned with the placement of data and selection of access methods for efficiency and.

Similar presentations


Presentation on theme: "DBMS P HYSICAL D ESIGN IN FILE ORGANIZATION Physical design is concerned with the placement of data and selection of access methods for efficiency and."— Presentation transcript:

1 DBMS P HYSICAL D ESIGN IN FILE ORGANIZATION Physical design is concerned with the placement of data and selection of access methods for efficiency and ongoing maintenance

2 F ILE O RGANIZATION Physical arrangement of the records of a file on secondary storage devices Sequential Linked List Indexed List

3 S EQUENTIAL F ILE Sequential file sorted in alphabetical order. Sequential files are usually sorted in ID. Sequence order to facilitate batch processing.

4 S EQUENTIAL F ILE P ROCESSING Transaction Old Master New Master Process Sequential files must be recopied from the point of any insertion or deletion to the end of the file. They are commonly used in batch processing where a new master file will be generated each time the file is updated.

5 The Sequential File –fixed format used for records –records are the same length –field names and lengths are attributes of the file –one field is the key filed uniquely identifies the record records are stored in key sequence

6 L INKED L IST Linked list to sort data alphabetically within department.

7 L INKED L IST F ILE P ROCESSING The next record in a linked list is found at the address stored in the record. Records are added at any location and pointers adjusted to include them. Deletions are not erased, but pointers changed to omit the deleted record.

8 I NDEXED F ILE ( SEQUENTIAL INDEX ) Index to access data by department abbreviation.

9 I NDEXED F ILE P ROCESSING Index Data File When a record is inserted or deleted in a file the data can be added at any location in the data file. Each index must also be updated to reflect the change. For a simple sequential index this may mean rewriting the index for each insertion. Index

10 Indexed Sequential File –index provides a lookup capability to quickly reach the vicinity of the desired record. indexed is searched to find highest key value that is equal or less than the desired key value. search continues in the main file at the location indicated by the pointer.

11 S OME CONSIDERATIONS Only the 1 st nodes contain records, but in turn, they point to the next node that contains the next group of sequential records in order to support sequential processing. The index file is sequential. Sometimes we need a directory. So, if there is a one-to-one correspondence between an index record and a data record, we call the index file a directory.

12 B-T REE I NSERTION PROCESS Example Node: Inserted items: 1. 70 2. 10 and 30 3. 15 Conclusion: the larger the node, the fewer the levels needed; the more records within a node, the more RAM is needed. 20 40 60 80

13 A UXILIARY S TORAGE AND F ILE O RGANIZATION Auxiliary storage refers to storage other than the main storage (e.g. magnetic tape or direct access devices). Other names given to auxiliary storage are secondary and backing storage.

14 F OLLOWING ARE THE CATEGORIES EACH STORAGE MEDIUM FALLS UNDER :

15 M AGNETIC D ISK Magnetic disks range in size from the old 3” (not used nowadays) to the 3 ½”. Hard disks are usually found to be fixed within computers and are faster and have larger storage capacities.

16

17

18 M AGNETIC T APE With magnetic tapes, each character is recorded across the width of the tape.

19

20 Magnetic tape reads in sequence, hence all records must be read irrespective if those records are required. For example to locate a record, stored half way on the magnetic tape will entail all records stored prior to that being read!


Download ppt "DBMS P HYSICAL D ESIGN IN FILE ORGANIZATION Physical design is concerned with the placement of data and selection of access methods for efficiency and."

Similar presentations


Ads by Google