Three Level Architecture
Three Level Architecture
2
Database Architecture
• The DBMS design depends upon its architecture.
• DBMS architecture depends upon how users are connected to the database to get
their request done.
• 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.
Database Architecture (cont.)
• A Database Management system can be
• centralized(all the data stored at one location),
• decentralized(multiple copies of database at different locations)
• hierarchical, depending upon its architecture.
5
File-Server Architecture
• File server
6
File-Server Architecture
• In a file-server environment, the processing is distributed about the network, typically
a local area network (LAN).
The file-server holds the files required by the applications and the DBMS. However, the
applications and the DBMS run on each workstation, requesting files from the file-server
when necessary
7
8
File-Server Architecture
• As the file-server has no knowledge of SQL, the DBMS must request the files
corresponding to the Branch and Staff relations from the file-server, rather than just
the staff names that satisfy the query.
• The file-server architecture, therefore, has three main disadvantages:
• (1) There is a large amount of network traffic.
• (2) A full copy of the DBMS is required on each workstation.
• (3) Concurrency, recovery, and integrity control are more complex, because there can
be multiple DBMSs accessing the same files.
9
Types of DBMS Architecture
DBMS
Architecture
• ADVANTAGES:
• Easy to optimize performance.
• No context switching
• DISADVANTAGES:
• Not scalable
• Hard to modify.
14
2-Tier Architecture
16
2-Tier Architecture
• In two-tier architecture, the Database system is present at the server
machine and the DBMS application is present at the client machine,
these two machines are connected with each other through a reliable
network.
• Whenever client machine makes a request to access the database
present at server using a query language like sql, the server perform the
request on the database and returns the result back to the client.
• The server side is responsible to provide the functionalities like: query processing and
transaction management.
17
2-Tier Architecture
3-Tier Architecture
27
Database Schema
• The data which is stored in the database at a particular moment of time is called an
instance of the database.
• 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.
• 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.
28
Database Schema
• 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.
• The database schema changes very infrequently.
• The database state changes every time the database is updated.
29
ANSI – 3 Level Architecture
30
DBMS Schemas
DBMS Schemas & Architecture
Three-Schema Architecture (cont.)
• Defines DBMS schemas at three levels:
– Internal schema/ at the internal level to describe physical storage
structures and access paths (e.g indexes).
– it is expressed how data is stored in blocks of storage.
• Typically uses a physical data model.
– Conceptual schema at the conceptual level to describe the structure
and constraints for the whole database for a community of users.
Uses an implementation (or a conceptual) data model.
– External schemas at the external level to describe the various user
views.
• Usually uses the same data model as the conceptual schema.
Three schema Architecture
• External level: The way users perceive the data. External External
View 1 View 2
39
Database Architecture
Conceptual or Logical View: (Example)
40
Database Architecture
Internal: (Example)
41
42
Continued…
continue…
Sales Officer Inventory Controller
View 1 View 2
External Item_Name Item_Name
Level Price Stock
Conceptual
Conceptual Item_Number Character (6)
Item_Name Character(30)
Level Price Numeric(5,2)
Stock Numeric(4)
Physical
Stored_Item Length=50
Physical Item # Type = Byte(6), offset = 0, Index = Ix
Name Type = Byte(30), offset = 6
Level Price Type = Byte(8), offset = 36
Stock Type = Byte(4), offset = 44
Schemas and Instances
• Database Schema: The overall description of the database is called the database
schema. Similar to types and variables in programming languages.
1. External Schema: At the highest level, we have multiple external schemas that correspond to
different views of the data.
2. Conceptual Schema: the overall logical structure of the database, describes all the entities,
attributes, and relationships together with integrity constraints.
Example: The database consists of information about a set of customers and accounts in a bank
and the relationship between them
3. Internal schema: the overall physical structure of the database, containing the definitions of
stored records, the methods of representation, the data fields, and the indexes and storage structures
used.
• http://cezeife.myweb.cs.uwindsor.ca/courses/60-315/notes/ch2.pdf
• https://www.slideshare.net/philipsinter/database-system-38795643
51