Information Systems An Overview of Database Management Temur Kutsia - - PowerPoint PPT Presentation

information systems
SMART_READER_LITE
LIVE PREVIEW

Information Systems An Overview of Database Management Temur Kutsia - - PowerPoint PPT Presentation

Information Systems An Overview of Database Management Temur Kutsia Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria kutsia@risc.uni-linz.ac.at Outline Introduction What Are Database Systems? What Is a


slide-1
SLIDE 1

Information Systems

An Overview of Database Management Temur Kutsia

Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria kutsia@risc.uni-linz.ac.at

slide-2
SLIDE 2

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-3
SLIDE 3

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-4
SLIDE 4

Introduction

Goal of if this lecture:

◮ Explain what a database system is and why database

systems are desirable.

◮ Briefly discuss the difference between relational systems

and others.

slide-5
SLIDE 5

Introduction

◮ Database system: a computerized record-keeping system.

slide-6
SLIDE 6

Introduction

◮ Database system: a computerized record-keeping system. ◮ Database: a repository or a container for a collection of

computerized data files.

slide-7
SLIDE 7

Introduction

◮ Database system: a computerized record-keeping system. ◮ Database: a repository or a container for a collection of

computerized data files.

◮ Operations on databases:

◮ Adding new files to the database ◮ Inserting data into existing files ◮ Retrieving data from existing files ◮ Deleting data from existing files ◮ Changing data in existing files ◮ Removing existing files from the database ◮ etc.

slide-8
SLIDE 8

Introduction

Example (The Wine Cellar Database)

BIN# WINE PRODUCER YEAR BOTTLES READY 2 Chardonnay Buena Vista 2001 1 2003 6 Chardonnay Simi 2000 4 2000 12

  • Joh. Riesling

Jekel 2002 1 2003 21 Fumè Blanc

  • Ch. St. Jean

2002 4 2003 43

  • Cab. Sauv.

Windsor 1995 12 2004 51 Pinot Noir Fetzer 1997 3 2004 58 Merlot Clos du Bois 1998 9 2004 File CELLAR

slide-9
SLIDE 9

Introduction

Example (The Wine Cellar Database)

BIN# WINE PRODUCER YEAR BOTTLES READY 2 Chardonnay Buena Vista 2001 1 2003 6 Chardonnay Simi 2000 4 2000 12

  • Joh. Riesling

Jekel 2002 1 2003 21 Fumè Blanc

  • Ch. St. Jean

2002 4 2003 43

  • Cab. Sauv.

Windsor 1995 12 2004 51 Pinot Noir Fetzer 1997 3 2004 58 Merlot Clos du Bois 1998 9 2004 File CELLAR

Retrieval:

SELECT WINE, BIN#, PRODUCER FROM CELLAR WHERE READY = 2004 ; WINE BIN# PRODUCER

  • Cab. Sauv.

43 Windsor Pinot Noir 51 Fetzer Merlot 58 Clos du Bois

slide-10
SLIDE 10

Introduction

Example (The Wine Cellar Database)

BIN# WINE PRODUCER YEAR BOTTLES READY 2 Chardonnay Buena Vista 2001 1 2003 6 Chardonnay Simi 2000 4 2000 12

  • Joh. Riesling

Jekel 2002 1 2003 21 Fumè Blanc

  • Ch. St. Jean

2002 4 2003 43

  • Cab. Sauv.

Windsor 1995 12 2004 51 Pinot Noir Fetzer 1997 3 2004 58 Merlot Clos du Bois 1998 9 2004 File CELLAR

Inserting new data:

