BOOKLET 2 Flashcards
Flat file database#
A database which only contains one file, which is not linked to any other file. It allows simple operations such as sorting and filtering but is not very versatile
Data redundancy/duplication#
The same value is stored more than once thus taking up unnecessary space storing the same data multiple times. This makes the individual files difficult to maintain/update and may compromise the data consistency and integrity
Data inconsistency#
An attribute/field stored more than once in a database and has different values throughout; they contradict eachother. eg- a customer address is updated in one file but not another, or keyed in incorrectly in one of the files. Data may also be incomplete
Data dependence#
Data is kept seperate from the programs/software which uses/processes it. A databse should be designed in the way that allows its structure to change without preventing client programs that access the data from operating. if any chnages are made to the data in a flat file system then all the programs that are associated with that data also have to be altered which leads to a lack of flexibility
Data integrity#
Refers to the accuracy, validity and correctness of data. The intergrity can be compromised by accidental trasncription errors, processing errors or negligence- on the part of the user. These can be minimised by data verification/validation
Sharing of data is not possible on a flat file
A single channel is set up to gain access of the data on a hard drive, which means that no other user can gain access to the file simultaneously
Advantages of flat files
-Simple and quick to construct
-Minimal training needed
-Expertise not necessary
-Security (data dispersed, so if hacked into, they do not have access to anything)
-Software required is cheaper
Disadvantages of flat files
-Cannot share data
-Inconsistencies
-Poor data integrity
-Data redundancy/ duplication
-More time consuming (same data has to be entered repeatedly)
-Reports and queries quite restrictive
Relational database#
A complex database that stores data in multiple tables that are linked together using common fields referred to as key fields and foreign fields
Advantages of relational databases#
-No data duplication (saves space)
-Data integrity (data will be correct, accurate)
-No inconsistencies (data all stored in one location so will not be different versions of same data and it will all be in the same format)
-Data can be easily shared
-Quicker to enter data, only has to be entered once
-Security (easier to make secure through userID’s, passwords and access rights)
-Complex reports and queries easier to generate
Disadvantages of relational databases#
-More complex training required
-Specialist knowledge needed for maintenance
-Softwarre required is more expensive as it is more complex
Entity/table
A person or thing about which data is held. eg a car dealer would have an entity called customer
Attribute/field
-A data item held on a person or thing in a database
-The entity customer would have an attribute such as model
Key/primary key
Uniquely identifies a record/entity occurence
Composite key
Consists of two or more keys/fields each of which may be a primary key in another table
Foreign key
-An attribute in one table but is a primary key attribute in another table
-It is used as a link between the two tables
Logical data model
It is produced during the design stage of the database. It identifies:
-The entities
-The relationships between entities
-The attributes in each entity
-The keys in each entity
Physical data model
Defines the physical structure of the database. It creates:
-Table structures
-Column/field names
-Data types for each field
-Keys for each table
-Validation rules
1NF
Contains no repeating groups
-All data values are atomic
-Each field has a unique name
-It has a primary key
(eg one person doing more than one exam)
2NF
Remove fields that are not dependent on the whole primary key/ remove non-key dependencies
-First table rarely changes
-Check if you need to have both keys to bring up the field, if not, make a new table
3NF
A table is in 3NF if it contains no non-key dependencies
-Check if anything could be a primary key
Why is it not a good idea to have ALL information in one big, unnormalised table?
There will be data inconsistency, duplication, redundancy etc
Advantages of normalising data#
-Resulting database will take up less storage because duplication is minimised
-Information retrieval will be more efficient as data is structured effecively; queries will be processed faster
-Data integrity will be increased
Disadvantages of normalisation#
-Comples process
-Can generate more tables than an unnormalised database
-More tables= slower
-It is necessary to assign more relationships to interact with larger amounts of tables
-More tables= setting up queries can be more complex