3) Entity Relationship Model Flashcards

(72 cards)

1
Q

What is the first step in the database design process?

A

Requirements collection and analysis

Interview prospective database users to understand requirements of database

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

What does the conceptual database design phase involve?

A

Create conceptual schema with descriptions of data types, relationships and constraints

Plan the data schema

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

What are high-level transactions in the database design process?

A

Main actions users will perform with the database

These actions are called transactions

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

What is involved in the implementation phase of the database design process?

A

Transform conceptual schema into implementation data model

Build the database in a system like MySQL or PostgreSQL

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

What does the physical design phase specify?

A

Internal storage structures and file organizations for the database

Application programs are designed and implemented as database transactions

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

What is the purpose of the Entity Relationship (ER) Model?

A

Visually design a database using diagrams

Helps plan out the structure of your data before building the database

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

List the main parts of the ER Model.

A
  • Entity
  • Attribute
  • Key Attribute
  • Relationship
  • Cardinality
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an entity in the context of the ER Model?

A

Thing or object you want to store data about

Examples include student, course, employee

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

Define an attribute in relation to an entity.

A

Detail or property of entity

Examples include name, id, email

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

What is a key attribute?

A

Attribute that uniquely identifies each entity

Example: id

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

What does a relationship in the ER Model show?

A

How two entities are connected

Example: student enrolls in a course

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

What does cardinality describe in the ER Model?

A

How many instances are involved in the relationship

Example: One student can enroll in many courses (1:N) and an employee manages one department (1:1)

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

What are the two types of attributes in an entity or relationship?

A

Simple and Composite attributes

Simple attributes are not divisible, while composite attributes can be divided into smaller subparts.

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

What is a single-valued attribute?

A

A single value for a particular entity

Example: age is a single-valued attribute of a person.

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

What is a multivalued attribute?

A

A set of values for the same entity

Example: college degrees attribute of a person.

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

Define stored attribute.

A

An attribute that is explicitly stored in the database

Example: birthdate.

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

Define derived attribute.

A

An attribute determined by other attributes

Example: age is derivable from the birthdate and the current date.

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

What does a null value indicate?

A

The absence of a given attribute value

Example: ApartmentNumber not applicable for a house.

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

What is an entity type?

A

A template that defines a group of similar entities

All entities in an entity type share the same set of attributes.

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

What is an entity set?

A

The set of entities of the entity type in the data

Example: entity set includes Toyota, Honda, etc.

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

What do ER diagrams focus on?

A

The structure (schema) of entities, not the actual data

ER diagrams illustrate relationships and attributes visually.

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

How are entity types shown in ER diagrams?

A

As rectangles with the name inside

Example: a rectangle labeled Employee.

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

How are attributes represented in ER diagrams?

A

As ovals connected to their entity with straight lines

Example: Name, ID, Age are shown as ovals.

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

What is a composite attribute?

A

An attribute that can be broken down into parts

