What is Database Management System - Lecture Notes | CS 610, Study notes of Deductive Database Systems

Material Type: Notes; Class: Database Systems I; Subject: Computer Science; University: University of Alabama - Birmingham; Term: Fall 2001;

Typology: Study notes

Pre 2010

Uploaded on 04/12/2010

koofers-user-l5t
koofers-user-l5t 🇺🇸

5

(1)

10 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
What is a Database Management System?
1. Manages very large amounts of data.
2. Supports ecient access to very large amounts
of data.
3. Supports concurrent access to v.l.a.d.
Example: bank and its ATM machines.
4. Supports secure, atomic access to v.l.a.d.
Contrast two people editing the same
UNIX le | last to write \wins" | with
the problem if two people deduct money
from the same account via ATM machines
at the same time | new balance is wrong
whichever writes last.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download What is Database Management System - Lecture Notes | CS 610 and more Study notes Deductive Database Systems in PDF only on Docsity!

What is a Database Management System?

  1. Manages very large amounts of data.
  2. Supp orts ecient access to very large amounts of data.
  3. Supp orts concurrent access to v.l.a.d.

F Example: bank and its ATM machines.

  1. Supp orts secure, atomic access to v.l.a.d.

F Contrast two p eople editing the same UNIX le | last to write \wins" | with the problem if two p eople deduct money from the same account via ATM machines at the same time | new balance is wrong whichever writes last.

Relational Mo del

 Based on tables, as:

acct# name balance 12345 Sally 1000. 34567 Sue 285.         

 To day used in most DBMS's.

Three Asp ects to Studying DBMS's

  1. Mo deling and design of databases.

F Allows exploration of issues b efore committing to an implementation.

  1. Programming: queries and DB op erations like up date. F SQL = \intergalacti c datasp eak."
  2. DBMS implementation.

CS145 = (1) + (2), while (3) is covered in CS245, CS346, CS347.

Entity/Rel at io nship Mo del

Diagrams to represent designs.

 Entity like ob ject, = \thing."

 Entity set like class = set of \similar" entities/ob ject s.

 Attribute = prop erty of entities in an entity set, similar to elds of a struct.

 In diagrams, entity set! rectangle; attribute ! oval.

Students

ID name phone

height

Multiway Relationships

Usually binary relationships (connecting two E.S.) suce.

 However, there are some cases where three or more E.S. must b e connected by one relationship.

 Example: relationship among students, courses, TA's. Possibly, this E/R diagram is OK:

Students Taking Courses

Assisting

TAs

 Works in CS145, b ecause each TA is a TA of all students. Connection student-TA is only via the course.

 But what if students were divided into sections, each headed by a TA? F Then, a student in CS145 would b e related to only one of the TA's for CS145. Which one?

 Need a 3-way relationship to tell.

Beers-Bars-Drinkers Example

 Our running example for the course.

Serves Frequents

Likes

Bars

Beers Drinkers

name addr license

name manf name addr

Multiplicity of Relationship s

Many-many Many-one One-one

Representatio n of Many-One

 E/R: arrow p ointing to \one." F Rounded arrow = \exactly one."

One-One Relationshi ps

Put arrows in b oth directions.

Beers seller

Manfs Best-

Design Issue:

Is the rounded arrow justi ed?

Design Issue:

Here, manufacturer is an E.S.; in earlier diagrams it is an attribute. Which is right?

Attributes on Relationshi ps

Beers

price

Bars Sells

 Shorthand for 3-way relationship:

Bars Sells Beers

price

Prices

Converting Multiway to 2-Way

 Baro que in E/R, but necessary in certain \ob ject-oriented" mo dels.

 Create a new connecting E.S. to represent rows of a relationship set. F E.g., (Jo e's Bar, Bud, $2.50) for the Sel ls relationship.

 Many-one relationships from the connecting E.S. to the others.

Bars Beers

The- Beer

Prices

Bar

The- The- Price

BBP

Roles

Sometimes an E.S. participates more than once in a relationship.

 Lab el edges with roles to distinguish.

Married

Drinkers

husband wife

Husband Wife d 1 d 2 d 3 d 4