Physical Design and Implementation of Compo Construction Inc

Total Page:16

File Type:pdf, Size:1020Kb

Physical Design and Implementation of Compo Construction Inc

DBS201 Assignment 1 - (10 Marks) Physical Design and Implementation of Compo Construction Inc. Due Friday Oct. 17 3:00 In Office T2090

Your group must consist of 2 or 3 people. Submissions done by a single person will receive a 20% penalty.

You must hand in the Student Assignment Submission Form (below) with your assignment (one per group).

Students are encouraged to hand in the assignment earlier than the cutoff time. It will be strictly enforced. All assignments received after that time will be subject to a late penalty

Student Assignment Submission Form

I/we declare that the attached assignment is my/our own work in accordance with the Seneca Academic Policy. No part of this assignment has been copied manually or electronically from any other source (including web sites) or distributed to other students . Name(s) Student ID(s) Signature

1______

2______

3______

ZEUS ACCOUNT: ______In this assignment you will:

A. Create a Physical Schema for the 6 tables shown below. Secure the schema so the public does not have access. Allow schema access to DR201C40 and the profiles in the group. B. Create a DB2 database to implement the 6 Tables. Use COMPO??? Where ??? is your unique id C. Create 2 Views. D. Provide printed syntax of the commands used to create the 6 Tables and the 2 Views. Some marks will be for the proper formatting (indenting) of the SQL commands. E. Insert 3 rows of data into each one of the 6 tables. Use group member names where you see first and last names in the suggested data. F. Prepare 6 report printouts from the system printer that will display the contents of each table. G. Provide a DSPFD printout that shows file constraint information for each table. H. Prepare a Daily Sales Report for a particular day. I. Prepare the two system reports that result from “Select * from viewname”. J. Allow access to instructor account DR201C40. This account should be able to read/add/change and delete data in the tables, but not perform any alterations on the table set up.

To be Submitted:

Part 1: Complete the Physical Design (sometimes referred to as the Data Dictionary or Physical Schema)

Here is some information about Compo Construction Inc:

An engineering and construction firm named COMPO CONSTRUCTION INC provides design and build services. The weekly Sales Report and the Customer List Report are shown below. There are six tables required to support these two reports.

Note that one invoice can have more than one piece of equipment and that one particular piece of equipment can be sold on more than one invoice. For example: Invoice number CCI-44720 has Equipment numbers P100 and CMT22. Also note that Equipment number P100 is sold on Invoice CCI- 44720 and CCI-44721.

The report shows the Customer number which relates to a CUSTOMER table with attributes given below. Any particular Federal GST Number can occur only once in the CUSTOMER table as every customer must have a different GST Number. The only attributes that can be skipped are CustAddress, CustPhone and Invoice Date. The system will insert today’s date if the user skips InvoiceDate. The system inserts blanks into SalesPersonName when skipped. Federal_GST_LicenseNumber must be greater than or equal to 100-000-000 and less than or equal to 999-999-999. COMPO CONSTRUCTION INC

Weekly Sales Report

Equip Class Equip Equipment Inv. Inv. Sales-Person Cust Class Description Num Description Charge Qty Num. Date No

OFF Office Copier P100 Blue print Model $420.00 2 CCI-44720 2013-2-17 23-Oliv Gardenor 103 HP2959 MIX Concrete Mix CMT2 Concrete Mixer $4000.00 20 CCI-44720 2013-2-17 23-Oliv Gardenor 103 TRU Wood Trusses A100 50’ x 16’ Roofing $1200.00 48 CCI-44721 2013-2-18 13-Walter Chan 83 FRM Framing A137 2 x 4 x 8 Poplar $7500.00 100 CCI-44721 2013-2-18 13-Walter Chan 83 0 OFF Office Copier P100 Blue print Model $840.00 4 CCI-44721 2013-2-18 13-Walter Chan 83 HP2959 STF Steel Framing STL10 Front Steel Loader $1500.00 3 CCI-44721 2013-2-18 13-Walter Chan 83 MIX Concrete Mix ST22 Stone Crusher $950.00 1 CCI-44722 2013-2-18 23-Oliv Gardenor 46 FLD Front Loader FL660 Front Loading Device $450 1 CCI-44722 2013-2-18 23-Oliv Gardenor 46 CRA Overhead CRA- 120’ Overhead Crane $9000 3 CCI-44723 2013-2-18 20-Joe Shoelly 52 Lift 11

COMPO CONSTRUCTION INC Customer List

Customer First Name LastName Address Phone Federal SalesRep Number GST Number Number 46 Laurie Wells 112 Apple Rd, Toronto (416) 289- 4417 124- 23 728-121 52 Ronald MacDonn 1 Big Mac Rd, Toronto (800) 448- 9000 218- 20 647-113 83 Tom Duley 3 Hanghead Dr. (416) 229- 4104 199- 13 Markham 565-716 103 Jeanne Jeanne 2 Youngalive St. Toronto (416) 664- 3121 214- 23 796-188

Here are the six tables required to support these two reports.

Table Name Attributes

1. INVOICE [Inv#(PK) , InvoiceDate, SalesPerson#(FK), Cust#(FK)]

2. INVOICE_EQUIPMENT [Inv#(PK)(FK), Eqp#(PK)(FK), Qty, Charge]

3. EQUIP_CLASS [EqpClassCode(PK), EqpClassDesc]

4. SALESPERSON [SalesPerson#(PK), SalesPersonName]

5. EQUIPMENT [Eqp#(PK), EqpDesc, EqpClassCode(FK)]

6. CUSTOMER [Cust#(PK), CLName, CFName, CustAddress, CustPhone, Federal_GST_Number, SalesPerson#(FK)] For Part 1, you are to complete and post the physical design for each table. Complete one form for each table.

Physical Design -- Data Dictionary

TABLE NAME: ______

Column Data LengthPK FK NOT Unique Check Default Name………………. Type NULL

The submission must be business-like. That includes readability, organization, and naming conventions.

For all questions from you must perform the SQL commands on a group member’s ZEUS account and the collection, tables and views may be inspected bv your teacher.

Part 2: Provide Printed Syntax for all the statements used to set up your 6 Tables and any Table Constraints:

Choose a group member i-Series account and create a collection named COMPOxxx (where xxx is the last 3 characters of your userid). Create the six tables defined above. Column names must be the same as those shown in the data dictionary. Use proper formatting (indenting). Part 3: Provide Printed Syntax to Create 2 “Views”

i) SALESINFO which will contain all the attributes shown on the Weekly Sales Report for all sales. ii) SALESGT1000 which will contain all the rows in the Weekly Sales Report that have a Charge greater than 1000 dollars. Use proper formatting (indenting).

Part 4: Provide the Required SQL statement.You are asked to provide a system report of sales for Monday October13 similar to the Weekly Sales Report but without the Equipment Class columns. The report should include all sales above $750. The report should be sorted by Invoice Number and then Equipment Number. You must use one of the two views created in Part 3 to meet this requirement. Write the SQL statement that you will use. Use proper formatting (indenting).

Part 5: Insert Sample Rows (at least three) for each Table You should use data from the two reports and you may also need to invent some data.

Part 6 : Provide system reports on the six tables each having 3 rows of data

Part 7 : Provide a System Report from Part 4 above.

Include a title page that shows a student id with each system report.

Recommended publications