14
Database System Concepts By Prof -Mohammad Ubaidullah Bokhari, DCS, AMU SOURCE: Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz , S. Sudarshan , Henry F. Korth + Freely Accessible Web Resources Slide 1-1 Database Schema Vs. Database State

Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

  • Upload
    others

  • View
    35

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

Database System Concepts

By Prof -Mohammad Ubaidullah Bokhari, DCS, AMU

SOURCE: Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz , S. Sudarshan , Henry F. Korth + Freely Accessible Web Resources

Slide 1-1

Database Schema Vs. Database State

Page 2: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

• Database Schema: The description of a database that Includes

descriptions of the database structure and the constraints that should

hold on the database.

• Database State: Refers to the content of a database at a moment in

time. Also called database instance or database snapshot.

Database Schema

Page 3: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

Database Schema Vs. Database State • Initial Database State: Refers to the database when it is loaded

• Valid State: A state that satisfies the structure and constraints of the

database.

• Distinction:

• Database schema changes very infrequently. The database state changes every time the database is updated.

• Four concepts:

• Schema

• Data Model

• Meta-data

Page 4: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

• Data Dictionary (system catalog) - the descriptions of the schema

constructs and constraints—also called the meta-data are stored in

data catalog.

Three-Schema Architecture • An Architecture, Proposed to achieve and visualize following

characteristics.

• Program-data independence: separate the user applications

from physical database.

• Support of multiple views of the data.

• Use of a catalog to store the database description (schema) so as

to make database self-describing.

Page 5: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

Three-Schema Architecture • Goal of the three-schema architecture, is to separate the user

applications from the physical database.

• In this architecture, schemas can be defined at three levels:

• Internal schema at the internal level.

• Describes physical storage structures and access paths. Typically

uses a physical data model.

• Conceptual schema at the conceptual level

• Describes the structure and constraints for the whole database.

• Conceptual schema hides the details of physical storage

structures and concentrates on describing entities, data types,

relationships, user operations, and constraints.

Page 6: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

• Usually, a representational data model is used to describe

conceptual schema.

Three-Schema Architecture(cont…) • External schemas at the external level

• Describes the various user views..

• It describes the part of the database that a particular user group

is interested in and hides the rest of the database from that user

group.

• Usually a high-level model is used here.

Page 7: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

Slid

Three - Schema Architecture(cont…)

Page 8: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

e 2- 7

Three-Schema Architecture(cont…) Mappings among schema levels are needed to transform requests

and data.

Programs refer to an external schema, and are mapped by the

DBMS to the internal schema for execution.

◦ External/conceptual mapping

◦ Conceptual/ internal mapping

Page 9: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

Data Independence • When a schema at a lower level is changed, only the mappings

between this schema and higher-level schemas need to be

changed in a DBMS that fully supports data independence. The

higher-level schemas themselves are unchanged. Hence, the

application programs need not be changed since they refer to the

external schemas.

• Logical Data Independence: The capacity to change the

conceptual schema without having to change the external

schemas and their application programs.

Page 10: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

• Physical Data Independence: The capacity to change the

internal schema without having to change the conceptual

schema.

Hence, the external schemas need not be changed as well.

DBMS Languages • Data Definition Language (DDL): Used by the DBA and database

designers to specify the conceptual schema of a database.

• Data Manipulation Language (DML): Used to specify database

retrievals and updates.

• Data Control Language(DCL): Used to control access to data

stored in a database. GRANT, REVOKE etc.

Page 11: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz

• In practice, these are not separate languages; instead they simply

form parts of a single database language, such as the widely used

SQL language.

• Other languages: SDL, VDL.

Page 12: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz
Page 13: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz
Page 14: Database System Concepts · Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B. Navathe + Database System Concepts (English) 6th Edition by Abraham Silberschatz