Example: Name can be divided into First and Last.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How are multivalued attributes drawn in ER diagrams?
As double ovals ## Footnote Example: PhoneNumbers, since a person can have more than one.
26
What shape represents relationship types in ER diagrams?
Diamond-shaped boxes ## Footnote These are connected by straight lines to the entities.
27
What is a key attribute?
An attribute used to uniquely identify each individual entity ## Footnote This could be the name of a company or a social security number.
28
What is a composite key?
A combination of several attributes to uniquely identify an entity ## Footnote Example: both name and student ID could be used for a student.
29
What is a requirement for defining a key for an entity?
It must always be unique ## Footnote This uniqueness holds regardless of the number of entities (rows) present.
30
In ER diagrams, how is the key attribute represented?
It is underlined ## Footnote This indicates its function as a unique identifier.
31
What is a domain in the context of attributes?
The allowed set of values for an attribute, such as age must be between 16-70 for an employee ## Footnote Domains define the valid range for attributes like age, name, and salary.
32
What does a relationship type (R) represent?
How two or more entities are connected, like the ENROLLS_IN relationship connecting students to courses ## Footnote A relationship type involves multiple entity types and can have numerous relationship instances.
33
What is a relationship instance?
An actual connection between entities, such as Alice, a student, being enrolled in Math101 ## Footnote Each relationship instance reflects a specific occurrence of the relationship type.
34
What are recursive relationships?
When the same entity participates more than once in a relationship type in different roles ## Footnote An example is a supervision relationship where an employee is both a supervisor and a supervisee.
35
What are relationship constraints?
Rules from the real world that dictate how entities can be connected in relationships ## Footnote These constraints influence the design of databases and how data is structured.
36
What does the cardinality ratio indicate?
How many times one entity can be linked to another in a relationship ## Footnote There are three main types: One to One (1:1), One to Many (1:N), and Many to Many (M:N).
37
Define One to One (1:1) cardinality.
One entity is linked to exactly one instance of another entity, like 1 boyfriend has 1 girlfriend ## Footnote This relationship is exclusive and mutual.
38
Define One to Many (1:N) cardinality.
One entity can be linked to many instances of another entity, such as 1 department has many employees ## Footnote This relationship allows for multiple connections from one side.
39
Define Many to Many (M:N) cardinality.
One entity can be linked to many instances of another entity and vice versa, like 1 employee can work on many projects ## Footnote This relationship allows for extensive connections between entities.
40
What is the Participation Relationship Constraint?
It asks whether an entity needs to be part of a relationship to exist ## Footnote There are two types: Total Participation and Partial Participation.
41
What is Total Participation?
Every entity must be involved in the relationship to exist, shown with a double line in ER diagrams ## Footnote An example is that every EMPLOYEE must work for a DEPARTMENT.
42
What is Partial Participation?
Only some entities are involved in the relationship, shown with a single line in ER diagrams ## Footnote For example, not every employee is a manager, so only some EMPLOYEES participate in the MANAGES relationship.
43
Can relationships have attributes?
Yes, relationships can have attributes, like StartDate belonging to the MANAGES relationship ## Footnote This allows for additional information to be stored about the relationship itself.
44
When can an attribute of a 1:N relationship type be migrated?
It can only be migrated to the entity type at the N side ## Footnote For instance, StartDate in the WORKS-FOR relationship can only be assigned to EMPLOYEE.
45
What is the role of a schema designer regarding relationship attributes?
To subjectively determine where to place the relationship attribute to reduce redundancy ## Footnote The placement of attributes can affect the efficiency and clarity of a database design.
46
What is a weak entity type?
An entity that doesn’t have a key attribute of its own and cannot be uniquely identified on its own. ## Footnote Examples include DEPENDENT entities like children or pets, which share attributes like last name and birthdate.
47
How can a weak entity be uniquely identified?
By first finding the owner entity and then using the identifying relationship to connect them. ## Footnote For example, combining a DEPENDENT's first name with the owner's unique ID creates a unique composite key.
48
What notation is used to represent weak entities in ER diagrams?
Double rectangles. ## Footnote This notation indicates that the entity cannot be uniquely identified by its own attributes alone.
49
What do double diamonds represent in ER diagrams?
Identifying relationships of weak entities. ## Footnote These relationships connect weak entities to their owner entities.
50
What is a partial key?
An attribute that is not unique by itself but becomes unique when combined with the owner entity's key. ## Footnote For instance, a DEPENDENT's first name combined with an owner's unique ID forms a composite key.
51
What does a dashed underline indicate in ER diagrams?
A partial key for a weak entity. ## Footnote This key must be combined with the owner's unique key to create a unique identifier.
52
What does a straight line represent in ER diagrams?
A partial participation relationship. ## Footnote This indicates that some entities may not participate in the relationship.
53
What does a double line signify in ER diagrams?
A total participation relationship. ## Footnote This means every entity must participate in the relationship.
54
What shape is used to denote a multivalued attribute in ER diagrams?
Double oval. ## Footnote This indicates that an attribute can have multiple values.
55
What does an oval represent in ER diagrams?
A single valued attribute. ## Footnote This indicates that the attribute can only take one value.
56
What is indicated by an underlined attribute in ER diagrams?
A key attribute, which is a unique identifier of an entity within an entity set. ## Footnote Key attributes help in uniquely identifying entities.
57
What do 1, N, M signify at the end of lines in ER diagrams?
Cardinality, which describes the number of instances of one entity that can be associated with instances of another entity. ## Footnote Examples include 1:1, 1:N, and M:N relationships.
58
What is the purpose of specifying cardinality using a pair of integers in ER diagrams?
To indicate the minimum and maximum number of times an entity must participate in a relationship. ## Footnote This provides a more precise definition of the relationship.
59
Fill in the blank: A dashed oval in ER diagrams represents a _______.
derived attribute. ## Footnote Derived attributes are not stored directly in the database but can be calculated from other attributes.
60
What does a straight line represent in ER diagrams?
Partial participation relationship ## Footnote This indicates that an entity may or may not participate in the relationship.
61
What does a double line signify in ER diagrams?
Total participation relationship ## Footnote Every entity must participate in this relationship.
62
What shape is used to denote a relationship type in ER diagrams?
Diamond
63
What does an oval represent in ER diagrams?
Single valued attribute
64
What does a double oval indicate in ER diagrams?
Multivalued attribute
65
What is the significance of an underlined attribute in ER diagrams?
Key attribute (unique identifier of entity within entity set)
66
What shape represents a weak entity in ER diagrams?
Double rectangle
67
What does a dashed underline indicate for a weak entity?
Partial key for weak entity
68
What does a dashed oval represent in ER diagrams?
Derived attribute
69
What do the notations 1, N, and M signify in ER diagrams?
Cardinality ## Footnote This indicates how many instances of one entity can be associated with instances of another entity.
70
In cardinality notation, where should the letter N be placed?
On the side of the entity that has multiple instances in the relationship
71
What is a more precise way to specify cardinality than N:M?
Using a pair of integers (min, max)
72
What do the integers in cardinality notation represent?
Min is the minimum number of times an entity must participate in a relationship and max is the maximum number of times.