Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 37

Data Models IN DBMS

Objectives
Define Data Models
Why data models are important
About the basic data-modeling building
blocks
How the major data models evolved
How data models can be classified

2
Data Model
A Model is a representation of reality, ’real world’
objects and events and their associations.

 Data Model refers to Conceptual Model of the Data and


the relationships among them.

A collection of tools for describing


 Data
 Data relationships
 Data constraints

3
The Importance of Data Models
Relatively simple representations, usually
graphical, of complex real-world data structures.
Facilitate interaction among the designer, the
applications programmer, and the end user.

Data model organizes data for various users.

They give higher quality to DBMS.


It gives clearer scope for developing
applications.

4
Data Model Basic Building Blocks
 Entity - anything about which data are to be collected and
stored

 Attribute - a characteristic of an entity

 Relationship - describes an association among entities


◦ One-to-many (1:M) relationship
◦ Many-to-many (M:N or M:M) relationship
◦ One-to-one (1:1) relationship
 Constraint - a restriction placed on the data

5
Business Rules
Describecharacteristics of the data as viewed by
the company.

Apply to any organization that stores and uses


data to generate information

Description of operations that help to create and


enforce actions within that organization’s
environment

6
The Evolution of Data Models

7
The Hierarchical Model
Developed in the 1960s to manage large
amounts of data for complex
manufacturing projects.

Basic logical structure is represented by


an upside-down “tree”

8
The Hierarchical Model (continued)

9
The Hierarchical Model (continued)
The hierarchical structure contains levels,
or segments

Depicts a set of one-to-many (1:M)


relationships between a parent and its
children segments
◦ Each parent can have many children
◦ Each child has only one parent

10
The Hierarchical Model (continued)
Advantages
◦ Simplicity
◦ Security
◦ Efficiency
◦ Many of the hierarchical data model’s features formed
the foundation for current data models
◦ Its database application advantages are replicated in a
different form, in current database environments

11
The Hierarchical Model (continued)
Disadvantages

◦ Difficult to manage
◦ Lacks structural independence
◦ Implementation limitations
◦ Poor Portability
◦ Complexity of Programming

12
13
Set Structure

14
The Network Model (continued)
Advantages
Conceptual simplicity
Resembles hierarchical model
Represent complex data relationships more
effectively
Improve database performance

15
The Network Model
Disadvantages
 System complexity

 Operational Anomalies

 Lack of Structural Independence

16
The Relational Model
Relational Database Management System
(RDBMS)

Performs same functions provided by


hierarchical and network DBMS systems, in
addition to other functions.

 RDBMS has ability to hide the complexities of


the relational model from the user

17
The Relational Model (continued)

18
The Relational Model (continued)

19
The Relational Model (continued)
Table (relations)
◦ Matrix consisting of a series of row/column
intersections

◦ Related to each other through sharing a common


entity characteristic

Relational diagram
◦ Representation of relational database’s entities,
attributes within those entities, and relationships
between those entities

20
The Relational Model (continued)
Relational Table
◦ Stores a collection of related entities

Relational table is purely logical structure

◦ How data are physically stored in the database is


of no concern to the user or the designer

21
The Relational Model (continued)

 Data Definition Language (DDL)


◦ Enables database administrator to define
schema(logical structure of database)
components .

DML
◦ Syntax or Code used for inserting , deleting or
manipulating the records in database.

22
The Relational Model (continued)
Structured Query Language (SQL) allows the user
to specify what must be done without specifying
how it must be done

SQL-based relational database application


involves:
◦ User interface
◦ A set of tables stored in the database
◦ SQL engine - provides controlled access and rapid
transaction processing.

23
The Relational Model
Advantages :
 Information as tables consisting of rows and columns is
much easier to understand.

 Relational database has structural independence.

 Both data independence and structural independence

 Simple to navigate

24
The Relational Model
Disadvantages :

Not good machine performance


Slower processing times than hierarchical and
network models.

25
The Entity Relationship Model
Widely accepted and adapted graphical
tool for data modeling.

Graphical representation of entities and


their relationships in a database structure

26
The Entity Relationship Model

27
The Entity Relationship Model
(continued)
Entity relationship diagram (ERD)
◦ Uses graphic representations to model database
components

Entity instance (or occurrence) is row in table

Entity set is collection of like entities


◦ Diamond connected to related entities through a
relationship line

28
The Entity Relationship Model

29
The Entity Relationship Model
Advantages
Conceptually simple
Better visual representation
Effective Communication Tool
Converting ER Diagrams to tables is very
simple.
Easy conversion to any Data Model

30
Entity Relationship Model
Disadvantages
Limited Constraints and Specifications
Limited Relationship Representation
No industry standard for notation
No representation of data manipulation

31
The Object Oriented Model
 Object is an abstraction of a real-world entity.

 A named entity made up of selected attributes and behavior


specific to a particular usage.

 Attributes describe the properties of an object

 Objects that share similar characteristics are grouped in classes


 Classes are organized in a class hierarchy

 Inheritance is the ability of an object within the class hierarchy


to inherit the attributes of classes above it

32
The Object Oriented Model
(continued)

33
The Object Oriented Model
(continued)
Object becomes basic building block for
structures

Includes information about relationships between


facts within object, and relationships with other
objects

34
Object Oriented Model
Advantages
 Is a more natural and realistic representation of
real-world objects.
Reusability of Classes
Capable of handling a large variety of data types
(eg – pictures , video etc.)
Support for long duration transactions
Improved Performance

35
Object Oriented Models
Disadvantages
Lack of universal data model
Limited use
Lack of standards
Lack of support for views
Complex
Lack of Security

36
Question
What is client server data model?

37

You might also like