Databases A brief introduction…
Definition A collection of non-redundant data shareable between different application (software).
Types There are two types of databases: Flat file Relational
Flat-File This is a single table database with separate copies of data in each part of the business. An example could be a phonebook.
Problems with flat-file Data duplication Wastes disk space and slows down query time. Maintenance Every instance of a piece of data needs to be updated if changed. Error More reliance on manual data entry means that data is more likely to contain errors.
Relational A collection of related files organised. Data is divided into logical groups and stored in multiple tables. The tables are then connected to each other through relation.
Characteristics Data is stored in a set of tables Tables are joined using relational links Reduces duplication of data in database Data is normalised Allows for greater flexibility and efficiency
Relationships Each table must have a unique reference for each record – primary key A composite primary key is where the p.k consists of several data items Linking a p.k to other tables creates the foreign key Foreign key are the relationships which links the tables together