Databases Flashcards

1
Q

Data model

A

An abstract model of which things to store and what information about them should be recorded

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

Entity

A

A thing about which data is to be stored

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

Attributes

A

Characteristics or other information about entities

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

Databases

A

Tables used to store multiple entities

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

Entity identifier

A

An attribute given to each entity that is unique within the table

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

Entity description

A

The name of the table is shown outside of brackets (which contain each of the attributes)

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

Relational databses

A

The tables in a database are connected by common attributes

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

Entity relationship diagrams

A

Used to graphically represent the relationships between tables in a database

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

Primary key

A

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

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

Foreign key

A

The attribute that is the primary key in the other, connected table

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

Composite primary key

A

Combining multiple attributes that act as a primary key

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

Many-to-many relationships

A

A new linking table must be created

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

Database normalisation

A

The process of making a database efficiency without compromising the integrity of the data

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

Advantages of normalisation

A
  • Reduced redundancies
  • Faster searching, sorting and querying of data
  • Easier maintenance
  • Improves data integrity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

First normal form

A

No repeating attributes (data must be atomic)

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

Second normal form

A
  • Be in 1NF
  • No partial key dependencies
17
Q

Partial key dependencies

A

When a non-key attribute doesn’t depend on the entire composite primary key

18
Q

Third normal form

A
  • Be in 2NF
  • Have no non-key dependencies
19
Q

Non-key dependencies

A

When a non-key attribute is dependent on other no-key attributes instead of the primary key

20
Q

SQL

A

An easy to learn, declarative language used with databases

21
Q

SELECT

A
  • Used for retrieving data from a database table
  • SELECT <attribute> FROM <table> WHERE <condition></condition></attribute>
22
Q

UPDATE

A
  • Used for modifying the attributes of an existing entity
  • UPDATE <table> SET <attribute> = <value> WHERE <attribute> = <value></value></attribute></value></attribute>
23
Q

DELETE

A
  • Used for removing entities from a database
  • DELETE FROM <table> WHERE <condition></condition>
24
Q

INSERT

A
  • Used to add new records to an existing table
  • INSERT INTO <table> (<column1>, <column2>, …) VALUES (<value1>, <value2>, …)</value2></value1></column2></column1>
  • INSERT INTO <table> VALUES (<value1>, <value2>, …)</value2></value1>
25
Q

Wildcard

A
  • Used to specify any possible value
  • *
26
Q

CREATE

A
  • Used to make new database tables
  • Specifies name, attributes and data types
27
Q

Datatypes

A
  • CHAR
  • VARCHAR
  • INT
  • FLOAT
  • DATE
  • DATETIME
  • TIME
  • YEAR
28
Q

Client server databases

A

A database that allows for simultaneous access for multiple clients

29
Q

Concurrent access

A

An issue where multiple different users try to access the same field at the same time

30
Q

Record locks

A
  • When a record is accessed by one user, it is immediately locked to other users until
    the first user has finished using it
  • Other users are blocked from accessing or modifying the content of a field until it
    has been unlocked
31
Q

Serialisation

A

Requests from other users are placed in a queue, executed sequentially

32
Q

Timestamp ordering

A

When multiple commands are sent to the same field in a database, each is
assigned a timestamp which marks the point in time at which the command was
initiated

33
Q

Commitment ordering

A

An algorithm is used to work out an
optimum order in which to execute commands for the same field