COM1302-Database Management Systems
Database Architecture and Data models
Sub Topics
What is database Architecture?
Basic-Client server Architecture
Data models
Relational Model
Database architecture
The database architecture is the set of specifications, rules, and
processes that dictate how data is stored in a database and how
data is accessed by components of a system.
Basic Client-Server Architectures
•Specialized Servers with Specialized functions
• Clients
• DBMS Server
Clients
•Provide appropriate interfaces and a client-version of the
system to access and utilize the server resources.
•Clients maybe diskless machines or PCs or Workstations with
disks with only the client software installed.
•Connected to the servers via some form of a network.
(LAN: local area network, wireless network, etc.)
DBMS Server
•Provides database query and transaction services to the clients.
•Called as query and transaction servers.
Database Architecture
Database architecture divided into two types
Logical 2 tier client server architecture
Logical 3 tier client server architecture
Two tier client server architecture
Is used for user interface programs and application programs
that run on client side.
Three tier client server
architecture
This is used in web application
A simplified database system environment
What do we store in a Database?
Collection of data central to some enterprise
Essential to operation of enterprise
Historical data can guide enterprise strategy
Of interest to other enterprises
State of database mirrors state of enterprise
How do we store data?
Data Models
Data Model: A set of concepts to describe the structure of a database
and certain constraints that the database should obey
Many forms of data models
Makes data abstraction possible
Hides details of physical data storage from the user
Most commercial database systems are based on relational data model
Database (Implementation) Models
Hierarchical
Network
Relational
Object-oriented
Hierarchical Model
Represents a hierarchy with the whole at the root and the
components forms the child nodes in turn
Thus, all the components or the nodes, taken together form the
whole
Hierarchical Model
Network Model
Resembles the hierarchical model with a provision for a record
to have more than one parent
An owner record is equivalent to a parent, and a member
record s equivalent to a child in the hierarchical model
The difference is that a record can appear as a member in
more than one set
Network Model
Relational Model
They can manipulate and stored as relations relational database
Relational database system devised by Codd in 1970
An attempt to devise a standard model with a sound mathematical
basis
Most successful & better model than other database model
SQL query language uses for querying the data
Examples include:
Oracle, Microsoft Access, FoxPro, MySql, SQLServer etc
“Relations”
Can be represented as tables in which rows represent “tuples”
and columns represents attributes
A relation may be described by its name and the related
attributes
Eg (Employee (Emp_no, Emp_ name, Age, Start_date,
Address……. )
Relational Database - Exists
Example
Has
Has
Has
Features of Relational DBMS
2-D tables (rows and columns representing records/tuples and fields/attributes)
Dynamic links among tables
Easy and flexible to design and use
Data independence
Generic manipulation language (SQL)
Storing Data in a DBMS (contd)
In relational data model, the main construct is a relation.
A relation has fields that belong to it which contain the name & data
type of each field
A description of data in terms of a data model is called the schema.
- Every relation has a schema, which describes the name of the
relation, name of each attribute (field or column), and the type of
each column.
- e.g.
- Students(sid: string, name: string, login: string,
age: integer, gpa: real)
First Year 22
Schemas versus Instances
•Database Schema: The description of a database. Includes descriptions
of the database structure and the constraints that should hold on the
database.
•Schema Diagram: A diagrammatic display of (some aspects of) a
database schema.
•Schema Construct: A component of the schema or an object within the
schema, e.g., STUDENT, COURSE.
•Database Instance: The actual data stored in a database at a particular
moment in time. Also called database state (or occurrence).
Database Schema Vs. Database
State
•Database State: Refers to the content of a database at a moment
in time.
•Initial Database State: Refers to the database when it is loaded
•Valid State: A state that satisfies the structure and constraints of
the database.
• database schema : changes very infrequently.
• database state : changes every time the database is updated.
End