DAD 220 Module Two Activity Template PDF

Title DAD 220 Module Two Activity Template
Author Mary Ellen Oliver
Course Introduction to Structured Query Language
Institution Southern New Hampshire University
Pages 1
File Size 70.4 KB
File Type PDF
Total Downloads 83
Total Views 136

Summary

This is the module two activity template for DAD220. There were no errors upon completion....


Description

Henderson - DAD 220 Module Two Activity Template

Using the tables and SQL statements from the prompt for Module Two Activity, answer the following questions. Replace the bracketed text with your answers. 1. How many records are shown in the Employee table? [There are five records.] 2. How many attributes are there in the Branches table? [There are two attributes in the Branches table.] 3. Which attribute could be a primary key for the Employee table? [The Employee_ID attribute could be a primary key because it identifies an employee.] 4. How many decimal places (maximum) can be stored in an employee’s salary field? [There can be a maximum of two decimal places within the salary field. It is identified as Decimal (7,2)] 5. How many decimal places (maximum) can a Department_ID have? [There is a maximum of zero decimals in the Department_ID because it is listed as a SMALLINT as written here: Department_ID SMALLINT.] 6. What three rules do tables obey? [The three rules that tables must obey are: they are normalized, meaning that only one value is placed in each cell, there are no duplicate column names within the same table, and there are no duplicate rows within the same table.] 7. How do you know that the Employee table is or is not normalized? [I know that the Employee table is normalized because it is organized into rows and columns and the information within each column directly relates to the row heading. Although some of the information is the same, the way it is set up shows that the data that is within each cell is unique to a certain main topic of the table and within the rows.] 8. What is the result of the following query? - Select sum(Salary) from Employee where Department_ID=3; [The sum of the salary from employees who are in department 3 would be totaled and the output or result would be 170000.00 (80000+90000). The reason it will not show a comma is because commas are used in the commands.] 9. How many rows are returned as a result of the following query? - Select * from Employee where Classification 'Exempt'; [There are two rows that would be returned because there are only two employees with the Exempt status.] 10. What is the result of the following query? - Select max(Salary) from Employee; [The result would be a table that shows max(Salary) as the heading and one cell that lists the maximum salary as 90000.00.]...


Similar Free PDFs