cs 435 database systems. chapter 1 an overview of database management

68
CS 435 Database Systems

Upload: della-shelton

Post on 29-Dec-2015

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CS 435 Database Systems. Chapter 1 An Overview of Database Management

CS 435Database Systems

Page 2: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Chapter 1

An Overview of Database Management

Page 3: CS 435 Database Systems. Chapter 1 An Overview of Database Management

What is a database?

“An electronic filing cabinet”

“A repository for a collection of computerized data files”

A collection of interrelated data.

“Descriptions”--not definitions

Page 4: CS 435 Database Systems. Chapter 1 An Overview of Database Management

So, how is that different from a file?

Page 5: CS 435 Database Systems. Chapter 1 An Overview of Database Management

File processing systems

• Independent systems

• Each has its own definition of data

• Each has its own data formats

Page 6: CS 435 Database Systems. Chapter 1 An Overview of Database Management

File processing systems

• Independent systems. Each has its own definition of data. Each has its own data formats

Faculty Data File

Payroll System

Reports

Class Data File

Class Scheduling System

Reports

Student Data File

Grade Posting System

Reports

Page 7: CS 435 Database Systems. Chapter 1 An Overview of Database Management

File processing systems

Faculty Data File

Payroll System

Reports

Class Data File

Class Scheduling System

Reports

Problems of inconsistency.

May need faculty member name in each file. May be recorded differently in each.

Page 8: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Database systems

• A single data definition

• All data (potentially) accessible from each application

• Less paperwork exchange between applications

Page 9: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Database systemsA single data definition

All data (potentially) accessible from each application

Faculty Data

Class Data

Student Data

Data DefinitionDatabase Management System

Payroll System

Reports

Class Scheduling System

Reports

Grade Posting System

Reports

Less paperwork exchange between applications

Page 10: CS 435 Database Systems. Chapter 1 An Overview of Database Management

So, a database is a collection of "files," or at least a collection of data that would otherwise usually exist in multiple files.

Page 11: CS 435 Database Systems. Chapter 1 An Overview of Database Management

What is a database management system?

The software that makes it possible for multiple applications and multiple users to access the same (single) set of data.

The software that enables users to access and share the single set of integrated data without concern about files and file structure.

Page 12: CS 435 Database Systems. Chapter 1 An Overview of Database Management

What is a database system?

• The data

• The database software (database management system)

• The other software (applications)

• The hardware where the data and software reside (and execute)

• The users who use the system

Page 13: CS 435 Database Systems. Chapter 1 An Overview of Database Management

data

Computerhardware

Page 14: CS 435 Database Systems. Chapter 1 An Overview of Database Management

software

data

Computerhardware

users

Page 15: CS 435 Database Systems. Chapter 1 An Overview of Database Management

A database system is the collection of data, the software to provide access to that data, (and the hardware upon which the data and software reside and execute.)

To that we can also add the users. They are also part of the "system."

Page 17: CS 435 Database Systems. Chapter 1 An Overview of Database Management

+-----+----------------+---------------+------+---------+-------+| bin | wine | producer | year | bottles | ready |+-----+----------------+---------------+------+---------+-------+| 2 | Chardonnay | Buena Vista | 2001 | 1 | 2003 || 3 | Chardonnay | Geyser Peak | 2001 | 5 | 2003 || 6 | Chardonnay | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | Rafanelli | 1999 | 2 | 2007 |+-----+----------------+---------------+------+---------+-------+

Date’s “CELLAR” Example

Page 18: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Date’s “CELLAR” Example

Retrieval:

select wine, bin_num, producer

from Cellar

where ready = '2000' ;

Result:

+----------------+-----+--------------+| wine | bin | producer |+----------------+-----+--------------+| Cab. Sauvignon | 43 | Windsor || Pinot Noir | 51 | Fetzer || Merlot | 58 | Clos du Bois |+----------------+-----+--------------+

3 rows in set (0.00 sec)

