1.3.2 Databases Flashcards Preview

A-Level OCR Computer Science > 1.3.2 Databases > Flashcards

Flashcards in 1.3.2 Databases Deck (13)
Loading flashcards...
1

What is a primary key?

A field which has a unique value for every record.

2

What is a entity?

An entity is a category of data to be recorded in a database, entities have attributes.

3

What is a flat file database?

A database that consists of a single file.

4

What is an attribute?

The data attached to an entity. For example the entity Dentist might have the attribute name.

5

Write the entity description format out.

Entity (Attribute1, Attribute2)

6

What is the need for a secondary key?

A secondary key is indexed allowing for faster
searching.

7

How can an entity relationship be modeled?

|Entity|(One/Many)----(Name of the relationship)---(One/Many)|Entity|

8

What are the three degrees of relationships in a relational database?

One to one, One to many, Many to many.

9

How does a relational database work?

In a relational database a separate table is created for each entity identified, where a relationship exists between entities an extra field is added to the tables to link them.

10

What is a foreign key?

An attribute that creates a join between two tables and will be the primary key of one of the tables and the foreign in the other.

11

What needs to be done in the case of a many to many relationship?

An extra table is needed in order to link both tables consisting of foreign keys.

12

What is a composite key?

A primary key that consists of more than one attribute.

13

What is an issue likely to arise when using a flat file structure?

Redundant data and data inconsistencies.