Cis 336 i lab 2 of 7

164 views
109 views

Published on

Lab two introduces the next step in creating a data model, the Entity Relationship Diagram (ERD). You will be given a business scenario for a company named Clapham Specialty Store, which is a small specialist grocery and delicatessen. The business specifications will outline a number of things about the business, some of which will apply directly to the database you are being asked to model. There is a table which lists the entities (tables) that will be needed for the database and related attributes (columns) for each entity. There is also a column that lists specific information about the entity that will be helpful in determining its relationship to other entities within the model.

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
164
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Cis 336 i lab 2 of 7

  1. 1. SOLUTIONJUG.COMCIS/336 iLab 2 of 7 - SQL CourseCLICK HERE TO GET THE SOLUTION !!!!!!!!LABOVERVIEWScenario/SummaryLab two introduces the next step in creating a data model, the Entity Relationship Diagram (ERD).You will be given a business scenario for a company named Clapham Specialty Store, which is asmall specialist grocery and delicatessen. The business specifications will outline a number of thingsabout the business, some of which will apply directly to the database you are being asked to model.There is a table which lists the entities (tables) that will be needed for the database and relatedattributes (columns) for each entity. There is also a column that lists specific information about theentity that will be helpful in determining its relationship to other entities within the model.Be sure to include the minimum and maximum occurrences of each relationship (cardinality) and tosupply a name to the relationship that will work in both directions. If there is not a single word thatwill apply, then supply a separate name for each direction of the relationship.Narrative/Case StudyThe Clapham Specialty Store is a small, specialist grocery and delicatessen. A new owner, JohnBalfour, who would like to expand the store and improve its profits, has recently purchased thestore. The store sells general groceries, wines and liquors, and has a small deli counter. The store isopen from 5:00 a.m. to 12:00 midnight. Many of the customers are repeat customers who come into buy products they forgot from their regular grocery shopping expedition at the supermarket.The store sells about 3,000 different products ranging from toilet cleaner to 2 oz. jars of caviar, andchampagne to liverwurst. Each product is displayed on a shelf on one side or the other of the aisle.The products arrive and their details (cost, quantity, SKU number, package size, purchase date) arerecorded in the back room before they are displayed. The new owner wants to know which productsthe store sells most of and which are the most profitable.The following is some general information about the company and its current processes.The store has 3 cash registers.Between 3 and 7 employees will work at any given time, depending on the time of day and howbusy they are.An employee logs in to the register at the start of a shift and logs out at the end.The name, address, Social Security number and other information is recorded for every employee.All employees are paid weekly against an hourly rate which varies depending on their jobdescription.Each sale is identified by a Receipt No. and a timestamp (date and time) and consists of sale itemswith a quantity and price recorded for each product.
  2. 2. As a convenience for known customers, they offer a local delivery service. Deliveries are only madeto customers who are registered at the store; walk-ins must record their name, address, and phonenumber before a delivery can be made to them.John can find the cost of the goods from the accounts system. What John would like to have is apoint of sale system (POS) that records what has been sold to whom, by whom, for how much, andwhen. Also, he needs to be able to record the delivery trips that are made, who makes the delivery,how long the delivery takes, and the amount of the sale. There is concern at this point that the costof delivering the sales to customers is not worth the return on investment.Requirements:You have been asked to develop a logical data model for Clapham Specialty Store based on theinformation given to you by John and his staff. Through analysis of the nouns and verbs in the casestudy above, you have accumulated the following entity, attribute, and relationship informationshown in the table below. The attribute list may not be complete. If you determine that additionalattributes are needed to better define an entity then you should add them.Entities Attributes and Relationships for Clapham Store:EntityAttributesRelationshipsEmployeeID Number, Last Name, First Name, Phone Number, Employee Type IDAn Employee can belong to any one of the three job categories, but can belong to one and only oneof the three. Employees have names and other contact information.Employee TypeType ID, Description, Hourly Pay RateAn employee can be either a clerk, delivery person, or a supervisor.Register LogRegister Log Number, Register Number, Log In Time, Log Out Time, Employee IDSales are made using a register and can be tracked by the register log number. An employee mustlog into the register before he/she can use it and must log out when finished with a shift at thatregister. An employee may use more than one register during a period of work.RegisterRegister Number, Register Location Description, Register Serial NumberThe store has 3 registers: One located at the back of the store and two located at the front of thestore; one on the left and one on the right of the entrance.DeliveriesDelivery Number, Employee ID, Sales Receipt Number, Time the Employee Left and ReturnedRelates to both the employee and the sale entities. This entity will help track deliveries. Anemployee can make many deliveries but a sale is delivered by one and only one employee.LocationLocation ID, Aisle, Side, ShelfRelates to product and identifies one or more areas of the store where products are displayed.
  3. 3. ProductProduct ID, Name, Package Size, Cost, Quantity on Hand (QOH), Last Purchased Date, ReorderMinimumIdentifies the products the store sells. One or more products can be sold per sale. The quantity onhand allows John to determine his inventory levels. The reorder minimum can be used to determinewhen the inventory level has reached a reorder point.SaleReceipt Number, Sales Amount, Sale Date- TimeA sale is identified by a single receipt. Sales are:made to one or more Customers but only one customer at a time.made by one or more Register Clerks but only one clerk per sale.recorded on one or more Registers but only one register per sale.delivered by one or more delivery persons but no one sale can be delivered by more than onedelivery person.Sold ItemsReceipt Number, Product ID, Item Price, Quantity SoldSale Item is part of sale and records product sold per sale. Sale item must be able to associatemultiple products sold on a single sales receipt.CustomerCustomer Number, First Name, Last Name, Address, Phone NumberA customer can be associated with multiple sales, but any one sale is to one and only one customer.A sale can occur without a customer registering in the system.Using MS Visio, develop an ERD that meets the following guidelines:Draw the entities with their attributes.Indicate the relationships between the entities using Crows Foot notation. You will need todetermine the cardinality and optionality for each direction of the relationships. Some of the ForeignKey relationships are identified in the graph above but not all. Be sure you identify and account forall Foreign Key relationships.Add a name (in both directions) to the relationships. Remember, if you can verbalize the relationshipin both directions then you probably have a valid relationship.DeliverablesThe deliverable for this lab will be your completed ERD as a single MS Word document usingcopy/paste from the MS Visio application and named "lab2_solutions_yourname".LABSTEPSSTEP 1: Drawing entities and attributesBe sure to include all of the entities that have been defined. You need to include at least the primaryand foreign key attributes where applicable in your diagram.STEP 2: Indication of all relationships
  4. 4. Be sure that you link all entities based on PK to FK relationships. There may be a case where youneed to identify a combination PK and if so make sure that all of the relationships involved aredefined. Be sure that you have set your Visio editor to show Crows Foot notation. Also, be sure thatyou are defining the correct cardinality for the relationships.STEP 3: Naming of relationshipsDo not accept the default naming convention for your relationships in all cases. There may be somerelationships where this is applicable, but in most cases you will want to explicitly name therelationship. Be sure that you have provided a verb phrase for both directions in the relationship.This is the end of lab #2CLICK HERE TO GET THE SOLUTION !!!!!!!!

×