You are on page 1of 18

Lecture 5.

Basic database models


1 Hierarchical database model

2 Network database model

3 Entity-relationship database model

4 Relational database model

5 Object-oriented database model


Hierarchical database model

Basic rules
e pt
s ic nc
Ba co

Each segment can be the ancestor of


several segments, which, in turn, will be
considered descendants
segment (relationship 1: M)

ancestor
Each segment can have only one ancestor

descendant

relationship Only one segment can be root


Hierarchical database model

Example of design

1 Conceptual simplicity
01 Complexity of management
po ne
siti ga
ve 2 Database security tiv 02 Lack of structural independence
e
3 Data independence 03 Complexity of programming

04 Restrictions on implementation
4 Data integrity

05 Lack of standardization
5 Efficiency
Hierarchical database model

--Representation of a Semantics of the model Set theory.


set of logically related Graph theory.
data and their
description in the
form of a tree-like
structure.
--Support data
integrity.

Structure of data.
Objects - elements Data integration.
of the hierarchy Structural independence of
data.
Data integrity.
Network database model

t
s ic nce
p Basic rules
Ba co

notation The set is a 1: M relationship between the


notation-owner and the notation-
members

set

notation-owner A notation- member can appear in more


than one set

notation- member
Network database model

Example of design

1 Conceptual simplicity
po ne
siti ga
ve 2 Support for other types of
relationships
tiv
01 The complexity of the system as
e a whole
3 Flexible data access
02 Lack of structural independence

4 Data integrity

5 Independence
Network database model

--Representation of a
set of logically related Semantics of the model Set theory.
data and their Graph theory.
description in the
form of a network of
records
interconnected by
different types of
relationships.
--Support data
integrity.

Structure of data.
Notation elements. Data integration.
Elements of relationships. Structural independence of data.
Data integrity.
Entity-relationship database model

p t
s ic nce Basic rules
Ba co

strong entity The entity is described by a set of


attributes. Each attribute describes a
property of the system

weak entity

A relationship describes a connection


attribute between data. Most relationships describe
the connection between two entities

relationship
Entity-relationship database mode

Example of design

po ne
01 Insufficient opportunities to
siti ga present restrictions
ve 1 Conceptual simplicity tiv
Restrictions of opportunities to
e 02 present relationships

2 Visual presentation
Lack of data manipulation
03 language
Integration with the
3 relational database model 04 Loss of information
content
Entity-relationship database mode

Semantics of the model


Representation of the
scheme of logically Graph theory.
connected data in the
form of graphic or
semantic notation

Structure of data.
Entities. Data integration.
Relationships. Structural independence of data.
Attributes. Data integrity.
Relational database model

p t Each table is a matrix consisting of a set of


s ic nce rows and columns
Ba co

Each cell in the table must have an atomic value


table

primary key Each column contains data of the same type.


Each line is a separate record

foreign key
Tables must contain a column with unique data
(primary key)

table scheme
Tables can contain columns with the values of
the primary keys of other tables (foreign key)
Relational database model

Example of design

1 Conceptual simplicity
po ne
siti ga
Design, implementation and Essential requirements for
ve 2 management simplicity tiv 01 hardware and software
e
3 Structural independence 02 Possibility of "early" projects
of data
The problem of "information
Arbitrary queries to the 03
4 database
islands"

5 Powerful DBMS
Relational database model

Set theory.
--Representation of a First order logic.
set of logically related
Semantics of the model Relational algebra.
data in the form of Relational calculations.
relations (tables).
--Data redundancy
control.
--Ensuring data
consistency.
--Support data
integrity.

Relation. Structure of data.


Tuples. Data integration.
Structural independence of
Attributes.
data.
Keys. Data integrity.
Restrictions.
Object-oriented database model

p t Basic rules
s ic nce
Ba co

Objects that use the same characteristics are


grouped into classes
object

The class method is a real action that determines


class / the behavior of an object
superclass /
subclass
method Classes are organized into a hierarchy of classes

relationship Inheritance is the ability of an object within a


class hierarchy to inherit the attributes and
methods of higher classes
Object-oriented database model

Example of design

po ne
siti 1 Adding semantic content
ga 01
Difficult navigation of data
access
ve tiv
The complexity of learning and
2 Semantic content of external e 02 programming
representation

03 Slow realization of transactions


3 Structural independence
and data independence

04 Lack of standardization
4 Data integrity
Object-oriented database model

Set theory.
--Representation of a
set of logically related Semantics of the model Graph theory.
Discrete group theory.
data in the form of
objects of different
classes, containing
attributes and
methods.
--Data redundancy
control.
--Support data
integrity.

Classes. Structure of data.


Data integration.
Objects. Structural independence of
Attributes. data.
Methods. Data integrity.
Individual task

1. Give examples of subject areas that


should be implemented using a
hierarchical data model.
2. Give examples of subject areas that
should be implemented using a network
data model.
3. Give examples of subject areas that
should be implemented using a
relational data model.
4. Give examples of subject areas that
should be implemented using an object-
oriented data model.

You might also like