• No results found

DATABASE DESIGN I -

N/A
N/A
Protected

Academic year: 2022

Share "DATABASE DESIGN I -"

Copied!
58
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)
(28)
(29)
(30)
(31)
(32)
(33)
(34)
(35)

2013-01-21 1 Silvia Stefanova, UDBL - IT - UU

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

(36)

2013-01-21 2 Silvia Stefanova, UDBL - IT - UU

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

(37)

2013-01-21 3 Silvia Stefanova, UDBL - IT - UU

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

(38)

2013-01-21 4 Silvia Stefanova, UDBL - IT - UU

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

(39)

2013-01-21 5 Silvia Stefanova, UDBL - IT - UU

Data Model ???

(40)

2013-01-21 6 Silvia Stefanova, UDBL - IT - UU

Data Model

• Data Model: A collection of concepts that can be used to describe the structure of database

• Data Model consists of

oSet of concepts: data types, relationships, constraints

oSet 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

(41)

2013-01-21 7 Silvia Stefanova, UDBL - IT - UU

Categories of data models

• High-level (conceptual) : close to how users perceive data

oER (Entity-Relationship) model

• Low-level (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)

(42)

2013-01-21 8 Silvia Stefanova, UDBL - IT - UU

What is the difference between

database and database description ?

(43)

2013-01-21 9 Silvia Stefanova, UDBL - IT - UU

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.

oValid state: satisfies the structure and constraints in the database schema

oMeta-data: description of the schema (data about data)

(44)

2013-01-21 10 Silvia Stefanova, UDBL - IT - UU

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

(45)

2013-01-21 11 Silvia Stefanova, UDBL - IT - UU

Three-schema Architecture

Conceptual schema

Database instance Internal level Conceptual level

External level End users

view1

view2

viewn

Internal schema

(46)

2013-01-21 12 Silvia Stefanova, UDBL - IT - UU

Three-schema Architecture

• Internal level

oDescribed the physical storage structure of the database oUses a physical data model (internal schema)

• Conceptual level

oDescribes the structure of the whole database for community of users; describes entities, data types, relationships, user

operations

oUses a representation data model

• External (view) level

oDescribes the part of the database that a particular user group is interested in; hides the rest from that group

oHas a number of external schemas

(47)

2013-01-21 13 Silvia Stefanova, UDBL - IT - UU

What is the goal with

the three-schema architecture?

(48)

2013-01-21 14 Silvia Stefanova, UDBL - IT - UU

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

(49)

2013-01-21 15 Silvia Stefanova, UDBL - IT - UU

Data Independence

• Logical Independence: The capacity to change the conceptual schema without having to change the external schema

oExample: Add another field to a conceptual schema

• Physical Independence: The capacity to change the internal schema without having to change the

conceptual schema

oExample: Put an access path(index) to reorganize the files

(50)

2013-01-21 16 Silvia Stefanova, UDBL - IT - UU

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

(51)

2013-01-21 17 Silvia Stefanova, UDBL - IT - UU

Database Languages

• Database Language: Generic term for a class of

languages used for defining, communicating with or manipulating a database.

• Storage Definition Language (SDL) – to specify internal schema

• Data Definition Language (DDL) – to specify conceptual schema

• View Definition Language (VDL) – to specify user views

• Data Manipulation Language (DML) – to manipulate the data: insert, delete , update)

(52)

2013-01-21 18 Silvia Stefanova, UDBL - IT - UU

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

(53)

2013-01-21 19 Silvia Stefanova, UDBL - IT - UU

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

(54)

2013-01-21 20 Silvia Stefanova, UDBL - IT - UU

Classification of DBMS

• Criteria data model:

oRelational DBMS

oObject-oriented DBMS oObject-relational DBMS oGraph DBMS

• Criteria number of sites on which database is distributed

oCentralized DBMS oDistributed DBMS

(55)

2013-01-21 21 Silvia Stefanova, UDBL - IT - UU

Classification of DBMS

• Criteria number of users:

oSingle-user DBMS oMulti-user DBMS

• Criteria purpose

oGeneral purpose DBMS oSpecial-purpose DBMS

(56)

2013-01-21 22 Silvia Stefanova, UDBL - IT - UU

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

(57)

2013-01-21 23 Silvia Stefanova, UDBL - IT - UU

Summary

• Data model

• Database schema, database instance

• Data independence

(58)

2013-01-21 24 Silvia Stefanova, UDBL - IT - UU

Components of a DBMS

(Figure 2.3 Elmasri/Navathe)

References

Related documents

For example, a surface recording electrode (Figure 13 a, b) must be able to detect nerve electrical activity through the mass of tissue that separates the signal source from

Table 4-2 Query 1 Response Time Values of different entries for Traditional and Cloud Database in milliseconds

Their latest reported highway, segment, direction, position, velocity and update time are stored together with the current balance (sum of toll charges) and the toll to be

To search for a specific customer’s tires the user simply types in the customer registration number in the field ”Reg Nr” in the search box up in the right corner (figure 4.6) and

In order to improve the suitability of the chosen data model and to make the choice quicker, a method that enhances the decision in these ways should be created.. Hence, the

Amazon RDS database instances are basically instances of MySQL, Microsoft SQL server or Oracle database running on an Amazon’s EC2 platform. Since users do not have access to the

The professor we interviewed, who is also a candidate for an administrator, has specific requirements regarding to the search functionality, and to be able to

This document provides a description of principles of scale construction and procedures for use. It also provides examples of commonly used scales across environmental components.