databases Flashcards
what is an entity
an item of interest about which information is stored
what is a relational database
a database that recognises the difference between entities by creating different tables for each entity
what are attributes
characteristics of the entity
categories about which data is collected
what is a flat file
a database that consists of a single file
most likely be based around a single entity and its attributes
Entity1(Attribute1, Attribute 2…)
what is a primary key
unique identifier for each record in the table
usually underlined
what is the foreign key
the attribute that links two tables together
exist in one table as the primaryy key and act as a foreign key in another
what is a sechondary key
allows the database to be searched quickly
what are the 3 different entity relationship models
1 - 1
1 - many
many - many
1 - 1
each entity is linked to one other entity
1 - many
1 table is associated with many other tables
many - many
1 entity can be associated with many other entities
what is normalisation
the process of coming up with the best possible layout for a relational database
what does normalisation try to accomplish
no redundancy
consistent data throughout linked tables
records can be added and removed without issues
complex queries can be carried out
what are the 3 types of normalisation
1st normal form
2nd normal form
3rd normal form
first normal form
there must be no attribute that contains more than a single value
second normal form
a database which doesnt have any partial dependancies and is in first normal form can be said to be in second normal form. This means that no attributes can depend on part of a composite key