Database Design Flashcards

1
Q

Define and explain ‘ERD’

A

Entity relationship diagram - simple visual description of a database

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

State the four components of ERDs

A

1) Entities
2) Relationships
3) Cardinality
4) Attributes

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

Describe ‘Entities’ in relation to ERDs

A

The objects that will be linked i.e table or spreadsheet

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

Describe ‘Relationships’ in relation to ERDs

A

Shows which entities are linked together i.e relationships in Pbi

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

Describe ‘Cardinality’ in relation to ERDs

A

How many distinct values are within a column. Examples of cardinality are one-to-one, many-to-many, one-to-many etc

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

Describe ‘Attributes’ in relation to ERDs

A

A single non-zero value within a database (such as a single cell in Excel)

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

Describe a ‘Logical’ data model

A

A model that maps out maps out what the tables are called and which table is linked to each other.

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

Describe a ‘Physical’ data model

A

Includes more detail than a logical data model, such as data types, database triggers, storage procedures, access constraints/permissions

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

What does ‘INT’ refer to within database managament

A

Integer. For no decimal place whole numbers

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

What does ‘VARCHAR’ refer to within database management, and what does it mean.

A

Variable character. Defines the number of characters the database will accept up to. I.e VARCHAR(6) means that it will only accept entries up to 6 characters

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

What does ‘CHAR’ refer to within database management, and what does it mean.

A

Character. Defines the number of characters the database will accept ONLY. i.e CHAR (6) means that it will only accept entries of 6 characters

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

What does ‘NVARCHAR’ refer to within database management, and what does it mean.

A

Unicode variable character. Accepts characters with accents, hebru, arabic characters

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

What does ‘TINYINT’ refer to within database management, and what does it mean.

A

Tiny integer. Similar to integer, but only stores a low range of numbers, up to 255. If the range is exceeded, it revers to the other side of the range. i.e if you enter 256, it will class it as 0.

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

Describe a ‘relational’ database, and when you would use it.

A

Organises tables which can be linked/related based on data common to each

Use for small/medium amounts of data in simple formats

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

State the positives (3) and negatives (2) of using a relational database

A

Pros;
Easy to scale
Support available
Easy to understand structure

Cons;
Can’t use complex data formats such as videos and images
Complex relational databases can become confusing

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

Describe an ‘object-orientated’ database, and when you would use it.

A

Similar to a hierarchical database, but each part of the table is not a table, but an object (a wrapper that can contain any type of data, i.e photos, videos, tables)

When complex data formats are being used, or when frequent changes are being made.

17
Q

State the positives (2) and negatives (2) of using an ‘object-orientated’ database

A

Pros;
Easier navigation
Easier to learn, as structure is similar to real world queries.

Cons;
Not suited to simple data as the structure becomes cumbersome
Less tools and support available

18
Q

Describe a ‘No-SQL’ database, and when you would use it.

A

‘Not-only SQL’. Stores data across distributed servers. Data is stored in nodes that are linked using different attributes, and can accept huge amounts of data in complex formats.

Use it when dealing with large projects and a range of different data

19
Q

State the positives (3)and negatives (1) of using a ‘No-SQL’ database

A

Pros;
Good for huge amounts of data
Quick to scale/expand with new data in varying formats
Easy to maintain and recover from failures

Cons;
May require significant IT infrastructure

20
Q

Describe a ‘Hierarchical ‘ database.

A

Structured like an upside down tree - data is accessed through the root, moving down to the specific node. Each node can only have one parent

21
Q

State the positives (2)and negatives (3) of using a ‘Hierachical’ database

A

Pros;
Simple, organised structures makes it easy to understand
Can achieve high performance as data can be mapped efficiently to memory

Cons;
Less support available
Many data types are not supported
Only supports one-to-many relationships

22
Q

Describe a ‘Network’ database.

A

Similar to hierarchical databases, but nodes can have more than one parent, and many-to-many relationships are supported.

23
Q

Describe a ‘Multi-dimensional’ database.

A

All data is stored in a multi-dimensional cube.

24
Q

Describe the dimensions 1-5 in a multi-dimensional database

A
1 - multiple columns
2 - multiple rows
3 - multiple sheets
4 - multiple boxes (i.e workbooks)
5 - multiple major boxes (i.e 4 boxes)
25
Q

State the positives (3)and negatives (2) of using an ‘multi-dimensional’ database

A

Pros;

Simple structure
Fast performance
Huge capacity to store data

Cons;

With many dimensions, not all coordinates would be filled - giving a sparsely populated database
Less support due to relatively new innovation

26
Q

Describe the requirements for converting a logical data model into a physical data model

A
You must know the;
data location
standardised naming conventions
access procedures
primary and foreign keys
27
Q

Describe the ‘first normal form’ in Database normalisation

A

No repeating or duplicate fields
Each cell contains only a single value
Each record is unique, identified by a primary key

28
Q

Define a ‘compound primary key’

A

Where the primary key extends across multiple columns

29
Q

Describe the ‘second normal form’ in database normalisation

A

All non-key fields depend on all components of the primary key