Professional Documents
Culture Documents
Database Systems: University of Gujrat
Database Systems: University of Gujrat
UNIVERSITY OF GUJRAT
Database Environment
Software interact
End users Application Programmers
Application Programs
Data
develop What to get Database DBMS maintain Administrators How to get design
Database Designers
Database
Users
Database Terminologies
Database Schema: The description of a database. Includes descriptions of the database structure and the constraints that should hold on the database. The database schema changes very infrequently. Database Instance: The actual data stored in a database at a particular moment in time. Also called database state (or occurrence).
Database Terminologies
Database State: Refers to the content of a database at a moment in time. The database state changes every time the database is updated. Initial Database State: Refers to the database when it is loaded Valid State: A state that satisfies the structure and constraints of the database. Schema Diagram: A diagrammatic display of (some aspects of) a database schema
4
ANSI Architecture
User 1 User 2 External View 1 User 3 External View 2
External Schemas External/Conceptual Mappings Conceptual Schema Conceptual/Internal Mapping Internal Schema
Conceptual View
DBA
Stored Data
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.
Each user should be able to access the same data, but have a different customized view of data. Each user should be able to change the way he or she views the data, and this change should not affect other users. User should not have to deal directly with physical database storage details. The internal structure of the database should be unaffected by the changes to the physical aspects of storage, such as change over to a new storage devices.
Three-Schema Architecture
Internal schema at the internal level to describe physical storage structures and access paths. 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 a conceptual or an implementation data model. External schemas at the external level to describe the various user views. Usually uses the same data model as the conceptual level.
8
Three-Schema Architecture
Three-Schema Architecture
10
External Level
Calculated Data: That is not actually stored in the database but is created when needed e.g. age
DBMS uses external views to create users interface for different users which is both the facility and barrier.
External Level
First Name: Rana Last Name: Aslam Date of Birth: 12 Sep, 1970
User A
Entire information structure of the database. Also called The Community view of data The definitions of conceptual view of total database contents All entities, attributes and their relationships are represented. Representing data and constraints on data Contains information about the security and integrity information Relatively constant: designed with the present as well as future needs
of an organization.
13
DepId
D001
D005
Internal View
A low level representation of entire database Although these are at same level but Internal View Internal Record: a single stored record Does not just contain what we see at the conceptual level Physical View Actual Data (on the disk) binary format. Use OS to store the Data
15
Internal View
First Name: Rana Last Name: Aslam Date of Birth: 12 Sep, 1970
Name Rana Aslam Marya Wasti DoB 12/09/70 29/02/80 Deps
DepId
5
0
D001
D005
0110011010011100101001010100101010010101..
Three-Schema Architecture
Mappings among schema levels are needed to transform requirements and data. Programs refer to an external schema, and are mapped by the DBMS to the internal schema for execution.
17
Mappings
External to logical model Specifies mapping between objects in the external view to those in the logical model Logical to Physical Specifies mapping between objects in the logical model to those in the physical model-data independence
18
Three-Schema Architecture
19