Databases | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A database allows information to be stored
in a systematic way.
A database program will allow a user to...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Flat file / Relational Database All organisations need to store and retrieve information easily and quickly. A database not only stores the data, but also organises the data and controls access to it with a program called the DBMS (DataBase Management System). The earliest data storage systems used flat files. A flat file is like information stored in a grid. A flat file used by a video shop....
Each row is a record. Each column contains information on one field. No two records in a file can be the same or confusion will result, so each record has a primary key field, which uniquely identifies each record. Usually a special field is added for this....
The Code field is the primary key field. Flat files are inefficient.... The video shop wants to add fields to record who hires out the videos.
This file is inefficient because -
...so use a database with two tables... A VIDEO table :
A MEMBER table...
Each table in a database contains information about an entity eg Member, Video etc There is a link between the 'Mem No' field of the VIDEO table and the 'Mem No' field of the MEMBER table. A field common to two different tables is called a foreign field. If there are links between tables then we have a....
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Relational Database There may be many links between tables in a relational database. These links (relationships) may be...
Advantages of relational databases over flat-file :
Disadvantages....
Data in a database should be independent of the applications which use it. For example, it should be possible to add a field to a table without affected existing applications.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||