3.7 Relational Data Bases Flashcards
1
Q
What is a database ?
A
A data base is a structured way of storing data, so that it can be retrieved using queries
2
Q
What are records and fields ?
A
records are the rows of tables
fields are the columns
3
Q
What is a primary and foreign keys ?
A
primary key is a unique identifier that each record has in a table
foreign key is a primary key in a linked table
4
Q
What is a relation database ?
A
A relational database consists of 2 or more tables, connected to each other using a foreign key
5
Q
How does a relational database eliminate data inconsistency and redundancy ?
A
- Data in databases can contain repeating fields which are redundant as they are unnecessarily repeated.
- by creating a second table, where each item of item of data is only held once, no possibility in terms of spelling or data accuracy. Furthermore, no redundancy as the foreign key can be used to relate all the previously repeated data to the relevant record
6
Q
what are the different types of relationships ?
A
- 1 to many
- 1 to 1
- many to many