1 / 23

Data Modeling and Entity-Relationship Diagrams

Learn about data modeling and entity-relationship diagrams, which are techniques used to organize and document a system's data.

dbeauchemin
Download Presentation

Data Modeling and Entity-Relationship Diagrams

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. Data Modeling and Entity-Relationship Diagrams

  2. Systems Modeling • A model is a representation of reality. Just as a picture is worth a thousand words, most system models are pictorial representations of reality. • Data modeling is a technique for organizing and documenting a system’s DATA. Data modeling is sometimes called database modeling because a data model is usually implemented as a database.

  3. System Concepts • Systems thinking is the application of formal systems theory and concepts to systems problem solving. • An ERD depicts data in terms of the entities and relationships described by the data.

  4. Entities • An entity is something about which we want to store data. • An entity is a classof persons, places, objects, events, or concepts about which we need to capture and store data. • An entity instance is a single occurrence of an entity.

  5. Attributes • An attribute is a descriptive property or characteristic of an entity. Synonyms include element, property, and field

  6. Attributes - Identification • Every entity must have an identifier or key. • An key is an attribute, or a group of attributes, which assumes a unique value for each entity instance. It is sometimes called an identifier. • Sometimes more than one attribute is required to uniquely identify an instance of an entity. • A group of attributes that uniquely identifies an instance of an entity is called a concatenated key. Synonyms include composite key and compound key.

  7. Relationships • A relationship is a natural business association that exists between one or more entities. The relationship may represent an event that links the entities, or merely a logical affinity that exists between the entities. • A connecting line between two entities on an ERD represents a relationship. • A verb phrase describes the relationship. • All relationships are implicitly bidirectional, meaning that they can interpreted in both directions.

  8. Cardinality • Each relationship on an ERD also depicts the complexity or degree of each relationship, and this is called cardinality. • Cardinality defines the minimum and maximum number of occurrences of one entity for a single occurrence of the related entity. Because all relationships are bi-directional, cardinality must be defined in both directions for every relationship.

  9. Foreign Keys • A relationship implies that instances of one entity are related to instances of another entity. • To be able to identify those instances for any given entity, the primary key of one entity must be migrated into the other entity as a foreign key. • A foreign key is a primary key of one entity that is contributed to (duplicated in) another entity for the purpose of identifying instances of a relationship. A foreign key (always in a child entity) always matches the primary key (in a parent entity).

  10. (a) (b)

  11. Data Modeling During Systems Analysis • A key-based data model will be drawn first. • A fully attributed data model will be constructed along with the process of analysis and design. • Each attribute is defined in the repository with data types, domains, and defaults.

  12. How to Construct Data Models • 1st Step - Entity Discovery • The first task is to discover those fundamental entities in the system. • There are several techniques that may be used to identify entities. • During interviews or JAD sessions with system owners and users, pay attention to key words in their discussion. • During interviews or JAD sessions, specifically ask the system owners and users to identify things about which they would like to capture, store, and produce information. • Study existing forms and files. • Some CASE tools can reverse engineer existing files and databases into physical data models.

  13. How to Construct Data Models • 1st Step - Entity Discovery • An entity has multiple instances • Entities should be named withnounsthat describe the person, event, place, or intangible thing about which we want to store data. • Define each entity in business terms.

  14. How to Construct Data Models • 2nd Step - The Context Data Model • The second task in data modeling is to construct the context data model. • The context data model includes the fundamental or independent entities that were previously discovered. • An independent entity is one which exists regardless of the existence of any other entity. Its primary key contain no attributes that would make it dependent on the existence of another entity. • Independent entities are almost always the first entities discovered in your conversations with the users. • Relationships should be named with verb phrases that, when combined with the entity names, form simple business sentences or assertions. • If only one-way naming is used, always name the relationship from parent-to-child.

  15. How to Construct Data Models • 3rd Step - The Key-Based Data Model • The third task is to identify the keys of each entity. • If you cannot define keys for an entity, it may be that the entity doesn’t really exist—that is, multiple occurrences of the so-called entity do not exist.

  16. How to Construct Data Models • 4th Step - Generalized Hierarchies • At this time, it would be useful to identify any generalization hierarchies in a business problem. • 5th Step - The Fully Attributed Data Model • The fifth task is to identify the remaining data attributes. • 6th Step - The Fully Described Model • The last task is to fully describe the data model. • Most CASE tools provide extensive facilities for describing the data types, domains, and defaults for all attributes to the repository.

  17. Group Project • Objectives • Milestone 2 (Data Model) • Milestone 3 • Overviews • Domain of Changes • Narrative descriptions of processes (data flows, data stores, external entities) • DFDs and ER diagrams

More Related