Download presentation
1
Prevalent Database Models (Advantages of a database over flat files)
2
FLAT file system Ordinary operating system files
Contain no information to communicate the file structure or any relationship between files This information must be provided by the application programme…..or the user. Do not meet the definitions of a database we identified earlier. Flat Files are often used to store database information Address File House number Street Town
3
FLAT file system (2) If flat files are used to store database data the DBMS has ‘metadata’ to allow it to translate data from the physical (flat file) into the logical layer format Flat file systems quickly become cumbersome and difficult to maintain (see pages 7, 8 and 9 of course text book)
4
Flat Files Here are some flat files grouped together by type … you can see the repeating format
5
The Hierarchical Model (1)
Similar to an organisation chart Think of the way we structure our personal computer files into directories and subdirectories
6
Hierarchical Model (2) Records are connected using ‘pointers’
The pointer tells the system where the related record is physically stored ….. Much as a street address tells us where a particular building is ….. Or a URL directs us to a particular webpage Each pointer establishes a ‘parent-child relationship’
7
Hierarchical Model (3) Parent child relationship also known as the ‘one-to-many relationship’ One parent can have many children Each child can only have one parent (a manager is responsible for many employees but each employee has only one manager)
8
Hierarchical Model (4) There are problems associated with setting up and maintaining this type of database caused by the ‘parent-child relationship’ (see the text book for a detailed explanation)
9
Hierarchical model (5) Consider this typical business situation:-
a customer can place many orders An order can contain many details These are clearly one-to-many relationships CUSTOMER ORDER ORDER DETAIL
10
Hierarchical Model (6) But most business would also recognise that:-
An employee can be associated with many orders A product can be specified in many order details CUSTOMER ORDER EMPLOYEE ORDER DETAIL PRODUCT
11
Hierarchical Model (7) But if we try and show this logical linkage we break one of the fundamental rules of the parent child relationship ….each child can only have one parent There are ways of resolving this dilemma, but they introduce complexity into the construction and maintenance of the database …. Something we want to avoid (see the text book for a detailed explanation) CUSTOMER ORDER EMPLOYEE ORDER DETAIL PRODUCT
12
Network Model In some ways similar to the hierarchical model in that pointers are used to link files. Pathways are more numerous and can be thought of as circular which quickly leads to complexity Rather like walking through a forest – with multiple pathways to get to the desired destination. Maintenance overhead for technicians in keeping the ‘route map’ up to date became prohibitive
13
Network Model beware of complex pathways!
(see the text book for a detailed explanation) ORDER ORDER DETAILS CUSTOMER EMPLOYEE PRODUCTS NEXT ORDER FOR THIS EMPLOYEE NEXT CUSTOMER OTHER ORDERS FOR THIS PRODUCT
14
The RELATIONAL Model Was a truly revolutionary approach
Flexible, no pre-defined pathways Ideal for ‘ad hoc’ queries Relates records as they are needed Instead of pointers locating physical file locations common data items (keys) are used to identify logical links between records Uses the one-to-many concept
15
The RELATIONAL Model The diagramming technique is known as the entity-relationship diagram (ERD) CUSTOMER These are the entities ….. Things that the business wishes to keep information about CUSTOMER ORDER ORDER DETAIL CUSTOMER
16
The RELATIONAL Model The lines show the connections between the entities … and express the ‘one-to-many’ relationship CUSTOMER The M denotes the ‘many’ end of the relationship 1 m EMPLOYEE ORDER 1 m 1 m ORDER DETAIL m 1 PRODUCT
17
The RELATIONAL Model This introductory module will focus around the RELATIONAL model We will look at how to draw ERD’s Refine them Implement them as databases that can function to supply real information from raw data.
18
Database Models The Object Oriented model (4)
This is a newer model that uses the idea of objects to store data. This model is not yet fully implemented but much research is going into it’s development.
19
Summary We have looked at the four database models Hierachical Network
Relational Object oriented
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.