Database PDF
Database PDF
Ghalib University
Computer Science Department
Zabihullah Rahmani
A data model always hides the details of the data storage and
diagrams.
and constraints.
used.
relationship.
10 Ghalib University By Zabihullah Rahmani
Example
In the following diagram, Author is the root node. The root node has 4 children.
The root record is always on level 0 and is the first element to be traversed in
the data model.
11 Ghalib University By Zabihullah Rahmani
Example
Let's look at the following 3 database tables - Person, Authors, and Books.
<>Person Table
<>ID Role Description ParentID
1 Author Writes, speaks, trains 0
Authors Table
ID Name Description ParentID
101 Allen O'Neill Author writes on AI 1
102 Mahesh Chand Author writes on C# 1
103 David McCarter Author writes on .NET 1
104 Raj Kumar Author writes on AWS 1
Books Table
ID Topic Title ParentID
1001 ADO.NET ADO.NET Programming 102
1002 GDI+ Programming GDI+ 102
1003 C# Learn C# 8.0 102
1004
Disadvantages
This model organizes data using two fundamental constructs, called records
type(entity) and sets type(relationship). Records type contain fields, and sets
type define one-to-many relationships between records type: one owner, many
members.
1. Data structure Data are organized in the form of tables, with rows and
columns.
2. Data manipulation Powerful operations (using the SQL language) are
used to manipulate data stored in the relations.
3. Data integrity The model includes mechanisms to specify business rules
that maintain the integrity of data when they are manipulated.
19 Ghalib University By Zabihullah Rahmani
Cont..
Domains: A domains is the set of allowable values for one or more attributes.
2. An entry at the intersection of each row and column is atomic (or single
valued).