10. Fundamentals Of Databases Flashcards

(35 cards)

1
Q

What is an entity ?

A

A thing about which data is to be stored eg. customer

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

What are attributes ?

A

Characteristics of entities

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

What are databases formed from ?

A

Tables

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

What do tables store ?

A

Entities

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

What must each entity have ?

A

A unique Identifier

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

What are the three types of relationships between tables in a database ?

A
  • One to One
  • Many to Many
  • One to Many
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a primary key ?

A

An attribute that provides an unique identifier for every entity in a database table .

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

What condition must be met when tables are linked by shared attribute ?

A

The attribute must be a primary key in one table and be be called a Foreign Key in the other.

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

What is a foreign key ?

A

An attribute which is a primary key in another related table

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

What is a composite primary key ?

A

Combination of attributes to form a key where it’s not possible to form a primary key from one attribute

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

What must be created when linking many to many relationships ?

A

A new table - Link table

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

What is Normalisation ?

A

Ensuring databases contain no redundant or repeated data

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

Why are databases normalised ?

A

Increase efficiency without any compromise to the integrity of their data

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

What are the pros of normalisation ?

A
  • Reduces the number of updates, insertion and deletion anomalies that occur
  • Easier to maintain
  • Faster searching and sorting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens when a database conforms to the first normal form ?

A

There are no repeating attributes and is atomic (no single column contains more then one value )

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

What happens when a database conforms to the second normal form ?

A

Must satisfy first normal form and partial key dependencies are removed

17
Q

What is a partial key dependency ?

A

Occurs in composite primary keys when a non-key attribute doesn’t depend on the whole composite key

18
Q

What happens when a database conforms to the third normal form ?

A

No non-key dependencies

19
Q

How is a database that meets the third normal form described ?

A

All non-key attributes depend on the key , the whole key and nothing but the key

20
Q

What are the four main SQL commands ?

A

SELECT, UPDATE , INSERT , DELETE

21
Q

What is the fixed length string data type in SQL ?

22
Q

What is the variable length string data type in SQL ?

A

VARCHAR(Size)

23
Q

What is the integer data type in SQL ?

24
Q

What is the Number with fractional part data type in SQL ?

A

FLOAT (Size, Precision )

25
What is the Date data type in SQL ?
DATE
26
What is the Date and time data type in SQL ?
DATETIME
27
What is the time data type in SQL ?
TIME
28
What is the year data type in SQL ?
YEAR
29
What does a client server database provide ?
Simultaneous access to a database for multiple clients
30
What is the problem of Concurrent Access ?
Different users attempt to access the same field at the same time
31
How can the issue of Concurrent Access be solved ?
Record Locks, Serialisation, Timestamp ordering and commitment ordering
32
What is the solution of Record Locks ?
When a record is accessed by a user it's locked to others until the user is finished with it .
33
What is the solution of Serialisation ?
Rather then locking a field , requests from others are queued .
34
What is the solution of Timestamp Ordering ?
When multiple commands are sent to the same field then each is assigned a timestamp and executed in order of their timestamps
35
What is the solution of Commitment Ordering ?
An algorithm is used to work out an optimum order in which to execute commands for the same field. Algorithm takes into account the impact of commands on other parts of the database and attempt to minimise issues from occurring.