Relational Data Model Flashcards

1
Q

Relational model

A

A relational model is a way of organizing data in a database using tables, where each table represents an entity or concept in the real world, and each row in the table represents a specific instance of that entity. The data in each row is organized into columns, with each column representing a specific attribute or characteristic of the entity.

The key feature of the relational model is the ability to establish relationships between tables based on common attributes, known as keys. These relationships enable users to retrieve data from multiple tables simultaneously, providing a powerful tool for data analysis and reporting.

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

Relation

A

A relation is a mathematical concept based on the ideas of sets.

Informally, a relation looks like a table and typically contains a set of rows

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

Attribute name

A

Corresponds to the column header and gives an indication of the meaning of the data items in that column.

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

Key of a relation

A

A set of one or more attributes that uniquely identify each time in the relation.

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

Artificial key/surrogate key

A

A key added to a relation for the sole purpose of serving as a primary key. An artificial key is not based on any meaningful pour natural attributes of the data but it’s instead generated or assigned by the DBMS.

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

Schema of a relation

A

The structure or blueprint of the relation. It defines the attributes and make up the relation, their data types and any constraints or relationship between them.

CUSTOMER(cust_id, cust_name, address, phone)

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

Domain

A

A set of values with a specific data type and take off valid values.

It’s a constraint on the values that can be stored in an attribute of a relation.

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

Tuple

A

A single record or insurance of a relation.

It consists in a set of attributes values that correspond to the attributes of the relation.

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

State of a relation

A

The set of all tuples currently stored in the relation.

The state of a relation can change as tuples are inserted, updated our deleted from the relation.

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

Notation relation

A

R(A1, A2)
Let dom(A1)={0,1}
Let dom(A2)={a,b,c}
Then dom(A1) X dom(A2) is all possible combinations: {<0,a>, <0,b>, <0,c>, <1,a>, <1,b>, <1,c>}

For r(R) {<0,a>, <0,b>, <1,c>}
r(R)C dom(A1) X dom(A2) has three two tuples

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

Tuple Notation

A

t[Ai] or t.Ai

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

Constraints

A
  • Inherent or Implicit contraints
  • schema-based or Explicit contraints
  • Application-based contraints or semantic contraints
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Contraints

A

Conditions that must hold on all relation states

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

What are the three main types of explicit schema based constraints

A
  • Key constraints
  • entity integrity constraints
  • Referential integrity constraints

+ Domain constraints

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