Relational Model- Structure Flashcards

1
Q

The scalar

A

The smallest semantic unit of data. It’s the smallest piece of data that has meaning

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

Domain

A

A named set of scalar values, all of the same type.
In the context of relational models: domains are pools of values from which actual attribute values are drawn

Domains are more than data types given nowaday.

E.g. domain of all possible cities in the world

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

Relation (remember)

A
  • set of attributes (heading) -> attribute name; domain name pairs
  • set of tuples (body) -> set of attribute - name, attribute - value pairs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Relation(definition)

A

A relation consists of a heading and a body.
The heading is a set of attributes, where each attribute is associated with a domain.
The body is a set of tuples, where each tuple is a set of attribute values.

The attribute values come from the domain that’s associated with that attribute’s name in the heading.

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

NB point about Atomicity.

A

Attribute values are scalar.
You can only have one thing in a place

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

Properties of relations

A
  1. There are no duplicate tuples
  2. Tuples are unordered, top to bottoms
  3. Attributes are unordered, left to right

(1-3 important for data independence)

All attribute values are atomic (can only come from domains of scalar values so they will always be atomic)

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

Table vs Relation

A

Relations are abstract objects. They are good to express the idea of what is happening in the database.

Tables are the actualisation of the models in the relational database

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