Presentation is loading. Please wait.

Presentation is loading. Please wait.

6/2/20161 Database Systems Lecture # 3 By: Asma Ahmad Jan 21 st, 2011.

Similar presentations


Presentation on theme: "6/2/20161 Database Systems Lecture # 3 By: Asma Ahmad Jan 21 st, 2011."— Presentation transcript:

1 6/2/20161 Database Systems Lecture # 3 By: Asma Ahmad Jan 21 st, 2011

2 6/2/20162 Brief Recap Database and its Basics File Processing Systems Database Approach & its Advantages Database Management Systems (DBMS)

3 6/2/20163 In Today’s Lecture Non-Relational Systems Flat-File Systems Hierarchical Systems Network System

4 6/2/20164 Non-Relational Systems Database systems can be conveniently categorized according to the data structures and operators they present to the user The oldest system fall into three broad categories: Flat-File Systems Hierarchical Systems Network Systems We will not discuss these categories in great detail as, although some are still used, they are obsolete We will focus on relational databases

5 6/2/20165 Flat-File Systems

6 6/2/20166 Flat-File Systems The file system was a start. However, it was seriously inefficient Essentially, in order to find a record, someone would have to read through the entire file and hope it would not be the last record Imagine last record is the required one… What was needed, computer scientist thought, was a “card catalog”, a mean to achieve the ability to efficiently access a single record without searching the entire file to find it So the result was the “indexed file-oriented systems” in which a single index file stored “key” words and pointers to records that were stored else where. This made retrieval much more easier. But How??? To find data, one needed only search for keys rather than reading entire records. This was referred to as “flat-file systems”

7 Files, Records, and Fields

8 Indexed Files

9 6/2/20169 Flat-File Systems (Cont…) Even with the benefits of indexing, the file-oriented systems still suffered from problems discussed before Data Redundancy - the same data might be stored in different places Poor Data Control - redundant data might be slightly different such as in the case when XYZ changes his city and the change is only reflected in some of the files containing his data Inability to Easily Manipulate Data - it was a tedious and error prone activity to modify files by hand

10 6/2/201610 Hierarchical Databases

11 6/2/201611 Hierarchical Databases Early databases were Hierarchical databases Records are arranged in top-down structure, that resembles a tree Examples… They used a hierarchical structure, in which all related data had a “parent-to-child relationship” A parent data item could have multiple child data items, but a child could only have one parent Relationship between related data were created using pointers, which are links to the physical locations where data was written to the disk

12 6/2/201612 Hierarchical Model Customer Order 2 List Item 2List Item 1List Item 2List Item 1 Order 1

13 6/2/201613 Parent/Child Relationship The “parent/child” rule assures that data are systematically accessible. To get to a low-level data, you start at the root and work your way down through the tree until you reach your target One problem with this system is that the user must know how the tree is structured in order to find anything!! The hierarchical data model, however, is much more efficient then the flat-file model discussed earlier because there is not as much need for redundant data. If a change in the data is necessary, the change might be need to processed once One other feature of the hierarchical database system was the introduction of the Database Management System (DBMS) software

14 6/2/201614 Hierarchical Systems One of the most popular hierarchical database management system was IBM’s information management system (IMS) database system, first introduced in 1968 We will not have the opportunity to study IMS, but you can see its current version (Version 11) at http://www-01.ibm.com/software/data/ims/ims/ It is still being used and now provides additional features

15 6/2/201615 Hierarchical Systems (Cont…) The SABRE database system was jointly developed by American Airlines and IBM at about the same time IMS was developed It is an airline reservation system The SABRE is still used by the web-based travel; services such as Travelocity.com

16 6/2/201616 Hierarchical Databases Example DEPARTMENT PROJECTEMPLOYEE EQUIPMENTPERSONALSKILL Can you identify problems with this approach?

17 6/2/201617 In summary, the following rules govern a hierarchical data structure: A parent record type may “own” an arbitrary number of child record types.  For example: EMPLOYEE owns both SKILL and PERSONAL No single occurrence of a record type may have more then one parent record type (or occurrence) in the hierarchy So according to these rules can you think of any limitations?? Hierarchical Databases Example (Cont…)

18 6/2/201618 Hierarchical Databases Example (Cont…) Violation of second rule SKILL has two parents…Can you think of any solutions? DEPARTMENT PROJECTEMPLOYEE EQUIPMENTPERSONALSKILL COURSE

19 6/2/201619 Hierarchical Databases Example (Cont…) Two Hierarchical Data Model But there are problems associated with this approach. DEPARTMENT PROJECTEMPLOYEE EQUIPMENTPERSONALSKILL COURSE SKILL

20 6/2/201620 Hierarchical Databases Example (Cont…) Customer Order 2 List Item 2List Item 1List Item 2List Item 1 Order 1

21 6/2/201621 Hierarchical Database Problems In the previous example, at the physical layer, customers are linked to their associated orders data by using pointers A problem with the hierarchical database structure is that relationships are maintained by pointers that uses physical addresses The data are physically dependent on the storage medium When the storage medium becomes full, or when new hardware is purchased, it is difficult to migrate a hierarchical database to a new storage medium Another problem is of redundancy

22 6/2/201622 Hierarchical Database Disadvantages Although Hierarchical Database and their applications still exists, the Hierarchical model rapidly lost favor in the 1970s and early 1980s. The problems are: Complex Implementation Although the Hierarchical model’s DBMS relieves designer and programmer of data-dependence problems, they must still have detailed knowledge of the physical data storage characteristics Difficult to Manage Any changes in the database structure requires changes in the application programs to access the database

23 6/2/201623 Hierarchical Database Disadvantages (Cont…) Lack Structural Independence The programmer must know the access paths to the relevant segments Complex to program and use Application programs and end users must know that how the data are distributed physically within the database Representation Limitations Many common relationships do not conform to the tree structure required by the model No standards or Portability Because there are no standards moving from one hierarchical DBMS from another was difficult

24 6/2/201624 Legacy of Hierarchical Model Although the hierarchical database model is no longer a major player in the database market: Its basic concepts formed the basis for subsequent database development Its limitation lead to better ways of thinking about database design Some of its basic concepts show up in current database models The hierarchical data model has been rediscovered in some more modern databases such as object-oriented databases

25 6/2/201625 Evolution of DB Systems

26 6/2/201626 That’s it for today!


Download ppt "6/2/20161 Database Systems Lecture # 3 By: Asma Ahmad Jan 21 st, 2011."

Similar presentations


Ads by Google