Define a database
An organised collection of data
Define a table
Stores data about a type of entity
Define an attribute
A column in a table, called a field
Define a primary key
An entirely unique identifier for an entity
Define a composite key
A pair of two attributes to make a primary key
Define a foreign key
A non-primary key attribute in one table which links to the primary key field in another table
Define data integrity
This refers to the accuracy and reliability of data
Define referential integrity
This refers to the data integrity in relational databases. It tidies up any effected records.
What are the types of entity relationships?
1 to 1
1 to many
Many to many
Define a flat-file
A single table which contains all the data, which can have repeating data or data which extends over multiple lines
Define the stages of 1st Normal Form
- Each record has a primary key
- Data is atomic
- No repeating groups of attributes
Define the stages of 2nd Normal Form
- Data is in 1NF
- There are no partial dependancies
Define the stages of 3rd Normal Form
- Data is in 2NF
- There are no non-key dependencies
What is SQL?
The standard tool for working with databases. It is a declarative language
Explain the DELETE SQL command
DELETE FROM tblName
This deletes from the table any record which matches the criteria
Explain the INSERT SQL command
INSERT INTO tblName (field-list)
This adds a record into the table with the specified values
Explain the SELECT SQL command
Explain the DROP SQL command
DROP TABLE tblName
or DROP DATABASE dbName
or DROP INDEX field-name ON tblName
This will delete the item named
Explain the JOIN SQL command
This allows data from 2 different tables to be selected, where the tables are linked with a foreign-primary key pair
Explain the ORDER BY SQL command
... ORDER BY field1 [ASC/DESC];
This orders the selected data in either ascending or descending order according to the criteria
What is the SQL wildcard?
This states to disregard what comes before/after the * for the given text
What is a client-server database?
A database residing on a server, with client applications written to access the database
What is concurrent requests?
When a request is made at the same time as another request
What is a problem with concurrent requests?
If one request is to update data, while another is to read or update data, then a problem can arise
What is a transaction in regards to client-server databases?
A single logical action / unit of work
What are the features of a good database?
Describe atomicity in regards to databases
The components of a transaction are atomic, it must succeed or fail
Describe consistency in regards to databases
Ensuring an illegal transaction is rejected so that the integrity is upheld
Describe isolation in regards to databases
Each transaction is dealt with in a way that doesn't affect others
Describe durability in regards to databases
Ensuring data is saved once a transaction is completed