1 / 17

Developing ER-Diagram

2. Data Modeling Process. Specifying entitiesSpecifying relationshipsDetermining identifiers (key attribute)Specifying attributes, andSpecifying domainsSpecifying cardinality

dora
Download Presentation

Developing ER-Diagram

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Developing ER-Diagram Indra Budi indra@cs.ui.ac.id

    2. 2 Data Modeling Process Specifying entities Specifying relationships Determining identifiers (key attribute) Specifying attributes, and Specifying domains Specifying cardinality & participation Specifying specialization & generalization concepts is necessary

    3. 3 Specifying Entity Entity – a class of persons, places, objects, events, or concepts about which we need to capture and store data. Named by a singular noun Teaching Notes: Prompt the students for additional examples. Have them classify their example(s). Obtain a data model from a source other than the textbook. Ask the students to classify the entities. Teaching Notes: Prompt the students for additional examples. Have them classify their example(s). Obtain a data model from a source other than the textbook. Ask the students to classify the entities.

    4. 4 Specifying Relationship Examine every combination of two entities and see whether there is a possible relationship between them This is often documented using a matrix that lists the entity names on both axes. A symbol is entered at the intersection of each row and column to indicate the existence of a possible relationship. This technique becomes unusable if the model is large. Look at the requirements documents to find relationships indicated by the documents. The two techniques can be used together

    5. 5 Identifiers One or more attributes can serve as the entity identifier, uniquely identifying each entity instance Concatenated identifier consists of several attributes

    6. 6 Specifying Attributes Attribute – a descriptive property or characteristic of an entity. Synonyms include element, property, and field. Just as a physical student can have attributes, such as hair color, height, etc., a data entity has data attributes Compound attribute – an attribute that consists of other attributes. Synonyms in different data modeling languages are numerous: concatenated attribute, composite attribute, and data structure.

    7. 7 Specifying Domain A domain is the set of valid data properties and values for an attribute. It can be imagined as the source of the possible values of that attribute, including type definition, initial value and value constraints. The use of domains allows attributes to inherit the properties of their assigned domains, and also allows the database administrator to change attribute properties by changing the domain properties. Domains can thus be used to enforce data standards throughout the model. Some organizations use data dictionaries to document and standardize domains and their properties.

    8. 8 Cardinality refers to the number of times instances in one entity can be related to instances in another entity One instance in an entity refers to one and only one instance in the related entity (1:1) One instance in an entity refers to one or more instances in the related entity (1:N) One or more instances in an entity refer to one or more instances in the related entity (M:N)

    9. 9 Participation Sometimes called modality Refers to whether or not an instance of a child entity can exist without a related instance in the parent entity Not Null means that an instance in the related entity must exist for an instance in another entity to be valid Null means that no instance in the related entity is necessary for an instance in another entity to be valid (min,max) participation

    10. 10 ERD - Design Guidelines Best practices rather than rules Entities should have many occurrences Avoid unnecessary attributes Clearly label all components Apply correct cardinality and modality Break attributes into lowest level needed Labels should reflect common business terms Assumptions should be clearly stated

    11. 11 True/False A conceptual schema is a complete logical view of the database. An implementational schema shows physical storage using a particular product or technique In E-R modeling, an attribute may be either composite or multi-value, but it cannot be both The degree of a relationship is expressed as the relationship’s maximum cardinality All weak entities must have a minimum cardinality of 1 on the entity on which it depends

    12. 12 Multiple Choice The representation of a particular entity is called a(n) ______________. entity class entity relationship entity instance entity attribute None of the above. Supertype / subtype entities are said to have a(n) __________________ relationship. HAS-A IS-A Recursive redundant multi-value

    13. 13 Multiple Choice (cont) In terms of generalization hierarchies, the characteristic of “inheritance” means that: the attributes of an instance of the supertype include the attributes of the subtype. an instance of the supertype must belong to one of the subtypes. the attributes of an instance of the subtype include the attributes of the supertype. there is a redundant relationship among instances of the subtype. the attributes of different subtypes must not overlap with each other.

    14. 14 Multiple Choice (cont) Minimum cardinality refers to ……. the most instances of one entity class that can be involved in a relationship with one instance of another entity class the minimum number of entity classes involved in a relationship whether or not an instance of one entity class is required to be related to an instance of another entity class whether or not an entity is a weak entity None of the above.

    15. 15 Fill in blank In a generalization hierarchy, the ……..entity contains the attributes that are common to all subtypes. Generalization hierarchies have a characteristic called …….which means that entities in the subtypes have all the attributes of the supertype. Relationships among entities of a single entity are sometimes called ….. Relationships When designing a data model the users’ views must be translated into the developers’ …….schema.

    16. 16 Exercise A company database needs to store information about employees (identifed by ssn, with salary and phone as attributes), departments (identifed by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identi.ed uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company. Draw an ER diagram that captures that information.

    17. 17 Addition to Group Presentation on Monday Each of the clinics in the hospital is identified by a unique name. There are two types of clinics: Local and distant. Clinics located at the main campus of the hospital are local and the remaining ones are distant. Some distant clinics are jointly operated by another health institution XYZ Healthcare. A director is responsible for each clinic. The director is also a doctor. Each doctor may serve as the director of one and only one clinic but may serve as the assistant director of another (one) clinic. There are a large number of laboratories at the hospital; some labs are managed by one clinic, whereas others are managed jointly by two or more clinics. Doctors are assigned to one clinic; each clinic has many doctors. Each patient is assigned to one primary doctor. A doctor takes care of many patients. Each patient has a number of tests done at a number of labs; each lab can carry out a number of tests. Draw an EER Diagram

More Related