W2. Database Environment
W2. Database Environment
W2. Database Environment
Database Environment
• Conceptual Level
– Community view of the database.
– Describes what data is stored in database and relationships
among the data.
– It is a complete view of the data requirements of the
organization that is independent of any storage considerations.
ANSI-SPARC Three-Level Architecture
• Internal Level
– Physical representation of the database on the computer.
– Describes how the data is stored in the database.
– It covers the data structures and file organizations used to store
data on storage devices.
– It interfaces with the operating system access methods to place
the data on the storage devices, build the indexes, retrieve the
data, and so on.
ANSI-SPARC Three-Level Architecture
Differences between Three Levels of ANSI-SPARC Architecture
ANSI-SPARC Three-Level Architecture
Objectives of Three-Level Architecture
• All users should be able to access same data.
• A user’s view is immune to changes made in other views.
• Users should not need to know physical database storage details.
• DBA should be able to change database storage structures without
affecting the users’ views.
• Internal structure of database should be unaffected by changes to
physical aspects of storage.
• DBA should be able to change conceptual structure of database
without affecting all users.
Data Independence
• Logical Data Independence
– Refers to immunity of external schemas to changes in conceptual
schema.
– Conceptual schema changes (e.g. addition/removal of entities).
– Should not require changes to external schema or rewrites of
application programs.
Data Independence
• Physical Data Independence
– Refers to immunity of conceptual schema to changes in the
internal schema.
– Internal schema changes (e.g. using different file organizations,
storage structures/devices).
– Should not require change to conceptual or external schemas.
Data Independence and the ANSI-SPARC Three-Level Architecture
Database Languages
• A data sublanguage consists of two main parts: a DDL and a DML.
• They do not include constructs for all computing needs which are provided by
the high-level programming languages.
• Non-Procedural DML
– A language that allows the user to state what data is needed rather than
how it is to be retrieved.
1:N
M:N
Network Data Model
• This is the enhanced version of hierarchical data model
• It helps to address M:N relationship.
• Any child in the tree can have multiple parents here.
• Makes the accessibility to any data easier, complex data can be retrieved
easily and quickly
• If there is any requirement for the changes to the entities, it requires
entire changes to the database
Network Data Model
• Disadvantages include:
– Significant network traffic.
– Copy of DBMS on each workstation.
– Concurrency, recovery and integrity control more complex.
File-Server Architecture
Traditional Two-Tier Client-Server
• Client (tier 1) manages user interface and runs applications.
• Server (tier 2) holds database and DBMS.
• Client process requires some resource, and a server provides the resource.
• Alternative client-server topologies
• Advantages include:
– wider access to existing databases;
– increased performance;
– possible reduction in hardware costs;
– reduction in communication costs;
– increased consistency.
Traditional Two-Tier Client-Server
Traditional Two-Tier Client-Server
The operations of client and server are;
Traditional Two-Tier Client-Server
Three-Tier Client-Server
• Client side presented two problems preventing true scalability:
– ‘Fat’ client, requiring considerable resources on client’s computer to run
effectively.
– Significant client side administration overhead.