Database ( 2 ) Flashcards
what is a relational database?
A collection of tables in which relationships are modelled by shared attributes
How is data held in a relational database?
Data is held in relations ( tables ), and the relations are linked through common attributes
What each column in a relation represent?
One Attribute
What does each row in a relation represent?
One record
How is the entity represented in a relational table algebra?
Entity name is shown outside brackets, everything else is within brackets
How are attributes represented in relational table algebra?
Attributes are listed inside the brackets
How is the primary key represented in relational table algebra?
Underlined
Why is an index created?
- An index of primary keys is automatically created by the database software, giving the position of each record according to its primary key
- Needed to allow a particular record to be located very quickly.
Why are secondary keys created & indexed?
To allow even quicker searches, where only a primary key exists, searches would have to be done individually, which would be slower
What is normalisation?
A processed used to come with the best possible design for a relational database
What are the requirements of a database design?
- No data is unnecessarily duplicated
- Data is consistent throughout the database ( consistency comes with not holding any duplicated data ), this is to prevent anomalies when data is inserted/deleted
- Structure of each table is flexible enough to allow you to enter as many or as few times as required
- Structure should enable a user to make all manners of queries relating data from different tables