Data Model

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

DATA MODEL

What is Data Model?


 Underlying structure of database

 A collection of conceptual tools for describing


 data
 data relationships and
 consistency constrains
Various Data Models
 Object-based logical model
 Entity-relationship model
 Object-oriented model
 Semantic model
 Functional model

 Record-based logical model


 Relational model (e.g., SQL/DS, DB2)
 Network model
 Hierarchical model (e.g., IMS)

 Physical model

Introduction CIS-552 3
Record based logical model

 Used in describing data at logical & view level.

 Specifies logical structure of database

 Provides high level description of implementation


Relational model

 Relation in DBMS:
 occurrence of a set of entities having the same
single valued attributes in form of a 2D table.

 Each row contains attribute values

 Each column contains data values of a particular


attribute
Relational Model

 Relational model:
collection of table to represent both data & relationship
among those data.

Customer Borrower Loan


Cust-id name addr Cust-id L-no L-no amount
001 A W-road 001 L-305
L-305 2000
002 B X-road 002 L-306
L-306 3000
003 C Y-road 003 L-446
004 D Z-road L-446 8000
004 L-260
Relational Model
 Example of tabular data in the relational model
Attributes
A Sample Relational Database
Network model

 Collection of records and relationship among data are


represented by links.
 Links are viewed as a pointer.
 Model is similar to a graph.

001 A A-road L-306 3000

002 B B-road L-305 2000

003 C C-road L-446 8000


Hierarchical model

 Data is represented by a collection of records

 Relationship among the data are represented by links.

 Organized as a tree.
Hierarchical Model

Central

001 A A-road 003 C C-road

002 B B-road

L-306 3000 L-446 8000


L-305 2000
Exercise

 Q. Write the comparison between relational model,


network model and hierarchical model.

You might also like