Podcast
Questions and Answers
What is the purpose of the role name in a relationship instance?
What is the purpose of the role name in a relationship instance?
- It indicates the type of relationship between the entities. (correct)
- It defines the cardinality ratio of the relationship.
- It determines the participation constraints of the entities.
- It specifies the minimum number of relationship instances an entity can participate in.
What is the cardinality ratio of a MANAGES relationship?
What is the cardinality ratio of a MANAGES relationship?
- M:N
- N:1
- 1:N (correct)
- 1:1
Which of the following statements is true about a WORKS_ON relationship?
Which of the following statements is true about a WORKS_ON relationship?
- It is an M:N relationship. (correct)
- It is an N:1 relationship.
- It is a 1:N relationship.
- It is a 1:1 relationship.
What is the purpose of the participation constraint in a relationship type?
What is the purpose of the participation constraint in a relationship type?
Which statement is true about the attributes of a 1:N relationship type?
Which statement is true about the attributes of a 1:N relationship type?
What type of relationship is described as a SUPERVISION relationship between EMPLOYEE in the supervisor role and EMPLOYEE in the subordinate role?
What type of relationship is described as a SUPERVISION relationship between EMPLOYEE in the supervisor role and EMPLOYEE in the subordinate role?
Which attribute in the EMPLOYEE table is best suited for the primary key?
Which attribute in the EMPLOYEE table is best suited for the primary key?
What does Entity Integrity ensure about primary keys in a base relation?
What does Entity Integrity ensure about primary keys in a base relation?
What is the purpose of a Foreign Key in a relation?
What is the purpose of a Foreign Key in a relation?
What does Referential Integrity require when a foreign key exists in a relation?
What does Referential Integrity require when a foreign key exists in a relation?
What is a Base Relation in the context of relational databases?
What is a Base Relation in the context of relational databases?
How does Null represent a value in an attribute within a tuple?
How does Null represent a value in an attribute within a tuple?
Which of the following is NOT a property of relations in the relational model?
Which of the following is NOT a property of relations in the relational model?
A composite key refers to a key that consists of:
A composite key refers to a key that consists of:
Which of the following statements about candidate keys is correct?
Which of the following statements about candidate keys is correct?
Which of the following is NOT a property of relations in the relational model?
Which of the following is NOT a property of relations in the relational model?
A super key is:
A super key is:
Which of the following statements about constraints on relationship types is correct?
Which of the following statements about constraints on relationship types is correct?
Flashcards are hidden until you start studying
Study Notes
Relational Database Schemas
- Primary key: The candidate key that uniquely identifies tuples within a relation.
- Foreign key: An attribute or set of attributes that matches the candidate key of another relation.
Entity Integrity
- No attribute of a primary key can be null in a base relation.
Referential Integrity
- If a foreign key exists in a relation, its value must either match a candidate key value of some tuple in its home relation or be wholly null.
General Constraints
- Additional rules specified by users or database administrators to define or constrain aspects of the enterprise.
Views
- Base relation: A named relation corresponding to an entity in the conceptual schema, stored in the database.
- View: The dynamic result of one or more relational operations on base relations.
Relational Model Terminology
- Relation, tuple, and attribute are used instead of table, row, and column.
- Operator, function, procedure, routine, and method refer to essentially the same thing.
Properties of Relations
- A relation has a distinct name from all other relation names in the relational schema.
- Each cell contains exactly one atomic value.
- Each attribute has a distinct name.
- The values of an attribute are from the same domain.
- Each tuple is distinct, with no duplicates.
- The order of attributes has no significance.
- The order of tuples has no significance, theoretically.
Relational Keys
- Super key: An attribute or set of attributes that uniquely identifies a tuple within a relation.
- Candidate key: A super key with no proper subset that is a super key.
- Composite key: A key consisting of more than one attribute.
Recursive Relationships
- A recursive relationship is a relationship between the same entity type, such as SUPERVISION between EMPLOYEE in the supervisor and subordinate roles.
Constraints on Relationship Types
- The cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in.
- Possible cardinality ratios for binary relationship types are 1:1, 1:N, N:1, and M:N.
Participation Constraints and Existence Dependencies
- The participation constraint specifies whether the existence of an entity depends on its being related to another entity via the relationship type.
- Min/max constraints can be specified.
- Participation constraints can be total or partial.
Attributes of Relationship Types
- Relationship types can have attributes, similar to those of entity types.
- Attributes of 1:1 or 1:N relationship types can be migrated to one of the participating entity types.
- For a 1:N relationship type, a relationship attribute can be migrated only to the entity type on the N-side of the relationship.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.