Assignment 2- Database Modeling and Normalization Essay

787 WordsNov 6, 20124 Pages
Assignment 2- Database Modeling and Normalization Dr. Amir Afzal Strayer University- CIS 515 August 7, 2012 Abstract Selling high end electronics is big business and being a commissioned employee in that field if your sales are up means big money. Prices for electronics range from the low hundreds into the thousands. It really depends on the person style, specifications they are looking for, trust in the brand, and the depth of their pockets, how much a person is willing to spend for example on a that high definition led plasma television that is 52 inches. No matter the cost, businesses want to keep a track of the sales of their employees and how much they are getting paid. In this case a high-end electronics store wants to…show more content…
The coding that was used to find information on commissions paid to employees was: SELECT Employee.* FROM Employee, Invoice WHERE (DepartmentID =2); The asterisk next to employees indicates that all the information under the employee table was used to generate the search. In this query information was pulled from the employee and invoice tables. The WHERE function more specifically states the department which can be changed and it would generate new information. The query currently only shows employee commission information for employees who work in department two (see attachment). If the finance department wanted to find the total compensation paid to each employee in the same month as the first query a slightly different query would be run to generate that information. The first code simply pulled the information and did not include and computation because the finance department only requested to be able to determine as in pull up the record for employee’s commission paid. The second code will include computation which will divide the yearly salary by twelve months then multiples the commission rate by the total amount of product sold and lastly add those two numbers together to get the total compensation for that month. Unfortunately the coding that I am using is not generating a proper result. However, it should look something like this: SELECT Employee.EmpNumber, Employee.EmpFirstName,
Open Document