Databases | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A database allows information to be stored
in a systematic way.
A database program will allow a user to...
The design of the database is extremely important, so that the database operates efficiently.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Flat file 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. Relational databases make it possible to present different data to different users so each user has their own view of the data that is relevant to the application they are using. Managers of a business may see different data to office clerks.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||