Physical Database Design Flashcards

(20 cards)

1
Q

Before you create a physical database design what must you have

A
  • Which DBMS software to use
  • Logical database design (minimally in 3NF)
  • Transaction analyses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is step 1.1 of design base relations

A
  • Defining tables and columns (choosing data types, lengths etc)
  • Defining primary keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What should be considered when choosing if a derived attribute should be stored or calculated each time

A

if the derived attribute is very frequently queried it may be better to store it rather than calculating each time

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

How can we represent derived data (4 options)

A
  1. Use a generated column
  2. create a view
  3. use triggers
  4. calculate it each time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is a data base stored

A

as a collection of files. a database file is partitioned into fixed-length storage units called blocks (or pages)

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

Define a block/Page

A

a contiguous sequence of sectors from a single track tend to be 16KB each block

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

What is primary storage

A

Volatile storage. E.g., main memory, cache memory
Where operation on data happens

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

What is secondary storage

A

Non-volatile storage. E.g., magnetic disk, optical disk, tape, flash drives,…
Where the entire DB is stored

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

What is stable storage

A

Replicates information in several non-volatile storage media with independent failure modes. E.g., RAID (Redundant Array of Independent Disks)
Where the DB is backed up

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

What is a heap file

A

unordered collection of records placed on a disk in no particular order. fast for insert

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

What is a sequential file

A

records are ordered by the value of a specific attribute.

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

What is a hash file

A

Records are placed on disk according to a hash function

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

Which objects physically store data: tables or views?

A

Tables store data; views do not

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

How are rows stored on the disk in a clustered index

A

the rows are stored physically on the disk in the same order as the index

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

How are rows stored on the disk in a Non-clustered index

A

an index which maintains a logical ordering of data rows without altering the physical ordering of the rows.

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

What is the denormalisation process

A

is the process of trying to improve the read performance of a database, at the expense of losing some write performance, by adding redundant copies of data or by grouping data.

17
Q

What is DDL used for

A

to create tables

18
Q

What is DML used for

A

to insert and manipulate data

19
Q

What is physical database design

A

Decide how the DB is stored on secondary storage.
Includes:
Base relations (tables)
File organization (how blocks/pages are arranged)
Indexes
Constraints & security

20
Q

What are the steps of physical database design

A

1.1 Design base relations
1.2 Represent derived data
1.3 Enforce general constraints
2.1 File Organisations
2.2 Choose Indexes
3. create views for users/applications
4. security measures (authentication etc)
5. Denomalisation - controlled redundancy
6. storage structure overview