Chapter 3: entity relationship diagram Flashcards
What does the ER meta-model come with?
- Syntax
o Vocab : collection of modeling concepts and constructs that can be used for the development of conceptual data model
o Grammar : collection of rules independent meaning of the modeling concepts - Semantics
o Determine the domain independent meaning of the modeling concepts
. What are ER diagrams?
Conceptual models developed using the ER meta model
. What are the four concept or constructs of ER meta model?
- Entity (type) -> strong and weak (Ex: students, program, courses) Business entity - Relationship (type) Relationship between business entities o Degree Recursive Complex o Type 1: 1 relationship type 1: * relationship type * : * relationship type o Role - Attribute (EX: characteristics of entities: name of a student, address. Language) Property of business entity relation o Simple and composite o Single-valued and multi-valued o Derived o Candidate key o Primary key o Attribute - Multiplicity (numbers related to relationships, specifying how many relationship can or should exist connecting different entities) Structural constraint on role o Participation o Cardinality
What is an Entity Type? Entity vs entity type? and rules
Entity type is a collection of entities with the same property
Entity is a single occurence of an object
Entity type is a collection of entities, with 0, 1 or more occurences of the same object
Rules:
only use entity type, each entity type has a unique name, can model abstract or non tangible concepts
What is a relationship type vs relationship?
Relationship type: Collection of equal relations between objects (Ex: relations between the same types of objects with the same meaning)
Relationship: individual occurrence of a relation
Relationship type rules: - The degree of a relationship type indicates how many different entity types paryicipate in the relatiomship type: o Binary : 2 o Recursive/ unary : 1 o Complex: >2 Less frequent Harder to interpret
What is a role?
- Role indicates the purpose that each participating entity types plays in a relationship
- Easier and correct interpretation of a diagram : scenario
- Every recursive or binarty relationship has two roles
- In a diagram, roles can be indicated with a role name
- Withour role indicated, a reading arrow in a unary relationship type is rather pointless (non-interpretable or specified)
What is attribute type vs attribute
- An attribute is a property of an object
- An attribute type is a type of property
- An attribute type is a property of an entity type
Domain is a collection of possible values for one or more attribute types
What is a key
- A key is a minimal set of attributes types of which the values allow to uniquely identify each occurrence of an entity type
- Key allows us to select an exact observation from that table
What is a composite key?
In case more than on attribute type is needed to uniquely identify an entity type occurrence
Candidate key?
In case more than one key can be distinguished
Keys rules:
- ER required every entity type to have a key
- The candidate key that is selected is the primary key (PK)
Why do you need a key?
- In order to be able to identify, select, address or retrieve a specific entity
What is a weak entity type?
- The attribute types can not be used to uniquely distinguish an entity
- Weak entities can only be identified by means of a relation with another strong entity
- Existence-dependent on some other strong entity type
What are multiplicities?
- Structural constraints: set limits on the potential relations that an entity may have
- Ex: a staff member can be a supervisor of several staff members, but a staff member can only have one direct supervisor
- This information is incorporated in an ER diagram by specifying multiplicities
What is the multiplicity of a role?
- Potential number of entities that an entity of the role may have a relationship with
o Ex: a department is entrusted with possibly several projects, prjects are the responsibility of exactly one department - In ER diagram, they are stipulayed by means of a minimum and maximum
- CONNECTORS to roles, not to entity types
What are the two ways of adding limits to the potential amount of relations?
- Participation -> the existence of a relation can be forced
- Cardinality -> the number of relation can be limited
Cardinality vs participation
- Cardinality describes the maximum number of possible occurrences for an entity participating in a given relation type
- In most cases the cardinality is one (notation: 1 ) or many (notation: *)
- Participation determines whether all or only some entity occurences particapte in a relationship
- In most case the participation is zero (notation: 0) or one (notation: 1)
Define basic abstraction mechanisms
- Classification -> Define entity type or class o Identify entities with the same attribute types and participating in the same relationship types o Making abstraction of individual occurrences in the problem domain
- Instantiation -> identification of entities o Identify the elements of an entity type or class o Not a true abstraction mechanism, but helps constucting ER diagrams