Databases and distributed systems Flashcards
paper 2
what is a relational database?
multiple tables that contain related data that is linked using relationships
relational database pros
(name 3)
less data redundancy (repeated data less common)
data consistency (fewer contradictory entries)
better security (can restrict viewing access)
better flexibility (easy to add new table)
data independence (data can be used for multiple things without customisation)
relational database cons
greater complexity
can take longer to retrieve data if it is across multiple tables
can be overkill for simple sets of data
primary key
unique identifier in a table
foreign key
primary key from one table within another to link tables together
data consistency
ensure that the constraints or limitations placed on the database area adhered to
data reduncancy
duplication of data, data held in multiple locations
harder to maintain accuracy if the data changes
data integrity
correctness of the data over time
validation checks (name 4)
type check (correct data type)
length check
range check
format check (conforms to set of rules)
presence check
check digit
verification check
double entry (enter data twice to ensure accuracy)
proof reading (read over input to manually check)
field
one category of data in a table (a column)
relationship
a link between two tables
can have one-to-many
can’t have one-to-one (except passwords) or many-to-many
normalisation
the process of converting a flat file database into a relational database
1NF
each field only contains one piece of data
all attributes dependent on the primary key
no data redundancies
2NF
1NF + no partial dependencies