Database Systems: ER Diagrams and Relationships

ReformedOrbit avatar
ReformedOrbit
·

Start Quiz

Study Flashcards

18 Questions

What is the primary characteristic of a weak entity in entity-relationship modeling?

It participates in an identifying relationship with an owner entity

What type of relationship exists between an entity and itself in entity-relationship modeling?

Unary relationship

What is the term for the number of entities participating in a relationship in entity-relationship modeling?

Degree

What is the relationship type that exists between three different entities in entity-relationship modeling?

Ternary relationship

What is the primary purpose of an identifying relationship in entity-relationship modeling?

To identify a weak entity

What is the term for the direction of operation in entity-relationship modeling?

Bidirectional

What is a characteristic of a weak entity?

Its existence depends on another entity.

What type of entity is used to implement M:N relationships between entities?

Associative entity

What is the purpose of an associative entity?

To connect multiple entities in a M:N relationship

What is a characteristic of a generalization entity?

It encapsulates common characteristics of many entities

What is an aggregation entity composed of?

A set of entities

What is the relationship between a class and a set of member classes in a generalization entity?

Set-subset relationship

What is the main difference between a stored attribute and a derived attribute?

Derived attributes are calculated from other attributes, while stored attributes are manually entered by the user.

In Chen notation, how is an attribute typically represented?

As an oval containing its name and connected to the entity with a line.

What is the main characteristic of a weak entity in entity-relationship modeling?

It has a partial key and depends on another entity for its existence.

What should be done when implementing a multivalued attribute in a relational database?

Create a new entity for each of the original multivalued attributes’ components.

What is the purpose of a partial key in a weak entity?

To identify a unique instance of the weak entity.

What is the main difference between a regular entity and a weak entity?

A regular entity exists independently of other entities, while a weak entity exists only in relation to another entity.

Study Notes

Attributes

  • Single-value attributes can have only a single value.
  • Multivalued attributes can have many values.
  • Stored attributes must be entered by the user and stored in the database.
  • Derived attributes are calculated from other attributes and are not required to be stored in the database.
  • M:N relationships and multivalued attributes should not be implemented in relational tables.
  • Create several new attributes for each of the original multivalued attributes' components.
  • Create a new entity composed of original multivalued attributes' components.

Attributes Representation in ERD

  • Chen notation: attributes are represented by an oval containing its name and connected to the entity with a line.
  • Crow's Foot notation: attributes are written in an attribute box below the entity rectangle.

Types of Entities

Regular/Strong Entities

  • Existence does not depend on any other entity.
  • Has a key attribute.
  • Examples: Employees, Departments, Projects, and Students entities.

Weak/Subordinate Entities

  • Existence depends on another entity.
  • Has no key attributes of its own, but may have a Partial key.
  • Weak entities are identified by the combination of their Partial key (if exists) and Primary key of its identifying entity.
  • Examples: Dependent and Invoice entities.

Associative/Composite/Bridge Entities

  • Existence depends on two or more entities.
  • Used to implement M:N relationship between entities.
  • Composed of all key attributes of all connected entities.
  • May contain additional attributes that play no role in the connective process.
  • Has no key attributes of its own, but may have a Partial key.
  • Associative entities are identified by the combination of their Partial key (if exists) and all Primary keys of their identifying entities.
  • Examples: student grades depend on the student and the course.

Generalization

  • Encapsulates common characteristics of many subordinate entities.
  • Defines a set-subset relationship between a class and a set of member classes.
  • Used with Enhanced Entity Relationship Diagram (EER/E2R).
  • Examples: a four-wheeler is a type of vehicle, and a truck is a type of four-wheeler.

Aggregation

  • Consists of or an aggregation of other entities.
  • Defines a new entity from a set of entities which are identified as components of the root entity.
  • Used with Enhanced Entity Relationship Diagram (EER/E2R).
  • Examples: a car consists of engine, chassis, gear box, etc.

Relationships

  • Association between entities.
  • Participants are entities that participate in a relationship.
  • Relationships between entities always operate in both directions.
  • More than one relationship type can exist with the same participating entity types.
  • The relationship type has three main characteristics: Degree, Strength, and Cardinality/Constraints.
  • A weak entity must participate in an identifying relationship type with an owner or identifying entity type.

Relationships Degree

  • Unary/Recursive: Relationship between an entity and itself.
  • Binary: Relationship between two different entities.
  • Ternary: Relationship between three different entities.
  • Nary: Relationship between N different entities.

Test your knowledge of Enhanced Entity-Relationship Diagrams (EER/E2R) and relationships between entities. Learn about specialization, generalization, and association between entities.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser