EntityRelationship Design Information Level Design TOP DOWN DATA

  • Slides: 27
Download presentation
Entity-Relationship Design Information Level Design

Entity-Relationship Design Information Level Design

TOP DOWN DATA ANALYSIS Computer systems are extremely complicated and cannot be developed without

TOP DOWN DATA ANALYSIS Computer systems are extremely complicated and cannot be developed without careful planning. The most common MIS is the Systems Development Life Cycle. This approach is to build a model of the information system based on the objectives and goals it must meet. This is called top down modeling.

Babysitter Service The AITP Service Club wants to run a babysitting service. Customers call

Babysitter Service The AITP Service Club wants to run a babysitting service. Customers call to request a sitter and the Club Coordinator assigns an employee to sit for the customer from a list of employees available for the particular day requested.

Entity-Relationship Model • A logical representation of the data of an organization or business

Entity-Relationship Model • A logical representation of the data of an organization or business area in graphical form

Enterprise E-R Diagram Employee Customer Job

Enterprise E-R Diagram Employee Customer Job

Data Flow Diagram Context Diagram Request Customer Confirmation Babysitter Information System Availability Assignment Employee

Data Flow Diagram Context Diagram Request Customer Confirmation Babysitter Information System Availability Assignment Employee

Data Flow Diagram Level 1 Request Assignment Confirmation New 1. Assign Employee Current D

Data Flow Diagram Level 1 Request Assignment Confirmation New 1. Assign Employee Current D 1 | Customer Avail Times Job Assign 2. Record Availability Avail Times D 2 | Employee D 3 | Jobs

Communications Model • A representation of the location at which data is stored and

Communications Model • A representation of the location at which data is stored and processed and the communications links that connect them.

Entity Relationship Models A good E-R model has One table for every entity in

Entity Relationship Models A good E-R model has One table for every entity in the business system n Correctly drawn relationships indicating 1 -1 or 1 -m cardinalities n Optionality indicators to support needed referential integrity n

ENTITY: A person, place, object, event, or concept about which the organization wishes to

ENTITY: A person, place, object, event, or concept about which the organization wishes to maintain data. • • • Must need to store data Must have at least two attributes Must have at least two records

ENTITY TYPES classes of people, objects or concepts about which we wish to store

ENTITY TYPES classes of people, objects or concepts about which we wish to store data. n n n become tables in a new computer system. Instances are rows Attributes are columns

ATTRIBUTE: A description or property of a given entity type. • • • Must

ATTRIBUTE: A description or property of a given entity type. • • • Must depend on the entity key alone Must contain information that we explicitly need Must have the same data type for all entity occurrences

RELATIONSHIP: . A connection between entity instances in different entity classes • • Must

RELATIONSHIP: . A connection between entity instances in different entity classes • • Must specify what row connects with what row in associated tables Must not describe processing

LOGICAL AND PHYSICAL COMPONENTS

LOGICAL AND PHYSICAL COMPONENTS

Narrative Description n The conceptual modeling process starts with a narrative description of the

Narrative Description n The conceptual modeling process starts with a narrative description of the process. This is a direct, active depiction of what the system should do. This is the basis of the initial data and process models.

Discovering Entities • • Entities are normally described by NOUNS and ADJECTIVES Entities do

Discovering Entities • • Entities are normally described by NOUNS and ADJECTIVES Entities do not change anything. Entity occurrences are records, entity types are files. Reports are derived output and not entities.

Discovering Entities • • • Entities with only one attribute are usually modeled as

Discovering Entities • • • Entities with only one attribute are usually modeled as attributes of another entity. Entities that have only one record are usually modeled as a set of parameters and not as files. Include only files (entity types) that are needed by a system. Extra entities require maintenance and space that can add considerably to the cost of a system.

Converting a text description into an E-R model: 1. Review the conceptual description of

Converting a text description into an E-R model: 1. Review the conceptual description of the business area for nouns that describe the system. 2. Each entity type should have more than one potential instance. 3. Each entity type should have more than one attribute. 4. Each entity type should be relevant. .

Relationships A relationship is a connection between records in one table and those in

Relationships A relationship is a connection between records in one table and those in another. n n Instructor assigned to class (section) Student enrolled in class (section)

RELATIONSHIP. Does not describe processing or change any data. Relationship names should be passive

RELATIONSHIP. Does not describe processing or change any data. Relationship names should be passive (ordered by). • • CARDINALITY Refers to the number of records that a relationship connects to a given child record in a relationship. PARTICIPATION (Optionality) Refers to whether a record must exist in one table before a related one is inserted into another.

Diagrams: 1: m Relationships Instructor. ID Section Course. Section Instructor. ID

Diagrams: 1: m Relationships Instructor. ID Section Course. Section Instructor. ID

Diagrams: m: n Relationships Course. Section Student. ID Student-Section Course. Section Student. ID Student

Diagrams: m: n Relationships Course. Section Student. ID Student-Section Course. Section Student. ID Student

Optionality (Referential Integrity) Records in a table that have a relationship with another table

Optionality (Referential Integrity) Records in a table that have a relationship with another table may be restricted by optionality requirements. n n Relationship Optional Relationship Mandatory (referential integrity enforced)

Optionality Optional (0 allowed) 0 Mandatory (1 or more required) 1

Optionality Optional (0 allowed) 0 Mandatory (1 or more required) 1

Optionality A constraint should be mandatory only if the relationship must be known whenever

Optionality A constraint should be mandatory only if the relationship must be known whenever a record is first entered. Most relationships are optional.

Maintaining Integrity If a parent record is deleted then an optionality relationships can be

Maintaining Integrity If a parent record is deleted then an optionality relationships can be maintained in several ways n n n Cascade delete Cascade update Cascade null

Data

Data