1 - 4 - Schema Arch
1 - 4 - Schema Arch
architecture
Schema
The overall design of a database is called schema.
A database schema is the skeleton structure of the
database.
It represents the logical view of the entire database.
A schema contains schema objects like table, foreign
key, primary key, views, columns, data types, stored
procedure, etc.
Schema will not be changed frequently.
It does not show the data in the database.
Contd…
A database schema can be represented by using the visual
diagram.
That diagram shows the database objects and relationship with
each other.
A database schema is designed by the database designers to help
programmers whose software will interact with the database.
The process of database creation is called data modeling.
A schema diagram can display only some aspects of a schema like
the name of record type, data type, and constraints. Other
aspects can't be specified through the schema diagram.
Schema
Person
Physical schema −
Logical schema −
External −
It is the highest level of a schema which defines the views for end
users.
Instance
Example” We take two tables emp table and At a moment, what is the value of the
dept table. Emp Id Dept database schema is called instance. At t=8
Name
A.M Empid name salary did
Dept_id
Salary dname 1 A 5000 d1
dept 2 B 2000 d2
Emp and dept both called
as schemas It gives database definition. Empid 1 and 2 are called as Instance 1
This corresponds to the variable declaration The value of the variable in a program at a
of a programming language. point in time corresponds to an instance of
the database schema.
Architecture of DBMS
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.
Types of DBMS 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.
No network connection is required to perform action on
database.
The 1-Tier architecture is used for development of the local
application, where programmers can directly communicate
with the database for the quick response.
Contd…
The 1-Tier architecture is used-
Disadvantage-
Scalability
i.e. it gives poor performance where there are
large number of users.
Less secure as client can access the server directly.
2-Tier Architecture
3-Tier Architecture
The 3-Tier architecture contains another layer of
Application Server 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 and then the query processing and
transaction management takes place.
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.
Contd…
The 3-Tier architecture is used in case of large web
application.
It is the most popular DBMS architecture.
Advantages-
Enhanced scalability due to distributed deployment of
application server. Individual connection need not be made
between client and server.
Data Integrity is maintained. Since there is a middle layer
between client and server, data corruption can be
avoided/removed.
Security is improved. Reduce access to unauthorized data.
Contd…
Disadvantages-
Internal view
Conceptual Level
The conceptual schema describes the design of a
database at the conceptual level. Conceptual level is
also known as logical level.
The conceptual schema describes the structure of the
whole database.
The conceptual level describes what data are to be
stored in the database and also describes what
relationship exists among those data.
In the conceptual level, internal details such as an
implementation of the data structure are hidden.
Programmers and database administrators work at this
level.
Contd…
Global view
3. External Level