Why can a flat file database be problematic
Increase data redundancy
Decrease data integrity
What is a database?
A database is a collection of related or structured information held on computer
What is a relational database
A relational database contains more than one table, and the tables are linked through common fields
Advantages of relational databases
Data redundancy is reduced
Data integrity is greater
Queries and reports
What is a table
A table is the name for each group of similar data with rows for each entity and columns for each attribute
What is a record
A record is a collection of data terms, which may be of different data typoesm all relating to the individual or object that the record describes
What’s a field
A field is part of a record designed to hold a single data item of a specificed type
What is a primary field
A primary field uniquiely identifies a record
Definition of a foreign key
When the primary key from one table appears as a field in a second table, it is known as a foreign key of the second table
Composite key definition
A composite key is one that consists of 2 or more fields
Data validation definition
Validation is the automatic checking of data when it is entered into a computer system
Data type check definition
When data entered must conform to a certain type of character
Range check definition
To ensure that the data entered is between an upper and a lower limit
Presence check definition
To check that data has been entered into a field
Length check definition
This is when the entered data must be a certain number of characters
Format check definition
Some database packages allow the user to specify exactly what format the data being entered should take
Data type definition
A data type is a freak description of the kind of data being stored or manipulated within a program or system
Examples of data types
Text (String / alphanumeric)
Integer (number)
Date/time
Currency
Boolean (yes/no)
Autonumber
Calculated
3 Relationships
1-1
1-many
Many-many
What is a relationship
A relationship links 2 tables in a database using a field that exists in each of the tables
Advantages of having links between tables
Reduced data redundancy
Increases data integrity
Reports can be created for more than one table
Referential Integrity definition
Referential integrity ensures that an entry cannot be made in one table with a foreign key, if the key field does not exist in the linked table
What is a cascade update
cascade update / cascade delete ensures that changes made in the linked table are also shown in the primary table
What are forms
Forms are used to enter data into a database