Page 19: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Date’s “CELLAR” Example

Inserting new data:

insert

into Cellar

values (53, 'Pinot Noir', 'Saintsbury', 2003, 6, 2008);

Page 20: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Date’s “CELLAR” Example

Changing existing data:

update Cellar

set bottles = 4

where bin_num = 3;

Deleting existing data:

delete

from cellar

where bin_num = 2;

Page 21: CS 435 Database Systems. Chapter 1 An Overview of Database Management

+-----+----------------+---------------+------+---------+-------+| bin | wine | producer | year | bottles | ready |+-----+----------------+---------------+------+---------+-------+| 3 | Chardonnay | Geyser Peak | 2001 | 4 | 2003 || 6 | Chardonnay | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | Rafanelli | 1999 | 2 | 2007 || 53 | Pinot Noir | Saintsbury | 2003 | 6 | 2008 |+-----+----------------+---------------+------+---------+-------+

CELLAR changed from 5 to 4

row for bin 2 deleted

new row inserted

Page 22: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Note that the “CELLAR database" looks like a "table," and in fact,that is what it is.

In particular it is a relational table, or just a "relation."

Page 23: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Aside regarding tables…

and, “looks like a table.”

Page 24: CS 435 Database Systems. Chapter 1 An Overview of Database Management

+-----+----------------+---------------+------+---------+-------+| bin | wine | producer | year | bottles | ready |+-----+----------------+---------------+------+---------+-------+| 2 | Chardonnay | Buena Vista | 2001 | 1 | 2003 || 3 | Chardonnay | Geyser Peak | 2001 | 5 | 2003 || 6 | Chardonnay | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | Rafanelli | 1999 | 2 | 2007 |+-----+----------------+---------------+------+---------+-------+

“Tables”

rows

column “headings”

columns

Columns are aligned:

i.e., strings left justified

numbers right justified

Page 25: CS 435 Database Systems. Chapter 1 An Overview of Database Management

+-----+----------------+---------------+------+---------+-------+| bin | wine | producer | year | bottles | ready |+-----+----------------+---------------+------+---------+-------+| 2 | Chardonnay | Buena Vista | 2001 | 1 | 2003 || 3 | Chardonnay | Geyser Peak | 2001 | 5 | 2003 || 6 | Chardonnay | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | Rafanelli | 1999 | 2 | 2007 |+-----+----------------+---------------+------+---------+-------+

Separating lines provided by MySQL

Page 26: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Separating lines provided by textbook publisher

Page 27: CS 435 Database Systems. Chapter 1 An Overview of Database Management

bin wine producer year bottles ready

2 Chardonnay Buena Vista 2001 1 2003 3 Chardonnay Geyser Peak 2001 5 2003 6 Chardonnay Simi 2000 4 2002 12 Joh. Riesling Jekel 2002 1 2003 21 Fume Blanc Ch. St. Jean 2001 4 2003 22 Fume Blanc Robt. Mondavi 2000 2 2002 30 Gewurztraminer Ch. St. Jean 2002 3 2003 43 Cab. Sauvignon Windsor 1995 12 2004 45 Cab. Sauvignon Geyser Peak 1998 12 2006 48 Cab. Sauvignon Robt. Mondavi 1997 12 2008 50 Pinot Noir Gary Farrell 2000 3 2003 51 Pinot Noir Fetzer 1997 3 2004 52 Pinot Noir Dehlinger 1999 2 2002 58 Merlot Clos du Bois 1998 9 2004 64 Zinfandel Cline 1998 9 2007 72 Zinfandel Rafanelli 1999 2 2007

No separating lines

Page 28: CS 435 Database Systems. Chapter 1 An Overview of Database Management

So, a database is usually said to consist of tables rather than files.

The rows of the tables would be the "records" of a file.

The columns of the table are the "fields" of those records.

Page 29: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Note that the "database," the collection of tables, is a logical concept, a data structure.

Page 30: CS 435 Database Systems. Chapter 1 An Overview of Database Management

