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