Data Model & Database System Architecture - Unit 1 - 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Data Model:

A Database model defines the logical design and structure of a database and defines
how data will be stored, accessed and updated in a database management system. While
the Relational Model is the most widely used database model, there are other models too:
1. Relational Model, 2. Entity relational model, 3. Hierarchical model, 4. Network
Model.
1. Relational Model

In relational model, the data and relationships are represented by collection of inter-related
tables. Each table is a group of column and rows, where column represents attribute of an
entity and rows represents records. Sample relationship Model: Student table with 3
columns and three records.

Advantages of Relational Model

 Simple: This model is simpler as compared to the network and hierarchical model.
 Scalable: This model can be easily scaled as we can add as many rows and columns
we want.
 Structural Independence: We can make changes in database structure without
changing the way to access the data.
Disadvantages of Relational Model:

 Bad Design: As the relational model is very easy to design and use. So the users
don't need to know how the data is stored in order to access it. This ease of design
can lead to the development of a poor database which would slow down if the
database grows.
But all these disadvantages are minor as compared to the advantages of the relational
model. These problems can be avoided with the help of proper implementation and
organisation.

2. Entity Relationship Model:


An entity–relationship model (ER model) is a systematic way of describing and defining
a business process. An ER model is typically implemented as a database. The main
components of E-R model are: entity set and relationship set.
 Entities: Entity is a real-world thing. It can be a person, place, or even a
concept. Example: Teachers, Students, Course, Building, Department, etc are some
of the entities of a School Management System.
 Attributes: An entity contains a real-world property called attribute. This is the
characteristics of that attribute. Example: The entity teacher has the property like
teacher id, salary, age, etc.
 Relationship: Relationship tells how two attributes are related. Example: Student
studied in college.
Advantages of ER Model

 Simple: Conceptually ER Model is very easy to build. If we know the relationship


between the attributes and the entities we can easily build the ER Diagram for the
model.
 Effective Communication Tool: This model is used widely by the database
designers for communicating their ideas.
Disadvantages of ER Model

 No industry standard for notation: There is no industry standard for developing an


ER model. So one developer might use notations which are not understood by other
developers.
3. Hierarchical Model

In hierarchical model, data is organized into a tree like structure with each record is having
one parent record and many children. The main drawback of this model is that, it can have
only one to many relationships between nodes. Sample Hierarchical Model Diagram:

Advantages of Hierarchical Model

 It is very simple and fast to traverse through a tree-like structure.


 Any change in the parent node is automatically reflected in the child node so, the
integrity of data is maintained.
Disadvantages of Hierarchical Model

 Complex relationships are not supported.

If a parent node is deleted then the child node is automatically deleted.

4. Network Model – Network Model is same as hierarchical model except that it has
graph-like structure rather than a tree-based structure. Unlike hierarchical model,
this model allows each record to have more than one parent record.

Advantages of Network Model

 The data can be accessed faster as compared to the hierarchical model. This is
because the data is more related in the network model and there can be more than
one path to reach a particular node. So the data can be accessed in many ways.
 As there is a parent-child relationship so data integrity is present. Any change in
parent record is reflected in the child record.

5. Object-Oriented Data Model:


The real-world problems are more closely represented through the object-oriented
data model.

In this model, both the data and relationship are present in a single structure known
as an object. We can store audio, video, images, etc. in the database which was not possible
in the relational model (although you can store audio and video in relational database, it is
advised not to store in the relational database).

In this model, two are more objects are connected through links. We use this link to
relate one object to other objects.
2. Database System Architecture (OR) Database System Structure (OR) Components of
DBMS (OR) Architecture of database:

 A Database Management system is not always directly available for users and
applications to access and store data in it.
 A Database Management system can be centralised (all the data stored at one
location), decentralised (multiple copies of database at different locations)
or hierarchical, depending upon its architecture.
1-tier DBMS architecture also exist, this is when the database is directly available to the user
for using it to store data. Generally such a setup is used for local application development,
where programmers communicate directly with the database for quick response.
Database Architecture is logically of two types:

1. 2-tier DBMS architecture


2. 3-tier DBMS architecture

2-tier DBMS Architecture


2-tier DBMS architecture includes an Application layer between the user and the DBMS,
which is responsible to communicate the user's request to the database management system
and then send the response from the DBMS to the user.
An application interface known as ODBC (Open Database Connectivity) provides an API
that allow client side program to call the DBMS. Most DBMS vendors provide ODBC
drivers for their DBMS.
 It is an extension of the 2-tier architecture.
 In the 2-tier architecture, we have an application layer which can be accessed
programatically to perform various operations on the DBMS. The application
generally understands the Database Access Language and processes end users
requests to the DBMS.
 In 3-tier architecture, an additional Presentation or GUI Layer is added, which
provides a graphical user interface for the End user to interact with the DBMS.
 For the end user, the GUI layer is the Database System, and the end user has no idea
about the application layer and the DBMS system.
COMPONENTS OF DBMS
Database Users
Users are differentiated by the way they expect to interact with the system
• Application programmers
• Sophisticated users
• Naïve users
• Database Administrator
• Specialized users etc,.

Application programmers:

Professionals who write application programs and using these application


programs they interact with the database system

Sophisticated users:

These user interact with the database system without writing programs, But
they submit queries to retrieve the information

Specialized users:
Who write specialized database applications to interact with the database system.

Naïve users:

Interacts with the database system by invoking some application programs


that have been written previously by application programmers
Eg : people accessing database over the web

Database Administrator:

Coordinates all the activities of the database system; the database administrator has
a good understanding of the enterprise’s information resources and needs.

Schema definition

Access method definition

Schema and physical organization modification

Granting user authority to access the database

Monitoring performance
Query Processor:
Query processor is the module responsible for executing database queries.
The query processor receives as input queries in the form of SQL text, parses and optimizes
them, and completes their execution by employing specific data access methods and database
operator implementations.

1. DDL Interpreter:

It interprets the DDL statements and records the definitions in data dictionary.

2. DML Compiler: It translates the DML statements in a query language into an


evaluation plan consisting of low-level instructions that the query evaluation
understands. It also performs query optimization which actually picks up the lowest
cost evaluation plan from various alternatives.
3. Query Evaluation Engine: It executes the low level instruction compiled by the
DML compiler.

Storage Manager
The Storage Manager include these following components/modules
o Authorization Manager
o Transaction Manager
o File Manager
o Buffer Manager

Storage manager is a program module that provides the interface between the low-
level data stored in the database and the application programs and queries submitted
to the system.

The storage manager is responsible to the following tasks:

interaction with the file manager

efficient storing, retrieving and updating of data
Authorization Manager

Checks whether the user is an authorized person or not

Test the satisfaction of integrity constraints
Transaction Manager

 Responsible for concurrent transaction execution It ensures that the


database remains in a consistent state despite of the system failure

You might also like