The database software (the database manager, the DBMS) provides

the mapping of the logical database

into one or more logical files, and ultimately into a physical representation on disk.

Page 31: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Thus, there are stored files, stored records, and stored fields.

(Sometimes the DBMS shares this mapping with the operating system)

Page 32: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Parts+------+-------+-------+--------+--------+| pnum | pname | color | weight | city |+------+-------+-------+--------+--------+| P1 | Nut | Red | 12.0 | London || P2 | Bolt | Green | 17.0 | Paris || P3 | Screw | Blue | 17.0 | Rome || P4 | Screw | Red | 14.0 | London || P5 | Cam | Blue | 12.0 | Paris || P6 | Cog | Red | 19.0 | London |+------+-------+-------+--------+--------+

Say this parts table is stored in the database as a file

Page 33: CS 435 Database Systems. Chapter 1 An Overview of Database Management
Page 34: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Stored database

Other stored files

P1 Nut Red 12.0

P2 Bolt Green 17.0

“Parts” stored

file

Two occurrences of the “part” stored record type.

Stored field occurrences

…and the table rows become records in the file, the columns fields within each record

Page 35: CS 435 Database Systems. Chapter 1 An Overview of Database Management

P1 Nut Red 12.0

But, for example, the data for a part (a table row):

P1 12.0

P1 Nut Red

might be stored as two records:

and

Page 36: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Stored database

Other stored files

P1 Nut Red 12.0

P2 Bolt Green 17.0

“Parts” stored

file

Parts+------+-------+-------+--------+--------+| pnum | pname | color | weight | city |+------+-------+-------+--------+--------+| P1 | Nut | Red | 12.0 | London || P2 | Bolt | Green | 17.0 | Paris || P3 | Screw | Blue | 17.0 | Rome || P4 | Screw | Red | 14.0 | London || P5 | Cam | Blue | 12.0 | Paris || P6 | Cog | Red | 19.0 | London |+------+-------+-------+--------+--------+

DBMS

Data independence--the immunity of applications to change in physical representation.

The DBMS relieves the user of any concern about how the data is represented physically.

Page 38: CS 435 Database Systems. Chapter 1 An Overview of Database Management

+-----+----------------+---------------+------+---------+-------+| bin | wine | producer | year | bottles | ready |+-----+----------------+---------------+------+---------+-------+| 2 | Chardonnay | Buena Vista | 2001 | 1 | 2003 || 3 | Chardonnay | Geyser Peak | 2001 | 5 | 2003 || 6 | Chardonnay | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | Rafanelli | 1999 | 2 | 2007 |+-----+----------------+---------------+------+---------+-------+

CELLAR

Suppose we want to add some information about each wine.

Page 39: CS 435 Database Systems. Chapter 1 An Overview of Database Management

+-----+----------------+-------|---------------+------+-----+-------+| bin | wine | type | producer | year | qty | ready |+-----+----------------+-------|---------------+------+-----+-------+| 2 | Chardonnay | white | Buena Vista | 2001 | 1 | 2003 || 3 | Chardonnay | white | Geyser Peak | 2001 | 5 | 2003 || 6 | Chardonnay | white | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | white | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | white |Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | white | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | white | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | red | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | red | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | red | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | red | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | red | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | red | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | red | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | red | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | red | Rafanelli | 1999 | 2 | 2007 |+-----+----------------+-------|---------------+------+-----+-------+

for example:

“redundancies”Chardonnay is white--3 times

Pinot Noir is red--3 times

Page 40: CS 435 Database Systems. Chapter 1 An Overview of Database Management

So, more tables--for example:

• Wine: Name, Type, Description, Characteristic

• Producer: Name, Area, Appellation

Page 41: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Wines

