1.7 Database Systems Flashcards
What is a database?
An organized set of data constructed so that it can be searched, added to, deleted from or edited.
State 6 functions a database allows you to do.
- Create and edit data structures
- Add, Delete and modify data
- Format the data
- Import data from other sources
- Use queries to search for information
- Produce reports about data & set security
State 2 types of databases.
- Flat-file database
- Relational database
What is a flat file database?
A database that consists of a number of
tables with no link between them.
What is a relational database?
A database that consists of multiple tables that contain linked data, linked using relationships.
Give 4 advantages for a relational database.
- Less data duplication than a flat file system.
- Data consistency : Less repetition so there is also less contradictory entries.
- Better security; Individual users can be restricted to seeing specific parts of the database.
- Better flexibility : adding a table is easier than making changes to a large flat file.
Give a disadvantage for a relational database.
For simpler sets of data, a relational database may be overkill.
What are primary keys?
Unique identifiers of a record in a database.
What are foreign keys? (2)
- A primary key from one table included in another table.
- A field that allows a link between two tables.
What is an entity relationship diagram? (2)
- A real world thing (entity) is described
using a database table. - Links are used to show the type of relationship between the entities.
What is entity-relationship modelling?
Taking a real world situation and representing it using an entity-relationship diagram.
What are the three types of relationships?
- One-to-one
- One-to-many
- Many-to-many
Give an example of a 1-to-1 relationship.
Each driver has one vehicle and each vehicle is driven by only one driver.
Give an example of a 1-to-many relationship.
A teacher teaches multiple classes, but each class is only ever taught by one teacher.
Give an example of a many-to-many relationship.
A student can sit any number of exams, and several students sit each exam.