Half Term 3 Flashcards

1
Q

Databases

What is an entity?

A

A single object, person, event or thing eg customers, appointments, products about which data is to be recorded. An entity is represented with one (or possibly more) database tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Databases

What is an attribute?

A

A specific type of data representing a particular characteristic of each data record. Also known as a field or column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Databases

What is a flat file databse?

A

A database with a single table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Databases

What is a relational database?

A

A database that stores records in two or more tables. Records in one table can refer to records in another table to avoid duplicating data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Databases

What is a primary key?

A

An attribute that uniquely identifies every row of the table. If there is no natural attribute for a primary key, one should be introduced. The primary key is automatically indexed and cannot be blank

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Databases

What is a composite primary key?

A

Sometimes two or even more attributes are needed to uniquely define a record. These attributes form a composite key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Databases

What is a foreign key?

A

A primary key of one table which appears in another table. By doing this relationships between the tables are formed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Databases

What is a secondary key?

A

A field, other than the primary key, which is indexed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Databases

What is an index?

A

A list of keys (or keywords), each of which identifies a unique record. Indices make it faster to find specific records and to sort records by the index field (the field used to identify each record)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Databases

What is a relationship?

A

A relationship exists between two tables when one table has a foreign key that references the primary key of the other table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Databases

What is an example of a one to one relationship?

A

Husband and Wife (One husband has one wife)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Databases

What is an example of a one to many relationship?

A

Mother and Child (One mother has many children)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Databases

What is an example of a many to many relationship?

A

Actor and Film (Many films have many actors)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Databases

What is a record?

A

A row in a database table which contains data about one instance of an entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Databases

What is data integrity?

A

The overall accuracy and completeness of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Databases

What is referential integrity?

A

A foreign key must refer to an existing primary key. Referential integrity is violated when the primary key to which a foreign key refers no longer exists. A measure of the consistency of the data in a database

17
Q

Databases

What is a query?

A

A request for data or information from a database table or combination of tables

18
Q

Databases

What is data redundancy?

A

This occurs in database systems when the same piece of data exists in multiple places

19
Q

Databases

What is normalisation?

A

The process of structuring the data in a relational database according to formal rules, in order to avoid problems of data redundancy which leads to inconsistency and inaccuracy

20
Q

Databases

What is a field?

A

A part of a record that holds data of a specific type about one characteristic of the subject of the record

21
Q

Databases

What is a table?

A

A set of data items arranged using vertical columns (identifiable by name) and horizontal rows

22
Q

Databases

What are the pros of a flat file database?

A
  • Easy to set up - no knowledge required
  • Easy to use in code - e.g. CSV files are easy to process
  • Easy to share, e.g. email attachments
23
Q

Databases

What are the cons of a flat file database?

A
  • Duplication of data (data redundancy) which take more time to update, can lead to inconsistency
  • Take up more space so more storage is required
  • Everyone can see everything (not good if some data is sensitive)
  • Inefficient – have to have all fields for every record
  • Can’t perform complex queries as easily
24
Q

Databases

What are the pros of a relational database?

A
  • Reduces duplication of data meaning easier to update, accurate, better consistency, less storage space
  • Can set different access rights for each user for each table
  • Can index fields for quicker searching
  • If implemented with DBMS, it will allow concurrent access to the database allowing multiple users
  • Complex queries can be carried out
25
Q

Databases

What is the drawback of a relational database?

A
  • More difficult to correctly set up
26
Q

Databases

How does an index work?

A

An index is a small table. The first column comprises a copy of the primary or secondary key. The second column contains a pointer for holding the address of the location where that specific record is stored

27
Q

Databases

What is the benefit of a secondary key?

A

It is allows you to look up records using information other than the primary key

28
Q

Databases

What are the drawbacks of a secondary key?

A
  • It slows down inserts, updates and deletes because the database engine does not have to change the data only, but the index, too
  • An index needs space on hard disk and in RAM
29
Q

Databases