Database System Concepts and Architecture
Database System Concepts and Architecture
Concepts and
Architecture
III SEM BCA
Data models
• Data Model gives us an idea that how the final system will look like after its
complete implementation. It defines the data elements and the relationships between
the data elements.
• Data Models are used to show how data is stored, connected, accessed and updated
in the database management system. Here, we use a set of symbols and text to
represent the information so that members of the organisation can communicate and
understand it.
• Though there are many data models being used nowadays but the Relational model
is the most widely used model.
• DBMS allows a user to specify the data to be stored in terms of a data model.
A data model is a collection of higher level data description constraints that hides
lower level storage details. It is the collection of concepts that can be used to
describe the structure of a database.
Types of Data models
1.Hierarchical Model
2.Network Model
3.Entity-Relationship Model
4.Relational Model
5.Object-Oriented Data Model
6.Object-Relational Data Model
7.Flat Data Model
8.Context Data Model
Hierarchical Model
• Hierarchical Model was the first DBMS model. This model organises the data in
the hierarchical tree structure.
• The hierarchy starts from the root which has root data and then it expands in the
form of a tree adding child node to the parent node.
• This model easily represents some of the real-world relationships like food
recipes, sitemap of a website etc.
• Example: We can represent the relationship between the shoes
present on a shopping website in the following way:
• Features of a Hierarchical Model
• One-to-many relationship: The data here is organised in a tree-like structure
where the one-to-many relationship is between the datatypes. Also, there can be
only one path from parent to any node. Example: In the above example, if we
want to go to the node sneakers we only have one path to reach there i.e through
men's shoes node.
• Parent-Child Relationship: Each child node has a parent node but a parent node
can have more than one child node. Multiple parents are not allowed.
• Deletion Problem: If a parent node is deleted then the child node is automatically
deleted.
• Pointers: Pointers are used to link the parent node with the child node and are
used to navigate between the stored data. Example: In the above example the
'shoes' node points to the two other nodes 'women shoes' node and 'men's shoes'
node.
Network model
• This model is an extension of the hierarchical model. It was the most popular
model before the relational model. This model is the same as the hierarchical
model, the only difference is that a record can have more than one parent. It
replaces the hierarchical tree with a graph.
• Example: In the example below we can see that node student has two parents i.e.
CSE Department and Library. This was earlier not possible in the hierarchical
model.
Entity Relationship model
• Entity-Relationship Model or simply ER Model is a high-level data model
diagram. In this model, we represent the real-world problem in the pictorial form
to make it easy for the stakeholders to understand. It is also very easy for the
developers to understand the system by just looking at the ER diagram. We use the
ER diagram as a visual tool to represent an ER Model.
• ER diagram has the following three components:
Teacher table
name: String
doj: date
dob: date
DBMS Architecture
• The DBMS design depends upon its architecture. The basic client/server
architecture is used to deal with a large number of PCs, web servers, database
servers and other components that are connected with networks.
• The client/server architecture consists of many PCs and a workstation which are
connected via the network.
• DBMS architecture depends upon how users are connected to the database to get
their request done.
• Database architecture can be seen as a single tier or multi-tier. But logically,
database architecture is of two types like:
• 2-tier architecture and 3-tier architecture.
• 1-Tier Architecture
• In this architecture, the database is directly available to the user. It means the user
can directly sit on the DBMS and uses it.
• Any changes done here will directly be done on the database itself. It doesn't
provide a handy tool for end users.
• The 1-Tier architecture is used for development of the local application, where
programmers can directly communicate with the database for the quick response.
• 2-Tier Architecture
• The 2-Tier architecture is same as basic client-server. In the two-tier architecture,
applications on the client end can directly communicate with the database at the
server side. For this interaction, API's like: ODBC, JDBC are used.
• The user interfaces and application programs are run on the client-side.
• The server side is responsible to provide the functionalities like: query processing
and transaction management.
• To communicate with the DBMS, client-side application establishes a connection
with the server side.
• 3-Tier Architecture
• The 3-Tier architecture contains another layer between the client and server. In
this architecture, client can't directly communicate with the server.
• The application on the client-end interacts with an application server which
further communicates with the database system.
• End user has no idea about the existence of the database beyond the application
server. The database also has no idea about any other user beyond the application.
• The 3-Tier architecture is used in case of large web application.
Three Schema Architecture
• The three schema architecture is also called ANSI/SPARC architecture or three-
level architecture.
• This framework is used to describe the structure of a specific database system.
• The three schema architecture is also used to separate the user applications and
physical database.
• The three schema architecture contains three-levels. It breaks the database down
into three different categories.
• In the above diagram:
• It shows the DBMS architecture.
• Mapping is used to transform the request and response between
various database levels of architecture.
• Mapping is not good for small DBMS because it takes more time.
• In External / Conceptual mapping, it is necessary to transform the
request from external level to conceptual schema.
• In Conceptual / Internal mapping, DBMS transform the request from
the conceptual to internal level.
Objectives of Three schema Architecture
• The main objective of three level architecture is to enable multiple users to access the same
data with a personalized view while storing the underlying data only once. Thus it separates
the user's view from the physical structure of the database. This separation is desirable for the
following reasons: