ER diagrams and relationships
This study set covers essential concepts of ER diagrams and the relationships between entities in database design, which are crucial for understanding how data is structured and interconnected in relational databases.
Quiz(64 questions)
1. What is a characteristic of a One-to-One (1:1) relationship?
Terms in this Study Set(64)
Fundamentals of ER Diagrams(16)
Define an Entity in ER Diagrams.
An entity is a distinct object or thing in the domain. Examples include 'Customer' or 'Order'.
True or False: An ER diagram can represent many-to-many relationships.
True. ER diagrams can represent many-to-many relationships through the use of junction tables.
What does 'Cardinality' refer to?
Cardinality specifies the number of instances of one entity that can or must be associated with each instance of another entity.
List the three types of cardinality.
- One-to-One - One-to-Many - Many-to-Many
Fill in the blank: An __________ connects entities in an ER diagram.
relationship
What is a Relationship?
A relationship describes how two entities interact. Examples include 'purchases' or 'belongs to'.
Compare weak entity and strong entity.
A strong entity can exist independently, while a weak entity relies on a strong entity for its existence.
What is an Attribute?
An attribute is a property or characteristic of an entity. For instance, 'Name' and 'Price' are attributes of 'Product'.
Describe the purpose of ER Diagrams.
ER diagrams visually represent the data structure and relationships in a database, aiding in design and understanding.
True or False: ER diagrams can only represent data but not relationships.
False. ER diagrams represent both data and the relationships between different entities.
Example of a One-to-Many relationship.
A 'Customer' can place multiple 'Orders', but each 'Order' is placed by one 'Customer'.
What is an Attribute’s role in an entity?
Attributes provide specific details about an entity, defining its properties or characteristics.
List two common ER diagram symbols.
- Rectangle for entities - Diamond for relationships
What is a Composite Attribute?
A composite attribute can be divided into smaller sub-attributes, such as 'Full Name' into 'First Name' and 'Last Name'.
Cause → Effect: Adding a new attribute to an entity.
Cause: New data needs arise → Effect: The ER diagram is updated to include the new attribute.
What does a Primary Key represent?
A primary key uniquely identifies each record in an entity, ensuring no duplicates exist.
Types of Relationships(16)
One-to-One (1:1) Relationship
Each entity in set A is related to one and only one entity in set B. Example: A person has one passport.
One-to-Many (1:N) Relationship
An entity in set A can relate to multiple entities in set B. Example: A teacher can teach many classes.
Many-to-One (N:1) Relationship
Multiple entities in set A can relate to a single entity in set B. Example: Many students belong to one school.
Many-to-Many (M:N) Relationship
Entities in set A can relate to multiple entities in set B and vice versa. Example: Students enroll in multiple courses.
True or False: 1:1 means one entity relates to many.
False. 1:1 means each entity relates to exactly one of the other type.
Fill in the blank: In a 1:N relationship, ___ relates to many.
One entity relates to many, while the other relates to one.
What characterizes a recursive relationship?
An entity relates to itself. Example: An employee manages other employees.
Comparison: 1:N vs. M:N
1:N has a single origin with multiple destinations; M:N has multiple origins and destinations.
Cause: Many-to-Many relationships require what?
A junction table to properly link the two entities and resolve relations.
What is a junction table?
A table that connects two or more related tables to handle many-to-many relationships.
True or False: A 1:1 relationship can have null values.
True, one entity may not exist for the other.
What is a hierarchical relationship?
A type of relationship where entities are organized in a tree structure, like an organizational chart.
Example of a hierarchical relationship.
A company structure: CEO -> Manager -> Employee.
In ER diagrams, relationships are represented by what symbol?
A diamond shape connects entities, indicating their relationship type.
True or False: Relationships can exist without entities.
False. Relationships define how entities interact; they require entities.
What does cardinality indicate?
The number of instances of one entity related to instances of another; essential for defining relationships.
Attributes and Entities(16)
Attribute → Definition
An attribute is a property or characteristic of an entity in an ER diagram that describes its features.
Entity → Definition
An entity is a distinct object or thing in the database that can be identified and has attributes.
True or False: Attributes can exist independently of entities.
False. Attributes are dependent on entities; they describe the properties of entities.
Example of an entity
A student is an example of an entity. It has attributes like Student ID, Name, and Major.
What is a composite attribute?
A composite attribute is an attribute that can be divided into smaller sub-attributes. E.g., Full Name can be divided into First Name and Last Name.
Single-valued vs. multi-valued attributes
- Single-valued: only one value per entity. - Multi-valued: multiple values allowed per entity, e.g., Phone Numbers.
Fill in the blank: An entity set is a collection of _____.
Entities that share the same attributes.
Derived attribute → Example
An attribute that is derived from other attributes. E.g., Age can be derived from Date of Birth.
What distinguishes a primary key?
A primary key uniquely identifies each entity in an entity set, ensuring no duplicate entries.
Entity Types vs. Entity Instances
Entity types are templates for entities (e.g., Student), while entity instances are actual entries (e.g., John Smith).
True or False: Attributes can have different data types.
True. Attributes can be of various data types, such as integer, string, or date.
What is a key attribute?
A key attribute is an attribute that is used to uniquely identify an entity instance within an entity set.
What is a weak entity?
A weak entity is an entity that cannot be uniquely identified by its attributes alone and relies on a 'strong' entity.
Example of a composite attribute
Address can be a composite attribute consisting of Street, City, State, and Zip Code.
What role do attributes play in an ER diagram?
Attributes provide specific details about entities, defining their properties and adding depth to the data model.
Cause → Effect: Adding attributes to entities.
Adding attributes enhances the detail and usability of the entity representation.
Advanced ER Concepts(16)
What is a ternary relationship?
A ternary relationship involves three entities. Example: An order contains a customer, a product, and a sales representative.
True or False: A weak entity can exist without a strong entity.
False. A weak entity cannot exist independently and relies on a strong entity for its existence.
Define a recursive relationship.
A recursive relationship occurs when an entity is related to itself. Example: An employee manages other employees.
What is an associative entity?
An associative entity is used to represent a many-to-many relationship, holding attributes that describe the relationship.
Fill in the blank: A _____ relationship involves two entities and includes a third entity.
ternary
Compare strong and weak entities.
Strong entities have primary keys; weak entities depend on strong entities and have a partial key.
What is generalization in ER diagrams?
Generalization is the process of extracting shared characteristics from two or more classes into a generalized superclass.
Cause → Effect: What happens if an entity is removed?
If a parent entity is removed, dependent weak entities may also be deleted.
What are derived attributes?
Derived attributes are those calculated from other attributes, such as age from a birthdate.
True or False: All relationships in ER diagrams must have attributes.
False. Relationships can exist without attributes, but they can have attributes for additional detail.
Define a multi-valued attribute.
A multi-valued attribute can hold multiple values for a single entity, such as phone numbers for a contact.
What is specialization in ER diagrams?
Specialization is the process of defining one or more sub-entities of a higher-level entity based on some distinguishing characteristics.
Illustrate a complex relationship type.
A complex relationship type may include multiple entities, like a course that involves students, instructors, and classrooms.
Fill in the blank: An _____ entity cannot exist without a related strong entity.
weak
What is a participation constraint?
A participation constraint defines whether all or only some entity occurrences participate in a relationship. It can be total or partial.
True or False: An associative entity can have attributes.
True. An associative entity typically has its own attributes in addition to linking two entities.
Questions in this Study Set(64)
1. What is a characteristic of a One-to-One (1:1) relationship?
2. What best describes an attribute in an ER diagram?
3. What does an entity represent in an ER diagram?
4. What best describes a ternary relationship in an ER diagram?
5. In a One-to-Many (1:N) relationship, how many entities can the entity in set A relate to?
6. Which of the following is an example of an entity?
7. True or False: A weak entity cannot exist without a strong entity.
8. Which statement is true about weak entities?
9. What describes a Many-to-One (N:1) relationship?
10. True or False: Attributes can exist independently of entities.
11. What does the term 'relationship' indicate in an ER diagram?
12. How is a recursive relationship best defined?
13. Which of the following scenarios best illustrates a Many-to-Many (M:N) relationship?
14. What would be an example of a composite attribute?
15. Which is NOT a type of cardinality in ER diagrams?
16. What is the purpose of an associative entity?
17. True or False: A 1:1 relationship indicates that one entity can relate to many.
18. Which attribute type allows multiple values for a single entity?
19. What is the role of a primary key in an entity?
20. In ER diagrams, what is a multi-valued attribute?
21. Fill in the blank: In a 1:N relationship, ___ relates to many.
22. Fill in the blank: An entity set is a collection of _____.
23. Which of the following is an example of a One-to-Many relationship?
24. What happens to weak entities if their corresponding strong entity is deleted?
25. What is a recursive relationship?
26. What is a derived attribute?
27. Fill in the blank: An ER diagram consists of entities, attributes, and __________.
28. Which of the following is NOT a characteristic of derived attributes?
29. How does a 1:N relationship differ from a M:N relationship?
30. What does a primary key do in an entity set?
31. What is an attribute in the context of ER diagrams?
32. What is the main function of generalization in ER diagrams?
33. What is required for many-to-many relationships to function properly?
34. Which of the following best describes a weak entity?
35. What does a composite attribute represent?
36. Which statement accurately compares strong and weak entities?
37. Which statement correctly describes a junction table?
38. True or False: Attributes can have varied data types.
39. True or False: ER diagrams can represent complex relationships.
40. Fill in the blank: A _____ relationship can involve more than two entities.
41. True or False: A 1:1 relationship can have null values.
42. What distinguishes key attributes from regular attributes?
43. How do attributes help define an entity?
44. Which of the following best describes a participation constraint?
45. What defines a hierarchical relationship?
46. Which is NOT a type of attribute?
47. What do rectangles represent in an ER diagram?
48. Which of the following is true about associative entities?
49. Which scenario exemplifies a hierarchical relationship?
50. What role do attributes serve in an ER diagram?
51. Which of the following is a characteristic of a strong entity?
52. How is specialization defined in ER diagrams?
53. In ER diagrams, how are relationships represented?
54. What is the effect of adding attributes to an entity?
55. What happens when a new attribute is added to an entity?
56. Which relationship type involves multiple entities interacting together?
57. True or False: Relationships can exist without entities.
58. What is the difference between entity types and entity instances?
59. What does 'cardinality' indicate in ER diagrams?
60. What is a key feature of multi-valued attributes?
61. What does cardinality indicate in the context of relationships?
62. Which of the following statements about multi-valued attributes is correct?
63. Which of the following statements accurately describes a relationship in an ER diagram?
64. Which statement is true regarding a complex relationship type in ER diagrams?
Related Study Sets
SQL GROUP BY und HAVING
Transaktionen ACID Definitionen
Wiederholung: Tabelle Schlüssel
SQL WHERE
Abitur: SQL JOIN Idee
SQL subqueries flashcards
SQL GROUP BY and aggregate functions
Relationale Algebra
Create Your Own Study Set
Upload a PDF, paste your notes, or describe a topic – AI generates flashcards, quizzes and more in seconds.

