DBMS Unit - I
DBMS Unit - I
Data Models
Data model: a collection of conceptual tools for describing data, data relationships, data semantics, and
consistency constraints.
The data models can be classified into four different categories:
1. Relational Model:
The relational model uses a collection of tables (relations) to represent both data and the
relationships among those data.
Each table has multiple columns and rows. Each column has a unique name.
Each table contains records of a particular type. Each record type defines a fixed number of
fields, or attributes. The columns of the table correspond to the attributes of the record type.
The relational model is an example of a record-based model because the database is structured in
fixed-format records of several types.
The relational data model is the most widely used data model, and a vast majority of current
database systems are based on the relational model.
Columns (Attributes) ROLL_NO NAME ADDRESS AGE
1 RAM DELHI 18
Table (relation)
Rows (records/tuple/entity) 2 RAMESH GURGAON 18
3 SUJIT ROHTAK 20
Student Table (Relation)
2. Entity-Relationship Model:
The entity-relationship (E-R) data model uses a collection of basic objects, called entities, and
relationships among these objects.
An entity is a “thing” or “object” in the real world that is distinguishable from other objects.
The entity-relationship model is widely used in database design.
4
A19PC1CS04 UNIT - I DBMS
5
A19PC1CS04 UNIT - I DBMS
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.
12
A19PC1CS04 UNIT - I DBMS
The goal of the three-schema architecture is to separate the user applications from the physical
database.
In this architecture, schemas can be defined at the following three levels:
1. The internal level has an internal schema, which is uses physical data model and describes the
complete details of data storage and access paths for the database.
2. The conceptual level has a conceptual schema, which describes the structure of the whole database
for a community of users.
The conceptual schema hides the details of physical storage structures and concentrates on
describing entities, data types, relationships, user operations, and constraints.
This implementation conceptual schema is often based on a conceptual schema design in a
high-level data model.
3. The external or view level includes a number of external schemas or user views.
Each external schema describes the part of the database that a particular user group is interested
in and hides the rest of the database from that user group.
Each external schema is typically implemented using a representational data model, possibly
based on an external schema design in a high-level data model.
The DBMS must transform a request specified on an external schema into a request against the
conceptual schema, and then into a request on the internal schema for processing over the stored
database.
If the request is database retrieval, the data extracted from the stored database must be reformatted to
match the user’s external view.
The processes of transforming requests and results between levels are called mappings.
13