Databases Flashcards

1
Q

Explain the properties of Serial Files:

How data is stored, the order of data and usage

A
  • Data stored in the order it is entered.
  • No order for the data is maintained.
  • Used for transaction files.

All data stored on one file.

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

Explain the properties of Sequential Files:

How data is stored, the order of data and usage

A

-Data is stored in order of a key field.
-Order maintained as new records are added.
- Useful for master files.
(Was kept on magnetic tapes).

All data stored on one file.

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

What is an Indexed Sequential File?

A

An index is maintained to allow groups of records to be quickly accessed.

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

Define a Database:

A

A database is a structured, persistent collection of data..

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

What does persistent mean?

A

The data is retained after the software has finished processing it.

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

What are the advantages of databases over files?

A
  • More efficient for processing.
  • Reduce storage requirements.
  • Avoid redundancy (duplicate data).
  • Allow different users to only see relevant data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are databases managed?

A

They are managed by a DBMS (Database management system).

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

What does a DBMS do?

A
  • Provides a manipulation language to access/change data.
  • Provide additional security.
  • Provide an interface for other programs to access data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Give an example of a DBMS

A

Microsoft Access.

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

What do databases consist of?

A

Tables (entities or files) that store data in rows (records/tuples) and columns (fields/attributes).

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

What is an entity?

A

A ‘thing’ in which data is recorded for. It is the actual table in a database.

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

What is a record?

A

A record/tuple is the row in a database.

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

What is a field?

A

The column in a database.

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

What do queries do?

A

Allow the modification of data.

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

Give some examples of a query:

A

Search, add, delete and sort.

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

What is a Flat File database?

A

-A single table (all data stored in one table)

17
Q

What are the disadvantages of a Flat File database?

A
  • They are harder to query.

- Data may be duplicated (inefficient use of memory).

18
Q

What is a relational database?

A
  • A database consisting of multiple related tables

eg students, subjects studied and tutor groups.

19
Q

What is the advantage of a relational database?

A

They are easier to query.

20
Q

Explain a one to one relationship:

A

One record in one table is related to one record in a different table.
eg Country and Prime Minister.

21
Q

Explain a one to many relationship:

A

One record in one table is related to many records in another table.
eg Tutor group (one record) and Students (many records).

22
Q

Explain a many to many relationship:

A

Broken down into two one to many relationships with an extra table used between them.
eg Cars and Parts becomes Cars —-= Car Parts=—- and Part

23
Q

What is used to denote a ‘many’ side of a relationship?

A

Three lines spreading out from a single line.

24
Q

What is a primary key?

A

A unique identifier assigned to the field of each record in a table.

25
Q

What is a Secondary Key?

A

An alternative identifier that can be used in a search if the primary key is unknown or impractical to use.

26
Q

What is a primary key used for?

A

Used in the index to help quickly search the database.

27
Q

How are tables linked?

A

Through the use of a common attribute. This attribute is a primary key of one table and a foreign key of another.