Lecture 1
Database Concepts and Architecture


Theoretical Knowledge
    Definition
      Database
      Database Management System
      Database System
    An Example
    Characteristics of the Database Approach Versus the Traditional File Processing Approach
    Advantages of the DB Approach
    Disadvantages to an Integrated DB Environment
    Workers
    Data Models, Schemas and Instances
    DBMS Languages
    DBMS Interfaces
    DBMS Modules
    Classification of DBMS
Practical Knowledge
    Example
    Terminology
    Exercises


Definition

Database (DB)

Database Management System (DBMS) Database System (DBS)
An Example Staff
 
EMPLOY#
SIN
NAME ADDRESS DUTY
SHIFT
SALARY
1009
450361234
Holmes D. 86 dundas nurse
m
28 500
3754
461378298
Delagi B. 7 orchard nurse
a
27 400
8422
248651396
Bell G. 53 delise orderly
m
22 600
9901
562916348
Newport C. 16 clifton intern
m
27 000
1280
328409274
Anderson R. 55 minto intern
e
27 000
6065
417394230
Richie G. 276 invemess nurse
e
30 200
3106
538294193
Hughes J. 418 daley orderly
a
23 500
8526
467298103
Frank H. 58 hillsboro nurse
a
29 400
6537
721893567
Karplus W. 580 dinnick intern
m
28 300
7379
381924652
Colony R. 125 evelyn nurse
m
26 300


Characteristics of the Database Approach Versus the Traditional File Processing Approach


Advantages of the DB Approach


Disadvantages to an Integrated DB Environment

Workers

Database Administrators (DBA)

Database Designers End users System analysts and application programmers Dbms designers and implementers Tool developers

Operators and maintenance personnel


Data Models, Schemas and Instances

Data model is a set of concepts that can be used to describe the structure of a database. By structure of a database we mean the data types, relationships, and constraints that should hold on the data. It can also include a set of operations for specifying retrievals and updates of the DB.

Database schema - the description of a database.

Database instance (occurrence of state) - the data in the database at a particular moment in time.

 

Schema diagram

Data Independence - a degree of independence or insulation of the correct functioning of an application program or query from a wide variety of changes in the logical and physical organization, access paths, and storage mapping of the database


DBMS Languages


DBMS Interfaces


DBMS Modules


Classification of DBMS

Data model

Number of users Number of sites Purpose
  Practical Knowledge


Example

Eloise has a file system for gathering and organising facts on movies, directors and movie stars.

When she adds a new movie to her files she gives it a reference number. She also lists the title of the movie; the type of movie; year in which it was produced, academy awards nominated and received etc.

Similarly, she assigns a number to any director whom she adds to the files. She also lists the directors name, year in which he or she was born, and when (if) they died.

Eloise uses this information to ask questions in a number of ways.

E.G. All the movies of a particular type that starred a certain actor or actress and won at least one academy award.

or The names of the movie that were directed by one particular director and that starred a particular actor.


Director file
 
DIRNUMB DIRNAME
DIRBORN
DIRDIED
1 Allen, Woody
1935
-
2 Hitchcock, Alfred
1899
1980
3 De Mille, Cecil B
1881
1959
4 Kubrick, Stanley
1928
-
5 Preminger, Otto
1906
-
6 Ford, John
1895
1973


Star file
 
STARNUM STARNAME BIRTHPLACE
STARBORN
STARDIED
1 Allen, Woody New York
1935
-
2 Keaton, Diane Los Angeles
1946
-
3 Sellers, Peter Southsea, Eng.
1925
1980
4 Scott George C Wise, Va.
1927
-
5 Mcdowell, M Leeds, Eng
1943
-
6 Grant, Cary Bristol, Eng
1904
1986


Movie file
 
MVNUM MVTITLE YEARMADE MVTYPE NUMNOMS NUMADS DIRNUM
1 Annie Hall 1977 com
5
4
1
2 Dr Strangelove 1964 com
4
0
5
3 Clockwork Orange 1971 sci-fi
3
0
5
4 Psycho 1960 horror
3
0
2
5 The Birds 1963 horror
0
0
2
6 Grapes of Wrath 1940 drama
4
2
7


Terminology

Entities, Attributes and Relationships

Entity like a noun, a person, place or thing.

[eg for eloise they are directors, movies and movie stars]

Attribute this is a property of an entity. For the entity person, the list of attributes may include eye colour and height.

[for eloise the attributes of interest for the entity movie include movie title, type of movie, year of production etc.]


Examples of entities & attributes

 

Director
(entity)
 
dirnum
dirname
dirborn
dirdied
 (attributes)

 

 

 

Movie
(entity)
 
mv num
mv title
year made
mv type
num noms
num ads
dir num
 (attributes)

 

Relationship - this is an association between entities.

For example there is an association between directors and movies.

A director is associated with all the movies she or he has directed, and a movie is associated with its director. i.e. A director is related to all the movies he or she had directed, and a movie is related to its director.

This is an example of a one-to-many relationship. One director is associated with many movies, but each movie is only associated with one director.

 

Director
 
dirnum
dirname
dirborn
dirdied
 
 
relationship
 Movie
 
mv num
mv title
year made
mv type
num noms
num ads
dir num
 

 

Here the relationship is represented by an arrow.

The 'one' part of the relationship, in this case director, is indicated by a single headed arrow, and the 'many' part of the relationship, in this case movie is indicated by a double-headed arrow.

We can use this knowledge to update our definition of a database.

A database is a structure that can house information about multiple types of entities, the attributes of these entities, and the relationships among the entities.


Exercises:

  1. Give some informal queries and updates that would expect to apply to the eloise database.
  2. Give different database applications.
[Top][Learning Units]
[Previous][Next]