Download presentation
1
Lesson-20 Data Modeling and Analysis(2)
Discover entities and relationships. Construct an entity-relationship context diagram. Discover or invent keys for entities and construct a key-based diagram. Construct a fully attributed entity relationship diagram and describe all data structures and attributes to the repository or encyclopedia. Normalize a logical data model to remove impurities that can make a database unstable, inflexible, and no scalable. Describe a useful tool for mapping data requirements to business operating locations.
2
Data Modeling Concepts: Foreign Keys
A nonspecific relationship (or many-to-many relationship) is one in which many instances of one entity are associated with many instances of another entity. Nonspecific relationships must be resolved. Most nonspecific relationships can be resolved by introducing an associative entity. No additional notes
3
Resolving Nonspecific Relationships
No additional notes
4
Data Modeling Concepts: Generalization
Generalization is a technique wherein the attributes that are common to several types of an entity are grouped into their own entity, called a supertype. An entity supertype is an entity whose instances store attributes that are common to one or more entity subtypes. An entity subtype is an entity whose instances inherit some common attributes from an entity supertype and then add other attributes that are unique to an instance of the subtype. Teaching Tips: Ask the students to identify a generalization example. What are some common attributes? What are some unique attributes associated with the subtype(s)?
5
Entity Discovery for Sound Stage
Entity Name Business Definition agreement A contract whereby a member agrees to purchase a certain number of products within a certain time. After fulfilling that agreement, the member becomes eligible for bonus credits that are redeemable for free or discounted products. member An active member of one or more clubs. Note: A target system objective is to re-enroll inactive members as opposed to deleting them. member order An order generated for a member as part of a monthly promotion, or an order initiated by a member. Note: The current system only supports orders generated from promotions; however, customer initiated orders have been given a high priority as an added option in the proposed system. transaction A business event to which the Member Services System must respond. product An inventoried product available for promotion and sale to members. Note: System improvement objectives include (1) compatibility with new bar code system being developed for the warehouse, and (2) adaptability to a rapidly changing mix of products. promotion A monthly or quarterly event whereby special product offerings are made available to members. Conversion Notes Several business changes were made to the SoundStage running case study. Thus, the entity list and subsequent data models and normalization examples have changed from the previous edition.
6
The Context Data Model MEMBER ORDER MEMBER TRANSACTION PRODUCT
AGREEMENT PROMOTION responds to places binds is a has conducted generates features sells No additional notes.
7
The Key-based Data Model
TRANSACTION Primary Key Transaction-Reference-Number [PK1] MEMBER ORDERED PRODUCT Order-Number [PK1] [FK] Product-Number [PK2] [FK] TITLE PROMOTION Product-Number [PK1] [FK] Promotion-Number [PK2] [FK] MEMBER ORDER Order-Number [PK1] MEMBER Member-Number [PK1] PRODUCT Product-Number [PK1] AGREEMENT Agreement-Number [PK1] PROMOTION Promotion-Number [PK1] features is featured as sold as sells places binds is a has conducted responds to generates Edit this slide as needed to ensure readability.
8
The Key-based Data Model With Generalization
AUDIO TITLE Primary Key Product-Number [PK1] [FK] VIDEO TITLE GAME TITLE TITLE MERCHANDISE TRANSACTION Transaction-Reference-Number [PK1] MEMBER ORDERED PRODUCT Order-Number [PK1] [FK] Product-Number [PK2] [FK] PROMOTION TITLE Promotion-Number [PK1] [FK] MEMBER ORDER Order-Number [PK1] MEMBER Member-Number [PK1] PRODUCT Product-Number [PK1] AGREEMENT Agreement-Number [PK1] PROMOTION Promotion-Number [PK1] is featured as features sold as sells places binds is a has conducted responds to generates Edit this slide as needed to ensure readability.
9
The Fully-Attributed Data Model
MEMBER ORDER Primary Key Order-Number [PK1] Non-Key Attributes Order-Creation-Date Order-Fill-Date Member-Name Member-Address Shipping-Address-Name Shipping-Street-Address Shipping-City Shipping-State Shipping-Zip Shipping-Instructions Order-Sub-Total Order-Sales-Tax Order-Shipping-Method Order-Shipping-&-Handling-Cost Order-Status Order-Prepaid-Amount Order-Prepayment-Method Promotion-Number [FK] Member-Number [FK] Member-Number Member-Number [FK] Ordered-Product-Number Quantity-Shipped Quantity-Backordered Ordered-Product-Description Ordered-Product-Title Purchased-Unit-Price Extended-Price MEMBER Member-Number [PK1] Member-Status Member-Street-Address Member-Post-Office-Box Member-City Member-State Member-Zip-Code Member-Daytime-Phone-Number Member-Date-of-Last-Order Member-Balance-Due Member-Credit-Card-Type Member-Credit-Card-Number Member-Credit-Card-Expire-Date Member-Bonus-Balance-Available Audio-Category-Preference Audio-Media-Preference Date-Enrolled Expiration-Date Game-Category-Preference Game-Media-Preference Number-of-Credits-Earned Video-Category-Preference Video-Media-Preference Agreement-Number [FK] Privacy-Code -Address PRODUCT Product-Number [PK1] "Universal-Product-Code (Alternate Key)" Quantity-in-Stock Product-Type Suggested-Retail-Price Default-Unit-Price Current-Special-Unit-Price Current-Month-Units-Sold Current-Year-Units-Sold Total-Lifetime-Units-Sold VIDEO TITLE Product-Number [PK1] [FK] Producer Director Video-Category Video-Sub-Category Closed-Captioned Language Running-Time Video-Media-Type Video-Encoding Screen-Aspect MPA-Rating-Code AUDIO TITLE Artist Audio-Category Audio-Sub-Category Number-of-Units-in-Package Audio-Media-Code Content-Advisory-Code GAME TITLE Manufacturer Game-Category Game-Sub-Category Game-Platform Game-Media-Type Number-of-Players Parent-Advisory-Code TRANSACTION Transaction-Reference-Number [PK1] Transaction-Date Transaction-Type Transaction-Description Transaction-Amount Order-Number [FK] TITLE Title-of-Work Title-Cover Catalog-Description Copyright-Date Entertainment-Category Credit-Value MERCHANDISE Merchandise-Name Merchandise-Description Merchandise-Type Unit-of-Measure PROMOTION Promotion-Number [PK1] Promotion-Release-Date Promotion-Status Promotion-Type Product-Number AGREEMENT Agreement-Number [PK1] Agreement-Expire-Date Agreement-Active-Date Fulfillment-Period Required-Number-of-Credits MEMBER ORDERED PRODUCT Order-Number [PK1] [FK] Product-Number [PK2] [FK] TITLE PROMOTION Promotion-Number [PK1] [FK] is featured as features sold as sells places binds is a has conducted responds to generates Edit this slide as needed to ensure readability.
10
Data Analysis & Normalization
Data analysis is a process that prepares a data model for implementation as a simple, non redundant, flexible, and adaptable database. The specific technique is called normalization. Normalization is a data analysis technique that organizes data attributes such that they are grouped to form non redundant, stable, flexible, and adaptive entities. No additional notes
11
Normalization: 1NF, 2NF, 3NF
An entity is in first normal form (1NF) if there are no attributes that can have more than one value for a single instance of the entity. Any attributes that can have multiple values actually describe a separate entity, possibly an entity and relationship. An entity is in second normal form (2NF) if it is already in 1NF and if the values of all non primary key attributes are dependent on the full primary key—not just part of it. Any non key attributes that are dependent on only part of the primary key should be moved to any entity where that partial key is actually the full key. This may require creating a new entity and relationship on the model. An entity is in third normal form (3NF) if it is already in 2NF and if the values of its non primary key attributes are not dependent on any other non-primary key attributes. Any non key attributes that are dependent on other non key attributes must be moved or deleted. Again, new entities and relationships may have to be added to the data model. No additional notes
12
First Normal Form Example
No additional notes
13
First Normal Form Example
No additional notes
14
Second Normal Form Example
No additional notes
15
Second Normal Form Example
No additional notes
16
Third Normal Form Example
No additional notes
17
Third Normal Form Example
No additional notes
18
Sound Stage 3NF Data Model
MEMBER Primary Key Member-Number [PK1] Non-Key Attributes Member-Name Member-Status Member-Street-Address Member-Post-Office-Box Member-City Member-State Member-Zip-Code Member-Daytime-Phone-Number Member-Date-of-Last-Order Member-Balance-Due Member-Credit-Card-Type Member-Credit-Card-Number Member-Credit-Card-Expire-Date Member-Bonus-Balance-Available Audio-Category-Preference Audio-Media-Preference Date-Enrolled Expiration-Date Game-Category-Preference Game-Media-Preference Number-of-Credits-Earned Video-Category-Preference Video-Media-Preference Agreement-Number [FK] Privacy-Code -Address MEMBER ORDER Order-Number [PK1] Order-Creation-Date Order-Fill-Date Shipping-Address-Name Shipping-Street-Address Shipping-City Shipping-State Shipping-Zip Shipping-Instructions Order-Sub-Total Order-Sales-Tax Order-Shipping-Method Order-Shipping-&-Handling-Cost Order-Status Order-Prepaid-Amount Order-Prepayment-Method Promotion-Number [FK] Member-Number [FK] Member-Number Member-Number [FK] PRODUCT Product-Number [PK1] "Universal-Product-Code (Alternate Key)" Quantity-in-Stock Product-Type Suggested-Retail-Price Default-Unit-Price Current-Special-Unit-Price Current-Month-Units-Sold Current-Year-Units-Sold Total-Lifetime-Units-Sold VIDEO TITLE Product-Number [PK1] [FK] Producer Director Video-Category Video-Sub-Category Closed-Captioned Language Running-Time Video-Media-Type Video-Encoding Screen-Aspect MPA-Rating-Code AUDIO TITLE Artist Audio-Category Audio-Sub-Category Number-of-Units-in-Package Audio-Media-Code Content-Advisory-Code GAME TITLE Manufacturer Game-Category Game-Sub-Category Game-Platform Game-Media-Type Number-of-Players Parent-Advisory-Code TRANSACTION Transaction-Reference-Number [PK1] Transaction-Date Transaction-Type Transaction-Description Transaction-Amount Order-Number [FK] TITLE Title-of-Work Title-Cover Catalog-Description Copyright-Date Entertainment-Category Credit-Value MEMBER ORDERED PRODUCT Order-Number [PK1] [FK] Product-Number [PK2] [FK] Quantity-Ordered Quantity-Shipped Quantity-Backordered Purchase-Unit-Price Credits-Earned MERCHANDISE Merchandise-Name Merchandise-Description Merchandise-Type Unit-of-Measure AGREEMENT Agreement-Number [PK1] Agreement-Expire-Date Agreement-Active-Date Fulfillment-Period Required-Number-of-Credits PROMOTION Promotion-Number [PK1] Promotion-Release-Date Promotion-Status Promotion-Type 3NF Member Services (Entity Relation Subject Area) SA/2001 Tue May 02, :41 Comment Sandra Shepherd TITLE PROMOTION Promotion-Number [PK2] [FK] places binds features is featured as is a has conducted responds to generates sold as sells Edit this slide as needed to ensure readability.
19
Data-to-Location-CRUD Matrix
Entity . Attribute Customers Kansas City . Marketing . Advertsing . Warehouse . Sales . A/R Boston San Francisco San Diego . Warehose Customer INDV ALL SS .Customer Number R CRUD .Customer Name RU .Customer Address .Customer Credit Rating X .Customer Balance Due Order .Order Number SRD .Order Date .Order Amount Ordered Product .Quantity Ordered SUD .Ordered Item Unit Price Product .Product Number .Product Name .Product Description .Product Unit of Measure .Product Current Unit Price .Product Quantity on Hand = individual = ALL = subset = no access S = submit C = create R = read U = update D = delete Location No additional notes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.