DATABASE DESIGN I - 1DL300 Spring 2013 An Introductory Course on Database Systems http://www.it.uu.se/edu/course/homepage/dbastekn/vt13/ Uppsala Database Laboratory Department of Information Technology, Uppsala University, Uppsala, Sweden Silvia Stefanova, UDBL - IT - UU 2013-01-21 1
Introduction to Database Technology Elmasri/Navathe ch 1-2 Padron-McCarthy/Risch ch 1 Sobhan Badiozamany Silvia Stefanova Department of Information Technology Uppsala University, Uppsala, Sweden Silvia Stefanova, UDBL - IT - UU 2013-01-21 2
Outline 1. Data Model, Database Schema • Categories of data models • Database schemas and instances 2. Data Independence • Three-schema architecture • Logical independence • Physical independence 3. Database Languages 4. Classification of DBMS 5. To Summarize Silvia Stefanova, UDBL - IT - UU 2013-01-21 3
Outline 1. Data Model, Database Schema • Data models, categories of data models • Database schemas and instances 2. Data Independence • Three-schema architecture • Logical independence • Physical independence 3. Database Languages 4. Classification of DBMS 5. To Summarize Silvia Stefanova, UDBL - IT - UU 2013-01-21 4
Data Model ??? Silvia Stefanova, UDBL - IT - UU 2013-01-21 5
Data Model • Data Model : A collection of concepts that can be used to describe the structure of database • Data Model consists of o Set of concepts: data types, relationships, constraints o Set of basic operations for specifying retrievals and updates on the database • Every database has a data model which makes it possible to “hide” the physical representation of data Silvia Stefanova, UDBL - IT - UU 2013-01-21 6
Categories of data models • High-level (conceptual) : close to how users perceive data o ER (Entity-Relationship) model • Low-leve l (physical): details of how data is stored on computers • Representational (implementation): in between conceptual and physical o Relational (ORACLE, DB2, SQL Server, MySQL, Mimer) o Object-oriented (ObjectStore, Objectivity, Versant, Poet) o Object-relational (Informix, Odapter, DB2) o Hierarchical (IMS) o Network (IDMS) Silvia Stefanova, UDBL - IT - UU 2013-01-21 7
What is the difference between database and database description ? Silvia Stefanova, UDBL - IT - UU 2013-01-21 8
Database Schema and Instances • Database schema: the database description specified during the database design and not expected to change • The actual data in the database may change frequently • Database instance (state): the data in the database at a particular moment. Every change of data creates a new instance of the database. o Valid state: satisfies the structure and constraints in the database schema o Meta-data: description of the schema (data about data) Silvia Stefanova, UDBL - IT - UU 2013-01-21 9
Outline 1. Data Model, Database Schema • Categories of data models • Database schemas and instances 2. Data Independence • Three-schema architecture • Logical independence • Physical independence 3. Database Languages 4. Classification of DBMS 5. To Summarize Silvia Stefanova, UDBL - IT - UU 2013-01-21 10
Three-schema Architecture End users view 2 … External level … … view 1 view n Conceptual schema Conceptual level Internal schema Internal level Database instance Silvia Stefanova, UDBL - IT - UU 2013-01-21 11
Three-schema Architecture • Internal level o Described the physical storage structure of the database o Uses a physical data model (internal schema) • Conceptual level o Describes the structure of the whole database for community of users; describes entities, data types, relationships, user operations o Uses a representation data model • External (view) level o Describes the part of the database that a particular user group is interested in; hides the rest from that group o Has a number of external schemas Silvia Stefanova, UDBL - IT - UU 2013-01-21 12
What is the goal with the three-schema architecture? Silvia Stefanova, UDBL - IT - UU 2013-01-21 13
Data Independence • Data Independence: The capacity to change the schema at one level of a database system without having to change at the next higher level Silvia Stefanova, UDBL - IT - UU 2013-01-21 14
Data Independence • Logical Independence: The capacity to change the conceptual schema without having to change the external schema o Example: Add another field to a conceptual schema • Physical Independence: The capacity to change the internal schema without having to change the conceptual schema o Example: Put an access path(index) to reorganize the files Silvia Stefanova, UDBL - IT - UU 2013-01-21 15
Outline 1. Data Model, Database Schema • Categories of data models • Database schemas and instances 2. Data Independence • Three-schema architecture • Logical independence • Physical independence 3. Database Languages 4. Classification of DBMS 5. To Summarize Silvia Stefanova, UDBL - IT - UU 2013-01-21 16
Database Languages • Database Language: Generic term for a class of languages used for defining, communicating with or manipulating a database. • S torage D efinition L anguage (SDL) – to specify internal schema • D ata D efinition L anguage (DDL) – to specify conceptual schema • V iew D efinition L anguage (VDL) – to specify user views • D ata M anipulation L anguage (DML) – to manipulate the data: insert, delete , update) Silvia Stefanova, UDBL - IT - UU 2013-01-21 17
Database Languages • In the DDL the database administrator define the internal and conceptual schema and in this manner the database is designed. Subsequent modifications in the schema design is also made in DDL. • The DML used by DB users and application programs retrieve, add, remove, or alter the information in the database. • SQL represents a combination of DDL, VDL and DML Silvia Stefanova, UDBL - IT - UU 2013-01-21 18
Outline 1. Data Model, Database Schema • Categories of data models • Database schemas and instances 2. Data Independence • Three-schema architecture • Logical independence • Physical independence 3. Database Languages 4. Classification of DBMS 5. To Summarize Silvia Stefanova, UDBL - IT - UU 2013-01-21 19
Classification of DBMS • Criteria data model : o Relational DBMS o Object-oriented DBMS o Object-relational DBMS o Graph DBMS • Criteria number of sites on which database is distributed o Centralized DBMS o Distributed DBMS Silvia Stefanova, UDBL - IT - UU 2013-01-21 20
Classification of DBMS • Criteria number of users : o Single-user DBMS o Multi-user DBMS • Criteria purpose o General purpose DBMS o Special-purpose DBMS Silvia Stefanova, UDBL - IT - UU 2013-01-21 21
Outline 1. Data Model, Database Schema • Categories of data models • Database schemas and instances 2. Data Independence • Three-schema architecture • Logical independence • Physical independence 3. Database Languages 4. Classification of DBMS 5. To Summarize Silvia Stefanova, UDBL - IT - UU 2013-01-21 22
Summary • Data model • Database schema, database instance • Data independence Silvia Stefanova, UDBL - IT - UU 2013-01-21 23
Components of a DBMS (Figure 2.3 Elmasri/Navathe) Silvia Stefanova, UDBL - IT - UU 2013-01-21 24
Recommend
More recommend