+----------------+-----------+------------------+---------------------+| wine_name | wine_type | wine_description | wine_characteristic |+----------------+-----------+------------------+---------------------+| Chardonnay | white | dry | buttery || Joh. Riesling | white | semi-sweet | fruity || Fume Blanc | white | dry | smoky || Gewurztraminer | white | semi-sweet | spicy || Cab. Sauvignon | red | dry | oaky || Pinot Noir | red | dry | fruity || Merlot | red | dry | plummy || Zinfandel | red | dry | spicy |+----------------+-----------+------------------+---------------------+

Page 42: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Note that this gives us the ability to describe a wine as "Red" in one place, rather than adding it to the CELLAR table and repeating it each time that wine appears.

This eliminates "redundancy."

Page 43: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Producers

+--------------+-----------------+-------------+| name | area | appellation |+--------------+-----------------+-------------+| Fetzer | Hopland | Mendocino || Gary Farrell | Russian River V | Sonoma || Geyser Peak | Alexander Valle | Sonoma || Jekel | Arroyo Seco | Monterey || . | . | . || . | . | . || . | . | . || . | etc. | . |+--------------+-----------------+-------------+

Similarly,

Page 44: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Thus the database, (the collection of tables) is "integrated," i.e., the entirety of the data is formed by use of all of the tables.

Page 45: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Cellar+-----+----------------+---------------+------+---------+-------+| bin | wine | producer | year | bottles | ready |+-----+----------------+---------------+------+---------+-------+| 2 | Chardonnay | Buena Vista | 2001 | 1 | 2003 || 3 | Chardonnay | Geyser Peak | 2001 | 5 | 2003 || 6 | Chardonnay | Simi | 2000 | 4 | 2002 || 12 | Joh. Riesling | Jekel | 2002 | 1 | 2003 || 21 | Fume Blanc | Ch. St. Jean | 2001 | 4 | 2003 || 22 | Fume Blanc | Robt. Mondavi | 2000 | 2 | 2002 || 30 | Gewurztraminer | Ch. St. Jean | 2002 | 3 | 2003 || 43 | Cab. Sauvignon | Windsor | 1995 | 12 | 2004 || 45 | Cab. Sauvignon | Geyser Peak | 1998 | 12 | 2006 || 48 | Cab. Sauvignon | Robt. Mondavi | 1997 | 12 | 2008 || 50 | Pinot Noir | Gary Farrell | 2000 | 3 | 2003 || 51 | Pinot Noir | Fetzer | 1997 | 3 | 2004 || 52 | Pinot Noir | Dehlinger | 1999 | 2 | 2002 || 58 | Merlot | Clos du Bois | 1998 | 9 | 2004 || 64 | Zinfandel | Cline | 1998 | 9 | 2007 || 72 | Zinfandel | Rafanelli | 1999 | 2 | 2007 |+-----+----------------+---------------+------+---------+-------+

Wines+----------------+-----------+------------------+---------------------+| wine_name | wine_type | wine_description | wine_characteristic |+----------------+-----------+------------------+---------------------+| Chardonnay | white | dry | buttery || Joh. Riesling | white | semi-sweet | fruity || Fume Blanc | white | dry | smoky || Gewurztraminer | white | semi-sweet | spicy || Cab. Sauvignon | red | dry | oaky || Pinot Noir | red | dry | fruity || Merlot | red | dry | plummy || Zinfandel | red | dry | spicy |+----------------+-----------+------------------+---------------------+

Producers+--------------+-----------------+-------------+| name | area | appellation |+--------------+-----------------+-------------+| Fetzer | Hopland | Mendocino || Gary Farrell | Russian River V | Sonoma || Geyser Peak | Alexander Valle | Sonoma || Jekel | Arroyo Seco | Monterey || . | . | . |

The database: a collection of "files," or at least a collection of data that would otherwise usually exist in multiple files.

Page 46: CS 435 Database Systems. Chapter 1 An Overview of Database Management

And, we can add

Maps to the wineries

Photographs of wineries, wine bottles

Recordings of our own “tasting notes”

Etc.

Page 47: CS 435 Database Systems. Chapter 1 An Overview of Database Management

