Relational Model Flashcards

1
Q

What is the definition of Data Model?

A

Data Model allows us to translate real world into structures that a computer can store

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

What does a relational model contain?

A

Rows and Columns (Tuples/records and Attributes /fields)

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

What is the definition of relational database?

A

a set of relations

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

What is the definition of relation?

A

Relations are made up of Schema and Instance

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

What is a schema?

A

It specifies name or relation, plus name and type of each column (attribute)

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

What is an instance?

A

A table, with rows and columns

rows = cardinality
fields = degree(or arity)

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

What are the steps in the entire design cycle?

A
  1. Conceptual
  2. Logical
  3. Physical
  4. Implementation
  5. Instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to create relations in SQL?

A

CREATE TABLE RelationName (entity1 CHAR(20), entity2 FLOAT, entity3 INTEGER etc etc entityN Type)

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

What is the definition of primary key?

A

A set of fields is a superkey if no two distinct tuples can have same values in all key fields

Example: Student id

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

What is a candidate key?

A

All the other keys that isn’t the primary key

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

What is the definition of Foreign Key?

A

A set of fields in one relation that is used to ‘refer’ to a tuple in another relation

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

What is the definition of IC(Integrity Constraints)?

A

condition that must be true for any instance of the database; e.g domain constraints

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

SAMPLE QUESTION 1:
Every Subject has exactly one professor. Not all professors have teaching, but they only teach one subject if they do.

Pick the CORRECT answer
a. Arrows are used in the diagram
b. Only thin (optional) lines are used
c. There exists a weak entity
d. A mandatory many notation was used

A

a. Arrows are used in the diagram

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

Why do we use, say, a multivalued attribute ‘phone number’ in the first place in Chen’s diagrams?

A

Depending on the business rules/design specs. Sometimes it makes sense to have just two phones (and skip the handling multivalued attributes step) in the first place

a. Sometimes it makes more sense to make ‘phone’ its own entity

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