4 DBMS Architecture
4 DBMS Architecture
1-Tier Architecture
o In this architecture, the database is directly available to the user. It
means the user can directly sit on the DBMS and uses it.
o Any changes done here will directly be done on the database itself.
It doesn't provide a handy tool for end users.
o 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
3-Tier Architecture
Database Schema
o A database schema is the logical representation of a database,
which shows how the data is stored logically in the entire database.
It contains list of attributes and instruction that informs the
database engine that how the data is organized and how the
elements are related to each other.
o A database schema contains schema objects that may
include tables, fields, packages, views, relationships, primary
key, foreign key,
o In actual, the data is physically stored in files that may be in
unstructured form, but to retrieve it and use it, we need to put it in a
structured form. To do this, a database schema is used. It provides
knowledge about how the data is organized in a database and how
it is associated with other data.
o The schema does not physically contain the data itself;
instead, it gives information about the shape of data and
how it can be related to other tables or models.
o A database schema object includes the following:
o Consistent formatting for all data entries.
o Database objects and unique keys for all data entries.
o Tables with multiple columns, and each column contains its
name and datatype.
o The complexity & the size of the schema vary as per the size of the
project. It helps developers to easily manage and structure the
database before coding it.
o The given diagram is an example of a database schema. It contains
three tables, their data types. This also represents the relationships
between the tables and primary keys as well as foreign keys.
Types of Database Schema
The database schema is divided into three types, which are:
1. Logical Schema
2. Physical Schema
3. View Schema
1. Physical Database Schema
A physical database schema specifies how the data is stored physically on
a storage system or disk storage in the form of Files and Indices.
Designing a database at the physical level is called a physical schema.
ADVERTISEMENT
Various tools are used to create a logical database schema, and these
tools demonstrate the relationships between the component of your data;
this process is called ER modelling.
In the given example, the Ids are given in each circle, and these Ids are
primary key & foreign keys.
The Foreign key is used as the primary key for other tables. The FK
represent the foreign key in the diagram. It relates one table to another
table.
3. View Schema
The view level design of a database is known as view schema. This
schema generally describes the end-user interaction with the database
systems.
It contains both primary & secondary It also contains both primary &
Keys. secondary keys.
It contains the column names and their It does not contain any column
data types. name or datatype.
Database Instance
The database schema is defined before the actual database is
created, after the database is operational, it is very difficult to
modify the schema because the schema represents the
fundamental structure of the database. Database instance does not
hold any information related to the saved data in database.
Therefore database instance represents the data and information
that is currently stored in the database at a specific point in time.
Both instances and schemas are related to and impact each other through
the DBMS. DBMS ensures that every database instance complies with the
constraints imposed by the database designers in the database schema.
Data Independence
o Data independence can be explained using the three-schema
architecture.
o Data independence refers characteristic of being able to modify the
schema at one level of the database system without altering the
schema at the next higher level.