Beruflich Dokumente
Kultur Dokumente
Databases
QUICK RECAP
Organisations store data, but where?
Accounts Accounts
Quotation Order Generation
Receivables Payable
Program Program
Program Program
QUICK RECAP
So we use databases.
Databases avoid all the data problems associated with file storage. They provide
a (usually) single source/repository for organisational data. Modern enterprise
systems (ES) are built on a central database, and that is where data resides.
Accounts Accounts
Quotation Order Generation
… Receivables Payable …
Applications Applications
Applications Applications
Enterprise System
(Central database)
https://hbr.org/1998/07/putting-the-enterprise-into-the-enterprise-system
5
QUICK RECAP
About databases
Today, we talk
more about
Enterprise System
tables. (Central database)
- - - - -
- - - - -
- - - - - - - -
- - - - -
- - - - - - - - - -
- - -
- - - - - - - -
- - - - - - - - - - - -
- - - - - - - - - - - -
- - - -
6
QUICK RECAP
DBMS - the software that manages databases
USERS AND
APPLICATIONS
VIEW
LOGICAL
DBMS
PHYSICAL
7
READINGS
DESIGNING DATABASES
THE RELATIONAL data MODEL Creating a good structure for our data
to be stored.
How is data structured? How do we decide how the
data should be stored? What conditions do we need to
follow, if we wanted to create our own database?
TIME
THE RELATIONAL MODEL
10
A data model is a high level conceptual paradigm that describes how data
should be structured, so that it reflects how the data elements relate to
one another.
Organisational data represents real life, and so the data model often captures the
flow of data in business workflows and processes.
There are several common data models, but the relational model is the
predominant one as far as databases are concerned. According to the
relational model, data should be captured as records, in two-dimensional
tables that represent both the data and the data’s relationships. These
tables are known as relations. The rows correspond to individual records,
the columns correspond to their attributes.
11
STUDENT
Stu No First Name Last Name Age CAP Programme Faculty
DESIGNING A TABLE
Each tuple should be uniquely identifiable by a set of one or more attributes. This set is
called a key.
Super key: A set of attributes that uniquely identifies a tuple within a relation.
Candidate key: A super key such that no proper subset is a super key within the relation.
Composite key: A candidate key with more than one attribute
Primary key: A candidate key selected to uniquely identify tuples
Alternate key: A candidate key not selected as primary key
ANOTHER EXAMPLE
Let’s capture an old paper invoice into digital data
18
NORMALISATION: 1NF
NORMALISATION: 2NF
NORMALISATION: 3NF
TRY AGAIN