Uploaded by Tinotenda Chingwe

Lecture 1

advertisement
Database Systems
Lecture 1
The organization’s life is in its data
and its livelihood is in its knowledge
Data
Information
Knowledge
Business Information Systems Software Systems
2
Organization of data
Database
File
Record
Field
Charact
er
Business Information Systems Software Systems
3
Organization of data
• Character – basic building block
(alphanumerical or special character)
• Field – a group of related characters
• Record – related fields
• File – a group of related records
• Database – integrated collection of
logically related data elements
Business Information Systems Software Systems
4
An outlook on kinds of
databases
• Classification of databases according to their use
– Operational Database (Transaction database)
• Customer database, Inventory, Human resources
– Distributed database
• A database that have multiple active nodes, which together
make up the database Eg., Bank
– External databases
• Referencing databases, eg. ZIMRA database to an
accounting organization, Stock Exchange database to a
broker
– Hypermedia databases
• E.g., ZFM database with audio recordings that can be
converted into playlists
Business Information Systems Software Systems
5
What is a database
• Collection of related data
• Representation of an aspect of the
real world
– Purpose
– Logically linked
– Deliberately built
Why should we have
databases?
• File systems are limited
1.
2.
3.
4.
Limited in Description
Different files with different file formats
Different application programs
No common application program for
extraction
5. Duplication of data
6. Redundancy of stored data
7. Inconsistencies of stored data
Business Information Systems Software Systems
7
Records in different files
• Human resources
– ID number
– Name
– Sex
– Employee Grade
• Counselling department
– ID number
– Name
– Dependent 1
– Dependent 2
– Dependent 3
– Employee Grade
– Employee Boss
Business Information Systems Software Systems
8
Inadequacies of File
Systems
• There is no description of the
structure of the data in a file
– For a database the catalog stores
definition of the data; this is the data
about the data (metadata)
Inadequacies of File systems
• Data redundancy – repeated information
– Human resources
•
•
•
•
ID number
Name
Sex
Employee Grade
– Counselling department
•
•
•
•
•
•
•
ID number
Name
Dependent 1
Dependent 2
Dependent 3
Employee Grade
Employee Boss
Business Information Systems Software Systems
10
Inadequacies of File systems
• Inconsistent updates – multiple place to change
(If we have a name change, eg., on marriage might change in
HR and not in Counselling)
– Human resources
•
•
•
•
ID number
Name
Sex
Employee Grade
– Counselling department
•
•
•
•
•
•
•
ID number
Name
Dependent 1
Dependent 2
Dependent 3
Employee Grade
Employee Boss
Business Information Systems Software Systems
11
Inadequacies of File systems
• Lack of integration – data in different files
– Human resources
•
•
•
•
ID number
Name
Sex
Employee Grade
– Counselling department
•
•
•
•
•
•
•
ID number
Name
Dependent 1
Dependent 2
Dependent 3
Employee Grade
Employee Boss
Business Information Systems Software Systems
12
Inadequacies of File systems
• Data dependence – data stored in different formats and styles
[[The boss is only stored in Counselling if required by HR the
format is an issue]]
– Human resources (Word File)
•
•
•
•
ID number
Name
Sex
Employee Grade
– Counselling department (Spreadsheet File)
•
•
•
•
•
•
•
ID number
Name
Dependent 1
Dependent 2
Dependent 3
Employee Grade
Employee Boss
Business Information Systems Software Systems
13
So; Why Database
• Self Describing
– Catalog with the metadata
• Data abstraction
– This is the program/data independence
– Storage of data is independent from the
manipulation of the data  results in a data
model
• Supports multiple views of the same data
• Data sharing
Data in a table (relation)
Business Information Systems Software Systems
15
Properties of a relation
• An attribute has a Domain. These
are the set of values that can
insatiate the given attribute.
• Each tuple in a relation is unique
• (A relation is a set, which means
there are no repeated tuples)
• A key is a set of attributes that
uniquely identify tuples in a relation
Business Information Systems Software Systems
16
Download