3.10 Fundamentals of Databases Flashcards

1
Q

entity definition

A

category of object about which data is to be recorded, Entity1 (Attribute1, Attribute2…)

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

attribute definition

A

characteristics about entities

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

entity identifier

A

each identity has a unique identifier, an attribute that is unique within that table, underlined

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

relationships between entities

A

one-to-one, one-to-many, many-to-many

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

foreign key

A

attribute that creates join between two tables, attribute that is common in the tables, called primary key in one and foreign in other

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

first normal form

A

contains no repeating attributes or groups of attributes, split repeating attributes so it becomes 1nf

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

second normal form

A

database must satisfy first normal form, partial key dependencies are removed

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

partial key dependency meaning

A

one or more attributes depends on only part of a primary key

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

third normal form

A

conforms to second normal form, database must have no non-key dependencies, all attributes depend on the key, the whole key and nothing but the key

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

importance of normalisation

A

easier to maintain and change, no unnecessary duplication of data, faster sorting and searching, saves storage space as data is only held once

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

normalisation

A

no data is unnecessarily duplicated, data is consistent throughout database automatically, structure of table is flexible

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

SQL as declarative language

A

programmer describes the result that’s required

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

SELECT command SQL

A

used for retrieving, SELECT <attribute> FROM <table> WHERE <condition> (ORDER BY <ASC/DESC>)</condition></attribute>

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

UPDATE command SQL

A

modifies attributes of already existing entity, UPDATE <table> SET <attribute> = <value> WHERE <attribute> = <value></value></attribute></value></attribute>

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

DELETE command SQL

A

removes entities from database, DELETE FROM <table> WHERE <condition></condition>

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

INSERT command SQL

A

adds new records to existing table, INSERT INTO <table> VALUES (<value1> <value2>)</value2></value1>

17
Q

wildcards

A

any possible value, can return all values

18
Q

defining table with SQL

A

CREATE TABLE tablename (attribute datatype, …)

19
Q

client server database

A

provides simultaneous access to database for multiple clients, concurrent access occurs when same field is being accessed at same time by different users

20
Q

how is concurrent access managed

A

record locks, serialisation, timestamp ordering, commitment ordering

21
Q

record locks

A

when a record is accessed by one user, it is immediately locked to others until user is finished, blocked from accessing or modifying

22
Q

serialisation

A

requests from other users are placed in a queue

23
Q

timestamp ordering

A

each command is assigned a timestamp and commands are carried out in order of timestamps

24
Q

commitment ordering

A

algorithm is used to work out optimum order in which to execute commands

25
client server database advantages
consistency of database is maintained because only on copy of data held rather than a copy at each workstation, resource can be made available to large number of users, access rights and security managed centrally, backup and recovery managed centrally