ER Modeling and Data Models Flashcards

(21 cards)

1
Q

What are the building blocks of ER?

A

-Entity
-Attribute
-Relationship

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

What is ER?

A

It refers to the Entity-Relationship (ER) Model.

Illustrates how real-world objects (entities) and their properties (attributes) relate to one another within a system.

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

What is an Entity?

A

It is a noun: object/thing to store (Student, Course).

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

What is an Attribute?

A

Properties (Name, Email) or characteristics of an entity.

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

What is a Relationship?

A

The association or link between two or more entities, which is often implemented using Foreign Keys.

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

What are the attributes types?

A

-Simple vs Composite
-Single-Valued vs Multivalued
-Stored vs Derived
-Optional vs Mandatory

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

What is the Simple vs Composite Attribute?

A

A simple attribute is an attribute that cannot be further subdivided into meaningful, smaller components. It holds a single, atomic (indivisible) value. Example: Gender.

A composite attribute is an attribute that can be broken down into a set of other, smaller attributes (which are often simple attributes). Example: Full Name, can be divided into First Name and Last Name.

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

What is the Single-Valued vs Multivalued Attribute?

A

A single-valued attribute is an attribute that can hold only one value for a particular entity instance. Example: Age, you can only be one age at the time.

A multivalued attribute is an attribute that can hold multiple values for a single entity instance. Example: Degree, one person can have more than 1 degree at the time.

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

What is a Stored vs Derived Attribute?

A

A stored attribute is an attribute whose values are physically stored in the database.

A derived attribute is an attribute whose values are calculated or derived from the values of other stored attributes

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

What is an Optional vs Mandatory Attribute?

A

A Mandatory Attribute (or Required Attribute) is one that must have a value in every record of an entity.

An Optional Attribute is one that may or may not have a value in a record. Can be NULL.

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

What is Cardinality?

A

Numerical relationship between rows of one table and rows of another table. It defines how many instances of one entity can relate to instances of another entity.

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

Types of Cardinality

A

-1 to 1 (1:1)
-1 to many (1:N)
-Many to many (M:N)

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

What is Participation?

A

Defines the extent to which an entity must be involved in a relationship.

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

Types of Participation

A

-Total (Mandatory)
-Optional

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

What is a Candidate Key?

A

It represents one of the potential choices that can be designated as the table’s Primary Key.

Minimal unique identifier(s).

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

What is a Primary Key?

A

Is the chosen Candidate Key, is not NULL. Unique identifier.

17
Q

What is an Alternate Key?

A

Rest of Candidate Keys that were not chosen to be PK.

18
Q

What is a Composite Key?

A

A key that consists of two or more attributes (columns) that are combined to uniquely identify each row in a database table.

19
Q

What is a Surrogate Key?

A

Unique identifier that is artificially generated and added to a database table to serve as its primary key. Has no real meaning.

20
Q

What is a Foreign Key?

A

Column or a set of columns in a database table that references the Primary Key (PK) or a Unique Key of another table. Enforces referential integrity.

21
Q

What are referential actions?

A

Rules defined on a Foreign Key (FK) constraint that tell the database management system how to automatically maintain data consistency.