INSERT INTO CELLAR ( BIN#, WINE, PRODUCER, YEAR, BOTTLES, READY ) VALUES ( 53, ’Pinot Noir’, ’Saintsbury’, 2001, 6, 2005 ) ;

slide-11
SLIDE 11

Introduction

Example (The Wine Cellar Database)

BIN# WINE PRODUCER YEAR BOTTLES READY 2 Chardonnay Buena Vista 2001 1 2003 6 Chardonnay Simi 2000 4 2000 12

  • Joh. Riesling

Jekel 2002 1 2003 21 Fumè Blanc

  • Ch. St. Jean

2002 4 2003 43

  • Cab. Sauv.

Windsor 1995 12 2004 51 Pinot Noir Fetzer 1997 3 2004 58 Merlot Clos du Bois 1998 9 2004 File CELLAR

Deleting existing data:

DELETE FROM CELLAR WHERE BIN# = 2 ;

slide-12
SLIDE 12

Introduction

Example (The Wine Cellar Database)

BIN# WINE PRODUCER YEAR BOTTLES READY 2 Chardonnay Buena Vista 2001 1 2003 6 Chardonnay Simi 2000 4 2000 12

  • Joh. Riesling

Jekel 2002 1 2003 21 Fumè Blanc

  • Ch. St. Jean

2002 4 2003 43

  • Cab. Sauv.

Windsor 1995 12 2004 51 Pinot Noir Fetzer 1997 3 2004 58 Merlot Clos du Bois 1998 9 2004 File CELLAR

Changing existing data:

UPDATE CELLAR SET BOTTLES = 4 WHERE BIN# = 43 ;

slide-13
SLIDE 13

Introduction

◮ SELECT, INSERT, DELETE, UPDATE are called

statements, commands, or operators.

slide-14
SLIDE 14

Introduction

◮ SELECT, INSERT, DELETE, UPDATE are called

statements, commands, or operators.

◮ In the previous example they are expressed in a language

called SQL.

slide-15
SLIDE 15

Introduction

◮ SELECT, INSERT, DELETE, UPDATE are called

statements, commands, or operators.

◮ In the previous example they are expressed in a language

called SQL.

◮ The Term update sometimes refers to the three operators:

INSERT, DELETE, UPDATE. Do not confuse!

slide-16
SLIDE 16

Introduction

◮ SELECT, INSERT, DELETE, UPDATE are called

statements, commands, or operators.

◮ In the previous example they are expressed in a language

called SQL.

◮ The Term update sometimes refers to the three operators:

INSERT, DELETE, UPDATE. Do not confuse!

◮ Terminology. The same things are referred differently in

different contexts:

◮ Files, records, fields (when talking about database systems

in general).

◮ Tables, rows, columns (when talking about SQL systems). ◮ Relations, tuples, attributes (in more formal discussions).

slide-17
SLIDE 17

Introduction

◮ In the CELLAR table the columns WINE and PRODUCER

contain character-string data.

slide-18
SLIDE 18

Introduction

◮ In the CELLAR table the columns WINE and PRODUCER

contain character-string data.

◮ All other columns contain integer data.

slide-19
SLIDE 19

Introduction

◮ In the CELLAR table the columns WINE and PRODUCER

contain character-string data.

◮ All other columns contain integer data. ◮ However, columns may contain data of arbitrary complexity.

slide-20
SLIDE 20

Introduction

◮ In the CELLAR table the columns WINE and PRODUCER

contain character-string data.

◮ All other columns contain integer data. ◮ However, columns may contain data of arbitrary complexity. ◮ We might extend the CELLAR table to include additional

columns:

◮ LABEL (photo of the bottle label). ◮ REVIEW (review text from some wine magazine). ◮ MAP (showing where the wine comes from). ◮ AUDIO (recording containing our own tasting notes). ◮ etc.

slide-21
SLIDE 21

Introduction

◮ In the CELLAR table the columns WINE and PRODUCER

contain character-string data.

◮ All other columns contain integer data. ◮ However, columns may contain data of arbitrary complexity. ◮ We might extend the CELLAR table to include additional

columns:

◮ LABEL (photo of the bottle label). ◮ REVIEW (review text from some wine magazine). ◮ MAP (showing where the wine comes from). ◮ AUDIO (recording containing our own tasting notes). ◮ etc.

◮ Column data types.

slide-22
SLIDE 22

Introduction

◮ Column BIN# constitutes the primary key for the table

CELLAR.

slide-23
SLIDE 23

Introduction

◮ Column BIN# constitutes the primary key for the table

CELLAR.

◮ Meaning: No two CELLAR rows ever contain the same

BIN# value.

slide-24
SLIDE 24

Introduction

◮ Column BIN# constitutes the primary key for the table

CELLAR.

◮ Meaning: No two CELLAR rows ever contain the same

BIN# value.

◮ We use underlining to indicate primary key columns.

slide-25
SLIDE 25

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-26
SLIDE 26

Database Systems

◮ Database system: computerized record-keeping system. ◮ Four major components:

◮ data, ◮ hardware, ◮ software, ◮ users.

slide-27
SLIDE 27

Data

◮ Database systems are available on machines of different

size and power.

slide-28
SLIDE 28

Data

◮ Database systems are available on machines of different

size and power.

◮ Systems on large machines tend to be multi-user, on

smaller machines – single-user.

slide-29
SLIDE 29

Data

◮ Database systems are available on machines of different

size and power.

◮ Systems on large machines tend to be multi-user, on

smaller machines – single-user.

◮ Multi-user systems: many users can access the database

at the same time.

slide-30
SLIDE 30

Data

◮ Database systems are available on machines of different

size and power.

◮ Systems on large machines tend to be multi-user, on

smaller machines – single-user.

◮ Multi-user systems: many users can access the database

at the same time.

◮ Single-user systems: at most one user can access the

database at the same time.

slide-31
SLIDE 31

Data

◮ Database systems are available on machines of different

size and power.

◮ Systems on large machines tend to be multi-user, on

smaller machines – single-user.

◮ Multi-user systems: many users can access the database

at the same time.

◮ Single-user systems: at most one user can access the

database at the same time.

◮ The distinction is largely irrelevant as far as most of the

users are concerned.

slide-32
SLIDE 32

Data

◮ Database systems are available on machines of different

size and power.

◮ Systems on large machines tend to be multi-user, on

smaller machines – single-user.

◮ Multi-user systems: many users can access the database

at the same time.

◮ Single-user systems: at most one user can access the

database at the same time.

◮ The distinction is largely irrelevant as far as most of the

users are concerned.

◮ Special problems of multi-user systems mainly are internal

to the systems.

slide-33
SLIDE 33

Data

◮ Database systems are available on machines of different

size and power.

◮ Systems on large machines tend to be multi-user, on

smaller machines – single-user.

◮ Multi-user systems: many users can access the database

at the same time.

◮ Single-user systems: at most one user can access the

database at the same time.

◮ The distinction is largely irrelevant as far as most of the

users are concerned.

◮ Special problems of multi-user systems mainly are internal

to the systems.

◮ Data in the system can be stored in a single database, or

can be split across several databases.

slide-34
SLIDE 34

Data

◮ Data in the database is in general both integrated and

shared.

slide-35
SLIDE 35

Data

◮ Data in the database is in general both integrated and

shared.

◮ Integrated database:

◮ unification of several distinct files, ◮ any redundancy among those files partly or wholly

eliminated.

slide-36
SLIDE 36

Data

◮ Data in the database is in general both integrated and

shared.

◮ Integrated database:

◮ unification of several distinct files, ◮ any redundancy among those files partly or wholly

eliminated.

◮ Shared database:

◮ sharing among different users, ◮ different users can access the same data, maybe at the

same time.

slide-37
SLIDE 37

Data

Example (Integrated Database)

◮ Database containing an EMPLOYEE file and an

ENROLLMENT file.

slide-38
SLIDE 38

Data

Example (Integrated Database)

◮ Database containing an EMPLOYEE file and an

ENROLLMENT file.

◮ The EMPLOYEE file contains data about employee names,

addresses, salaries, etc:

NAME ADDRESS DEPARTMENT SALARY . . .

slide-39
SLIDE 39

Data

Example (Integrated Database)

◮ Database containing an EMPLOYEE file and an

ENROLLMENT file.

◮ The EMPLOYEE file contains data about employee names,

addresses, salaries, etc:

NAME ADDRESS DEPARTMENT SALARY . . .

◮ The ENROLLMENT file contains data about the enrollment

  • f employees in training courses:

NAME COURSE . . .

slide-40
SLIDE 40

Data

Example (Integrated Database)

◮ Database containing an EMPLOYEE file and an

ENROLLMENT file.

◮ The EMPLOYEE file contains data about employee names,

addresses, salaries, etc:

NAME ADDRESS DEPARTMENT SALARY . . .

◮ The ENROLLMENT file contains data about the enrollment

  • f employees in training courses:

NAME COURSE . . .

◮ Assume the courses administration needs to know the

department for each enrolled student.

slide-41
SLIDE 41

Data

Example (Integrated Database)

◮ Database containing an EMPLOYEE file and an

ENROLLMENT file.

◮ The EMPLOYEE file contains data about employee names,

addresses, salaries, etc:

NAME ADDRESS DEPARTMENT SALARY . . .

◮ The ENROLLMENT file contains data about the enrollment

  • f employees in training courses:

NAME COURSE . . .

◮ Assume the courses administration needs to know the

department for each enrolled student.

◮ No need to include this information in the ENROLLMENT

  • file. Can be discovered in the EMPLOYEE file.
slide-42
SLIDE 42

Data

In integrated and shared databases

◮ any given user is concerned with a small portion of the

total database,

◮ different users’ portions will overlap in various ways, ◮ even if two users share the same portion of the database,

their views might be different.

slide-43
SLIDE 43

Hardware

◮ The secondary storage volumes, together with the

associated I/O devices, device controllers, etc.

◮ The hardware processor(s) and associated main memory.

Not considered in this course.

slide-44
SLIDE 44

Software

◮ The Database management system (DBMS): a layer of

software between the physical database and the users.

◮ DBMS

◮ handles all requests to the database, ◮ shields users from hardware-level details, ◮ is the most important software component of the system.

◮ Other software components: utilities, application

development tools, design aids, transaction manager, etc. Sometimes people use the term database instead of DBMS. Do not confuse!

slide-45
SLIDE 45

Users

Three classes of users:

◮ Application programmers: ◮ End users: ◮ Database administrator.

slide-46
SLIDE 46

Users

Three classes of users:

◮ Application programmers: Write applications in some

programming language, which then access the database by issuing a request (SQL statement) to the DBMS.

◮ End users: ◮ Database administrator.

slide-47
SLIDE 47

Users

Three classes of users:

◮ Application programmers: Write applications in some

programming language, which then access the database by issuing a request (SQL statement) to the DBMS.

◮ End users: Access the database interactively, via online

application or using a system interface.

◮ Database administrator.

slide-48
SLIDE 48

Users

Three classes of users:

◮ Application programmers: Write applications in some

programming language, which then access the database by issuing a request (SQL statement) to the DBMS.

◮ End users: Access the database interactively, via online

application or using a system interface.

◮ Most systems include at least one built-in application, query

language processor.

◮ Most systems provide additional built-in interfaces, to help

end users choose items from a menu or fill in a form, in contrast of issuing explicit database requests: menu- or forms-driven interfaces vs command-driven interfaces.

◮ Database administrator.

slide-49
SLIDE 49

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-50
SLIDE 50

Persistent Data

◮ The data in a database persists because

slide-51
SLIDE 51

Persistent Data

◮ The data in a database persists because

◮ once it has been accepted by the DBMS for entry into the

database,

slide-52
SLIDE 52

Persistent Data

◮ The data in a database persists because

◮ once it has been accepted by the DBMS for entry into the

database,

◮ it can subsequently be removed from the database only by

some explicit request, not a mere side effect.

slide-53
SLIDE 53

Persistent Data

◮ The data in a database persists because

◮ once it has been accepted by the DBMS for entry into the

database,

◮ it can subsequently be removed from the database only by

some explicit request, not a mere side effect.

Database

A database is a collection of persistent data that is used by the application systems of some given enterprize.

slide-54
SLIDE 54

Entities and Relationships

Example

Manufacturing company records information about:

slide-55
SLIDE 55

Entities and Relationships

Example

Manufacturing company records information about:

◮ its projects,

slide-56
SLIDE 56

Entities and Relationships

Example

Manufacturing company records information about:

◮ its projects, ◮ the parts that are used in those projects,

slide-57
SLIDE 57

Entities and Relationships

Example

Manufacturing company records information about:

◮ its projects, ◮ the parts that are used in those projects, ◮ the suppliers who supply parts,

slide-58
SLIDE 58

Entities and Relationships

Example

Manufacturing company records information about:

◮ its projects, ◮ the parts that are used in those projects, ◮ the suppliers who supply parts, ◮ the warehouses where the parts are stored,

slide-59
SLIDE 59

Entities and Relationships

Example

Manufacturing company records information about:

◮ its projects, ◮ the parts that are used in those projects, ◮ the suppliers who supply parts, ◮ the warehouses where the parts are stored, ◮ the employees who work in the projects, ◮ etc.

slide-60
SLIDE 60

Entities and Relationships

Example

Manufacturing company records information about:

◮ its projects, ◮ the parts that are used in those projects, ◮ the suppliers who supply parts, ◮ the warehouses where the parts are stored, ◮ the employees who work in the projects, ◮ etc.

Projects, parts, suppliers, warehouses, employees: basic entities.

slide-61
SLIDE 61

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

slide-62
SLIDE 62

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts,

slide-63
SLIDE 63

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts, ◮ each part is supplied by some supplier,

slide-64
SLIDE 64

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts, ◮ each part is supplied by some supplier, ◮ parts are used in projects,

slide-65
SLIDE 65

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts, ◮ each part is supplied by some supplier, ◮ parts are used in projects, ◮ projects use parts, ◮ etc.

slide-66
SLIDE 66

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts, ◮ each part is supplied by some supplier, ◮ parts are used in projects, ◮ projects use parts, ◮ etc.

Binary (and bidirectional) relationships.

slide-67
SLIDE 67

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts, ◮ each part is supplied by some supplier, ◮ parts are used in projects, ◮ projects use parts, ◮ etc.

Binary (and bidirectional) relationships.

◮ Ternary relationship: each supplier supplies certain parts

to certain projects.

slide-68
SLIDE 68

Entities and Relationships

Example (Cont.)

In addition to basic entities, the company keeps information about relationships linking those basic entities together:

◮ each supplier supplies certain parts, ◮ each part is supplied by some supplier, ◮ parts are used in projects, ◮ projects use parts, ◮ etc.

Binary (and bidirectional) relationships.

◮ Ternary relationship: each supplier supplies certain parts

to certain projects.

◮ Not equivalent to three binary relationships: supplier

supplies parts, parts are used in projects, and projects are supplied by suppliers. (Why?)

slide-69
SLIDE 69

Entities and Relationships

Important:

◮ Relationships are just as much a part of the data as are

the basic entities.

◮ They must be represented in the database, like the basic

entities.

◮ A relationship can be regarded as an entity in its own right.

slide-70
SLIDE 70

Entities and Relationships

Entity/Relationship (E/R) diagram from the previous example: Representation:

◮ Entities by rectangles. ◮ Relationships by diamonds and connecting lines.

slide-71
SLIDE 71

Properties

◮ Entities (relationships included) can be regarded as having

properties.

◮ Properties correspond to the information we wish to record

about entities.

◮ Examples of properties: weight of a part, priority of a

project, location of a supplier, plan of a warehouse, etc.

slide-72
SLIDE 72

Data and Data Models

Another view what data and databases are:

◮ Data: given facts from which additional facts can be

inferred (by DBMS responding to a request).

◮ Logically, given facts correspond to true propositions. ◮ Database: collection of true propositions.

slide-73
SLIDE 73

Data and Data Models

SQL products are based on a the relational model of data. In the relational model

◮ data is represented by means of rows in tables, ◮ rows are interpreted as true propositions, ◮ operators are provided for operating on rows, ◮ operators support the process of inferring additional true

propositions from the given ones.

slide-74
SLIDE 74

Data and Data Models

Data Model

◮ An abstract, self-contained, logical definition of the objects,

  • perators, etc. that together constitute the abstract

machine with which users interact.

◮ The objects allow us to model the structure of data. ◮ The operators allow us to model its behavior.

Model vs Implementation:

◮ Model is what the users have to know about, ◮ Implementation is what the users do not have to know

about.

slide-75
SLIDE 75

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-76
SLIDE 76

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

slide-77
SLIDE 77

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files.

slide-78
SLIDE 78

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files. ◮ Speed: Machine is faster in retrieval than a human.

slide-79
SLIDE 79

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files. ◮ Speed: Machine is faster in retrieval than a human. ◮ Less drudgery: Mechanical tasks (maintaining files etc.)

are better done by machines.

slide-80
SLIDE 80

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files. ◮ Speed: Machine is faster in retrieval than a human. ◮ Less drudgery: Mechanical tasks (maintaining files etc.)

are better done by machines.

◮ Currency: Up-to-date information is available on demand

at any time.

slide-81
SLIDE 81

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files. ◮ Speed: Machine is faster in retrieval than a human. ◮ Less drudgery: Mechanical tasks (maintaining files etc.)

are better done by machines.

◮ Currency: Up-to-date information is available on demand

at any time.

◮ Protection: The data can be better protected against

unintentional loss and unlawful access.

slide-82
SLIDE 82

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files. ◮ Speed: Machine is faster in retrieval than a human. ◮ Less drudgery: Mechanical tasks (maintaining files etc.)

are better done by machines.

◮ Currency: Up-to-date information is available on demand

at any time.

◮ Protection: The data can be better protected against

unintentional loss and unlawful access. One more advantage in a multi-user environment:

slide-83
SLIDE 83

Why to Use Database

The advantages of a database system over paper-based methods of bookkeeping:

◮ Compactness: No need in paper files. ◮ Speed: Machine is faster in retrieval than a human. ◮ Less drudgery: Mechanical tasks (maintaining files etc.)

are better done by machines.

◮ Currency: Up-to-date information is available on demand

at any time.

◮ Protection: The data can be better protected against

unintentional loss and unlawful access. One more advantage in a multi-user environment:

◮ The database system provides the enterprize with

centralized control of its data.

slide-84
SLIDE 84

Data Administration and Database Administration

◮ Data administrator ◮ Database administrator (DBA)

slide-85
SLIDE 85

Data Administration and Database Administration

◮ Data administrator

◮ A person who has the central responsibility for the data. ◮ Senior manager, not a technician (although familiar with the

database system capabilities at a technical level).

◮ Decides what data should be stored, establishes policies

for maintaining and dealing with data.

◮ Database administrator (DBA)

slide-86
SLIDE 86

Data Administration and Database Administration

◮ Data administrator

◮ A person who has the central responsibility for the data. ◮ Senior manager, not a technician (although familiar with the

database system capabilities at a technical level).

◮ Decides what data should be stored, establishes policies

for maintaining and dealing with data.

◮ Database administrator (DBA)

◮ A technical person responsible for implementing data

administrator’s decisions.

◮ An IT specialist. ◮ Creates databases, puts in place the technical controls

needed to enforce data administrator’s policy decisions.

◮ May have a staff of programmers and technical assistants.

slide-87
SLIDE 87

Advantages of Centralized Control

◮ The data can be shared. ◮ Redundancy can be reduced. ◮ Inconsistency can be avoided (to some extent). ◮ Transition support can be provided. ◮ Integrity can be maintained. ◮ Security can be enforced. ◮ Conflicting requirements can be balanced. ◮ Standards can be enforced. ◮ Data independence can be provided.

slide-88
SLIDE 88

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-89
SLIDE 89

Data Independence

◮ Two kinds of data independence: Physical and logical. ◮ Only physical data independence in this lecture.

slide-90
SLIDE 90

Data Dependence

◮ An application is data-dependent, if the physical

representation of the data and (physical) access techniques can not be changed without affecting the application.

◮ Extremely undesirable property.

slide-91
SLIDE 91

Data Independence

◮ Data independence: the immunity of applications to

change in physical representation and access techniques.

◮ What kind of changes we wish applications to be immune

to?

slide-92
SLIDE 92

Data Independence

◮ Stored fields: smallest unit of stored data.

◮ The database will contain many occurrences of each of

several types of stored field.

◮ Example: a database containing information about different

kinds of parts might include a stored field type “part number”, and one occurrence of that stored field for each kind of part.

◮ Stored record: collection of stored fields.

◮ A stored record occurrence consists of related stored field

  • ccurrences.

◮ Database might contain many occurrences of stored record

type.

◮ Stored file: collection of all currently existing occurrences

  • f one type of stored record.
slide-93
SLIDE 93

Data Independence

slide-94
SLIDE 94

Data Independence

◮ In database systems the DBA might change the stored

representation of data—stored fields, records, and files.

◮ Data as seen by applications does not change.

slide-95
SLIDE 95

Data Independence

Some aspects of the stores representation that might be subject to change:

◮ Representation of numerical data. ◮ Representation of character data. ◮ Units for numeric data. ◮ Data coding. ◮ Data materialization. ◮ Structure of stored records. ◮ Structure of stored files.

slide-96
SLIDE 96

Data Independence

◮ Database should be able to grow without impairing existing

applications.

◮ Data independence is one of the reasons to separate data

model from data implementation.

slide-97
SLIDE 97

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-98
SLIDE 98

Relational Systems and Others

◮ Relational system is a system in which

◮ the data is perceived by the user as tables, ◮ the operators available to the user derive “new” tables from

“old” ones.

◮ Relation is basically a mathematical term for a table. ◮ Other systems:

◮ Inverted list systems. ◮ Hierarchical systems. ◮ Network systems. ◮ Object and object-relational systems. ◮ Multi-dimensional systems. ◮ Logic-based (deductive) systems. ◮ Semistructured systems.

slide-99
SLIDE 99

Outline

Introduction What Are Database Systems? What Is a Database? Why to Use Database? Data Independence Brief Overview of Systems Summary

slide-100
SLIDE 100

Summary

◮ Database system can be thought as a computerized

record-keeping system.

slide-101
SLIDE 101

Summary

◮ Database system can be thought as a computerized

record-keeping system.

◮ It involves the data (stored in the database), hardware,

software (in particular, DBMS) and users.

slide-102
SLIDE 102

Summary

◮ Database system can be thought as a computerized

record-keeping system.

◮ It involves the data (stored in the database), hardware,

software (in particular, DBMS) and users.

◮ Users can be divided into application programmers, end

users, and the DBA.

slide-103
SLIDE 103

Summary

◮ Database system can be thought as a computerized

record-keeping system.

◮ It involves the data (stored in the database), hardware,

software (in particular, DBMS) and users.

◮ Users can be divided into application programmers, end

users, and the DBA.

◮ DBA is responsible for administering the database and the

database system with policies established by DA.

slide-104
SLIDE 104

Summary

◮ Databases are integrated and shared.

slide-105
SLIDE 105

Summary

◮ Databases are integrated and shared. ◮ They are used to store persistent data representing entities

and relationships among entities.

slide-106
SLIDE 106

Summary

◮ Databases are integrated and shared. ◮ They are used to store persistent data representing entities

and relationships among entities.

◮ One of the most important benefit of database systems is

data independence.

slide-107
SLIDE 107

Summary

◮ Databases are integrated and shared. ◮ They are used to store persistent data representing entities

and relationships among entities.

◮ One of the most important benefit of database systems is

data independence.

◮ Data independence requires a sharp distinction between

the data model and its implementation.

slide-108
SLIDE 108

Summary

◮ Databases are integrated and shared. ◮ They are used to store persistent data representing entities

and relationships among entities.

◮ One of the most important benefit of database systems is

data independence.

◮ Data independence requires a sharp distinction between

the data model and its implementation.

◮ Database systems usually support transactions.

slide-109
SLIDE 109

Summary

◮ Databases are integrated and shared. ◮ They are used to store persistent data representing entities

and relationships among entities.

◮ One of the most important benefit of database systems is

data independence.

◮ Data independence requires a sharp distinction between

the data model and its implementation.

◮ Database systems usually support transactions. ◮ Transactions are guaranteed to be atomic (all or nothing).

slide-110
SLIDE 110

Summary

◮ Databases are integrated and shared. ◮ They are used to store persistent data representing entities

and relationships among entities.

◮ One of the most important benefit of database systems is

data independence.

◮ Data independence requires a sharp distinction between

the data model and its implementation.

◮ Database systems usually support transactions. ◮ Transactions are guaranteed to be atomic (all or nothing). ◮ Relational systems are based on the relational model.

slide-111
SLIDE 111

Exercise

Write SQL statements to perform the following operations on the wine cellar database:

  • 1. Get bin number, name of wine, and number of bottles for

all Geyser Peak wines.

  • 2. Get bin number and the name of wine for all wines for

which there are more than five bottles in stock.

  • 3. Add three bottles to bin number 30.
  • 4. Remove all Chardonnay from stock.
  • 5. Add an entry for a new case 912 bottles of Gary Farrell

Merlot: bin number 55, year 2000, ready in 2005.