Data Model
Data Model
DATA
MODELS
Database Systems
INTRODUCTION
Page 1
COMPONENTS
Page 2
DATA MODEL CATEGORIES
Page 3
OBJECT BASED MODELS
Page 4
PHYSICAL BASED MODELS
Page 5
RECORD BASED MODELS
Page 6
RELATIONAL DATA MODEL
Page 7
NETWORK DATA MODEL
Page 8
HIERARCHICAL DATA MODEL
Page 9
ANY
QUESTIONS
MULTIUSER DBMS
ARCHITECTURES
Page 1
TELEPROCESSING
Page 3
FILE SERVER
ARCHITECTURE
DISADVANTAGES
Page 4
CLIENT SERVER
ARCHITECTURE
As the name suggests, there is a client process, which requires some resource, and a
server, which provides the resource.
The client (tier 1) is primarily responsible for the presentation of data to the user,
and the server (tier 2) is primarily responsible for supplying data services to the
client.
Page 3
TWO TIER
ARCHITECTURE
Client (tier 1) manages user interface and runs applications.
Server (tier 2) holds database and DBMS.
Page 3
THREE TIER
ARCHITECTURE
A new variation of the traditional two-tier client–server model appeared to
solve the problem of enterprise scalability.
This new architecture proposed three layers, each potentially running on a
different platform
The user interface layer, which runs on the end-user’s computer (the client).
The business logic and data processing layer. This middle tier runs on a
server and is often called the application server.
A DBMS, which stores the data required by the middle tier. This tier may run
on a separate server called the database server.
Page 3
THREE TIER
ARCHITECTURE
Page 3
3 tier architecture
ADVANTAGES
01 The need for less expensive hardware because the client is ‘thin’.
Page 4
3 tier architecture
ADVANTAGES
Page 4
ANY
QUESTIONS
RELATIONAL MODEL
RELATION
A relation is a table in a database with columns and rows
In the relational model, relations are used to hold information about the
objects to be represented in the database.
A relation is represented as a two-dimensional table in which the rows of
the table correspond to individual records and the table columns
correspond to attributes.
Page 11
RELATIONAL MODEL
ATTRIBUTE
TUPLE
A tuple is a row of a relation.
For example, the rows or records entered in a table form the tuples.
These are the individual records.
Page 5
RELATIONAL
MODEL
Page 3
RELATIONAL MODEL
DEGREE
The degree of a relation is the number of attributes it contains
A relation with only one attribute would have degree one and be called
a unary relation, two attributes is called binary, one with three
attributes is called ternary, and after that the term n-ary is usually used.
CARDINALITY
Page 5
RELATIONAL
MODEL
Page 3
DOMAIN
Page 3
ALTERNATE
TERMINOLOGY
Page 3
Relational Model
PROPERTIES OF A
RELATION
Page 4
Relational Model
PROPERTIES OF A
RELATION
Page 4
RELATIONAL KEYS
CANDIDATE
Page 3
TYPES OF KEYS
Page 6
INTEGRITY
CONSTRAINTS
Every attribute has an associated domain, and there are constraints
(called domain constraints) that form restrictions on the set of values
allowed for the attributes of relations.
Integrity rules, are constraints or restrictions that apply to all
instances of the database
NULL
A null can be taken to mean the logical value ‘unknown’.
It can mean that a value is not applicable to a particular tuple, or it could merely
mean that no value has yet been supplied.
For example, in the Viewing relation, the comment attribute may be undefined
until the potential renter has visited the property and returned his or her
comment to the agency.
Page 3
Fauget University | 2024
TYPES OF CONSTRAINTS
ENTITY INTEGRITY
This applies to the primary key attribute
In a relation, no attribute of a primary key can be null
REFERENTIAL INTEGRITY
If a foreign key exists in a relation, either the foreign key value must
match a candidate key value of some tuple in its home relation or the
origin key value must be wholly null.
Page 9
CONSTRAINTS
GENERAL CONSTRAINTS
Additional rules specified by the users or database administrators of a
database that define or constrain some aspect of the enterprise.
Example:
A user may place an upper limit of 20 upon the number of staff that
may work at a branch office, as a general constraint that must be
enforced by the DBMS
In this case a branch should not be assigned more than 20 staff
members
Page 9
THANK
YOU