The data can also be "shared," by programs or by users.

(Single-user vs. multi-user systems.)

Page 48: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Persistent vs. Transient data

Page 49: CS 435 Database Systems. Chapter 1 An Overview of Database Management

The persistent data. Once put into the database, it stays there until explicitly removed.

Faculty Data

Class Data

Student Data

Data DefinitionDatabase Management System

Payroll System

Reports

Class Scheduling System

Reports

Grade Posting System

Reports

Transient or ephemeral data. Input, output, intermediate results.

Page 50: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Another definition:

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

Page 51: CS 435 Database Systems. Chapter 1 An Overview of Database Management

What are applications? Application programs? Application systems?

What is an “enterprise”?

Page 52: CS 435 Database Systems. Chapter 1 An Overview of Database Management

The Benefits of a Database

• Makes possible, supports, enhances– Rapid availability of current data.– Reduced redundancy.– Less inconsistency.– Sharing of data among users, applications– Enforcement of standards– Enforcement of security– Maintenance of integrity

Page 53: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Entity Relationship Modeling

Entities: The “things” that we need to record data about.

Relationships: How these things are related to one another.

Page 54: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Entities: The “things” that we need to record data about.

PeopleProductsPlacesProcessesPoliciesPaper (documents)

Page 55: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Relationships: How these things are related to one another--connections between and among the “things” and their data;

Which people make which products

Which products are stored in which places

What places use what processes

What processes require what policies

the relationships

Page 56: CS 435 Database Systems. Chapter 1 An Overview of Database Management

ProductsPeople

People make products.

Products are made by people.

Relationships are bi-directional.

Entity Entity

Relationship

Page 57: CS 435 Database Systems. Chapter 1 An Overview of Database Management

ProductsPeople

Relationships are bi-directional.

Entity Entity

Relationship

For example:

Given a person, find which products that person makes.

Given a product, find which people make that product.

Page 58: CS 435 Database Systems. Chapter 1 An Overview of Database Management
Page 59: CS 435 Database Systems. Chapter 1 An Overview of Database Management

binary relationship

ternary relationship

recursive relationship

Page 60: CS 435 Database Systems. Chapter 1 An Overview of Database Management
Page 61: CS 435 Database Systems. Chapter 1 An Overview of Database Management

A “horizontal,” or row , subset of the table CELLAR

A “vertical,” or column, subset

Operations on tables produce only tables.

Page 62: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Relational Database Management Systems

DB2

Ingres

Informix

Microsoft SQL Server

Oracle

Sybase

Page 63: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Other Database Management System “Models”

(pre-relational)

Hierarchical (tree structure)

Network (graph structure)

Inverted list

Page 64: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Other (new) Approaches

(post-relational)

Deductive

Expert

Extendable

Object Oriented

Semantic

Universal Relation

DBMSs

Page 65: CS 435 Database Systems. Chapter 1 An Overview of Database Management

People

Data Administrator

High level position

Responsible for defining the data to be maintained

Makes policy (regarding security, etc.)

Non-”technical”

Database Administrator

Creates the database

Implements the policies

IT professional

Page 66: CS 435 Database Systems. Chapter 1 An Overview of Database Management

People

Application Programmers

Write the programs to maintain the database

and provide access to it

Need to know only the external view of the DB

End Users

Interact with the programs to enter data,

change data, generate reports

May not need to know anything about the DB

Page 67: CS 435 Database Systems. Chapter 1 An Overview of Database Management

Application Programs

4GL Systems

Interfaces

Query Language Processor

Command Driven Menu or Forms Driven

Page 68: CS 435 Database Systems. Chapter 1 An Overview of Database Management

1.1 Define the following terms:

binary relationship menu-driven interface

command-driven interface multi-user system

concurrent access online application

data administration persistent data

database property

database system query language

data independence redundancy

DBA relationship

DBMS security

entity sharing

entity/relationship diagram stored field

forms-driven interface stored file

integration stored record

integrity transaction