Using ERwin and Microsoft SQL Server, create the tables and populate them with data. The source of your data will be the Microsoft Excel spreadsheet provided to you on the Blackboard assignment. You should realize that the spreadsheet is poorly designed, and you will need to normalize the data to populate your tables.
A. Use ERwin to create the tables, and then forward engineer them to automatically generate the schema in SQL Server. Include your .erwin file with your deliverables, as well as your SQL database. NOTE: your database and ERwin files must be named using the syntax of LASTNAMEF (where F is your first initial). Reminder: To obtain your SQL database file, right-click on your database and select the detach menu option. Detaching your database will produce two output files, a .mdf and a .ldf file. Both are necessary to attach a database, so be sure to include both. Here is list of the entities for this project:
Entities:
CUSTOMER_T
CustomerID (PK)
CustomerName
CustomerStreet
CustomerCity
CustomerState
CustomerZip
CreditLimit
SalesRepID (FK) of EMPLOYEE_T
ORDER_T
OrderID (PK)
CustomerID (FK) of CUSTOMER_T
CustomerPONumber
OrderDate
DueDate
ShipDate
ORDER_LINE_T
OrderID composite (PK), (FK) of ORDER_T
ProductID composite (PK), (FK) of PRODUCT_T
OrderQuantity
PRODUCT_T
ProductID (PK)
ProductDescription
UnitPrice
StockQuantity
FABRICATED_T
ProductID composite (PK), (FK) of PRODUCT_T.ProductID
PartID composite(PK), (FK) of PRODUCT_T.ProductID
PartQuantity quantity of PartID that goes into ProductID (example, 2 tires
In one bicycle)
PRODUCT_SUPPLIER_T
ProducID composite (PK), (FK) of PRODUCT_T
SupplierID composite (PK), (FK) of SUPPLIER_T
VendorPartID this is the ID the Vendor (i.e., Supplier) uses in their system), similar to CustomerPONumber in the ORDER_t.
ProductCost
PurchasedQuantity
SUPPLIER_T
SupplierID (PK)
SupplierName
SupplierStreet
SupplierCity
SupplierState
SupplierZip
EMPLOYEE_T
EmployeeID (PK)
EmployeeName
EmployeeStreet
EmployeeCity
EmployeeState
EmployeeZip
ManagerID (FK) unary
EMPLOYEE_COURSE_T
EmployeeID combination (PK), (FK) of EMPLOYEE_T
CourseID combination (PK), (FK) of COURSE_T
CompletionDate
COURSE_T
CourseID (PK)
CourseDescription
SALES_COMMISSION_RATE_T
EmployeeID (PK), (FK) of EMPLOYEE_T
commissionRate (hint: only employees with commission rates should be added to this table).
B. Be sure to include the appropriate integrity constraints and the proper data types and field widths. C. Populate the tables using SQL statements within SQL Server.
Each question within deliverable 2 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Provide screen shots of each query, both the SQL statement(s) and the results for each item below based on the data entered in task 1. The screen shots must be large enough for the instructor to clearly read the results without a magnifying glass! Caution: Read the instructions carefully! Each question is based on a single SQL statement, and the single SQL statement might contain sub-queries (additional SELECT statements) within the statement.