Explain various database models in DBMS,
Explain database models in DBMS with examples,
database models in DBMS PDF download
1.The hierarchical model:
2.The network model
3.The relational model (RDBMS)
4.The deductive model
5.The object model (ODBMS)
1.The hierarchical model:
Databases appeared in the late 1960s, at a time when the need for a flexible information management system had arisen. There are five models of DBMS, which are distinguished based on how they represent the data contained:
The hierarchical model: The data is sorted hierarchically, using a downward tree. This model uses pointers to navigate between stored data. It was the first DBMS model.
o Also use Records, Links (similar to Network Model)
o Database is collection of rooted trees => forest
Hierarchical Model – Tree-Structure Diagrams
Tree-structure diagram (Data-structure diagram)
o No cycle ( arbitrary graph in Network Model)
o Only 1:1 and 1:M can be directly represented
For M: N relationships, we need 2 separate tree structure diagrams.
Hierarchical Model – Sample Database Trees
Hierchical Model – Tree-Structure Diagrams
the following relationships between branch, account, and customer:
we need 2 separate tree-structure diagrams:
o To avoid record duplication, use virtual records:
2. The network model:
like the hierarchical model, this model uses pointers toward stored data. However, it does not necessarily use a downward tree structure.
Network Model – Basic Concepts
o Data are represented as collection of recordso Relationships are represented as links
o Each record is a collection of fields:
type customer = record
customer-name: string;
customer-street: string;
customer-city: string;
end
type account = record
account-number: string;
balance: integer;
end
Data-structure diagram:
- Same purpose as an ER diagram.
- Boxes (record types)
- Lines (links)
Many to Many:
One to many from customer to account:
One to One:
Network Model – Relating 3 Record Types
A customer may have several accounts, each in a specific branch.
An account may belong to several different customers.
A link can connect only 2 record types
=> We need to use a new record type (Rlink) as below:
0 Comments