Database Model and Database Types (12M)
Database Model and Database Types (12M)
HierarchicalModel
Network Model
Object Oriented Model
1) Hierarchical Model
Root
One to Many
Relationship
Leaf
• The hierarchy starts from the root data,
and expands like a tree, adding child nodes
to the parent nodes.
Disadvantages
• Redundancy and inconsistency of data
• This model support only one to many relationships,
many to many relationships are not supported.
Applications:
Disadvantages
• All the records are maintained using pointers and hence the
whole database structure becomes very complex.
• The insertion, deletion and updating operations of any
record require the large number of pointers adjustments.
• The structural changes to the database is very difficult.
Applications:
Disadvantages
• There is no universally defined data model for
an OODBMS, and most models lack a theoretical
foundation.
• In comparison to RDBMSs the use of OODBMS is still
relatively limited.
• There is a Lack of support for security in OODBMSs
• The system more complex than that of traditional DBMSs.
Applications:
Banking System
Hospital Management
Railway Reservation
Airline Reservation
Sale
Telecommunication
Fig : Object Oriented Model
Fig : Object Oriented Model
Fig : Object Oriented Model
Relational Database Model
Relational model first developed by Dr.
E.F.Codd in 1970’s, hence he is known as father of
relational database.
The data in RDBMS is stored in table.
Table is collection of Rows and Columns
Rows – Records / Tuples
Disadvantages
• Substantial hardware and system software overhead
• Possibility of poor design and implementation
Applications:
Banking System
Hospital Management
Railway Reservation
Airline Reservation
Sale
Telecommunication
Comparison between
Hierarchical Model and
Network Model
Comparison between Hierarchical Model and Network
Model
Hierarchical database model is based on tree Network Model is based on tree like
like structure with a single tree. structure with many root.
Support One to Many relationships. Support One to Many and Many to Many
relationship.
Less Popular More popular
Data storage is in the form of data tree i.e Data storage is in the form of Arbitrary
Parent Child relationship. Graph
Uses Pointer to relate data Uses Links to relate data.
Hierarchical Model Network Model
The insertion, deletion and updating The insertion, deletion and updating
operations of any records are easy. operations of any records are difficult.
Applications: Applications:
• Information Management System(IMS) • Police National Computer(PNC)
• RDM Mobile • Driver License
• Geographic Information
• File System
Comparison between
Network Model and Relational
Model
Comparison between Network Model and
Relational Model
Network Model Relational Model
Network Model developed by the Relational model first developed by Dr.
Conference on Data Systems Languages E.F.Codd in 1970’s.
(CODASYL) in 1969.
Network Model is based on tree like This is table based model i.e collection of
structure with many root. rows and columns.
Data storage is in the form of ‘Arbitrary Data storage is in the form of Tables.
Graph’.
Uses links to relate data. Does not use pointers or links to relate data.
Hierarchical database Network Model is based on This is table based model i.e
model is based on tree like tree like structure with many collection of rows and
structure with a single tree. root. columns.
Support One to Many Support One to Many and Support all relationships.
relationships. Many to Many relationship.
Less Popular More popular More popular
Data storage is in the form Data storage is in the form of Data storage is in the form of
of data tree i.e Parent Child Arbitrary Graph Tables.
relationship.
Uses Pointer to relate data Uses Links to relate data. Does not use pointers or links
to relate data.
Hierarchical Model Network Model Relational Model
The insertion, deletion and The insertion, deletion and The insertion, deletion and
updating operations of any updating operations of any updating operations of any
records are easy. records are difficult. record are easy..
Applications: Applications: Applications:
• Information • Police National • Banking System
Management Computer(PNC) • Hospital Management
System(IMS) • Driver License • Railway Reservation
• RDM Mobile
• Geographic Information
• File System
Relation
A table in a relational database, also
known as a relation, is a two dimensional
structure used to hold related information.
A database consists of one or more related
tables.
Relations are a logical structure which is
collection of table consisting rows and
columns.
Example of Employee table
1 Adam 34 13000
2 Alex 28 15000
3 Smith 20 18000
4 John 42 19020
1 Adam 34 13000
Rows/Records/Tuples
Attributes / What is Field?
In Relational table, a column is a set of value
of a particular type.
Fields also kwon as Columns and Attributes.
The above Employee table consists of four
fields, ID, Name, Age and Salary.
For example, in Employee table, Name is a
column that represents names of employee.
Name
Adam
Alex
Smith
John
Column/ Fields/Attributes
Domain
A domain is defined as the set of all
unique values permitted for an attribute.
In a relational table a domain can have a
Single value or no (Null) value.
Advantages of RDBMS
RDBMS is object based database system
Information store inform of table
It support multiple user
Excellent data Security
Relational Algebra
Dynamic View
SQL
Example
College Management System
Principal
Staff
Student
Library
Class
LABs
Principal
Principal Name Qualification Mobile.no Email_Id
Staff
Staff Name Department Qualification Mobile.no Email_Id
Student
Name Roll_ No Enrollment _No Mobile No. Address
Library
bandwidth problem
limited Scalability
Winter-18
1) Define the term Data Model.(2M)