Databases ( 1 ) Flashcards
What is an entity?
A category of object, person, event or thing of interest to an organisation about which data is to be recorded
What is a flat file data base?
• Consists of a single file
What is the simplest data base?
Flat file, which consists of information about a single entity
What is an attribute?
An attribute is a characteristic, each entity in a database has attributes
What is an identifier?
Each entity has an identifier which uniquely identifies a particular record ( usually known as a primary key - unique )
What is the unique identifier known as in a database?
Primary Key
What is a composite primary key?
- A second primary key used to use two or more attributes in conjunction to uniquely identify a record
- A primary key which consists of more than one attribute
What happens to the primary key?
it is automatically indexed, this is to allow any specific record to be found very quickly.
What is a secondary key?
A secondary index created on another field in order to allow faster searches
What are the various entity relationships?
- One to One
- One to Many
- Many to Many
What is an entity relationship diagram?
graphical way of representing relationships between entities in a database.
What is the structure of a database?
- Each entity is represented by a table
- Tables are referred to as relations
- A database contains one or more relations
- A relation has rows, each row containing one record
- Columns in the relation each contain one field belonging to the records
What is a foreign key?
An attribute that creates a join between two tables, it is the attribute that is common to both tables, and the primary key in one table is the foreign key in the table to which it is linked.
What is referential integrity?
No foreign key in one table can reference a non existent record in a related table