Freire, Veronica_DAD 220 Module Two Activity

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

220

Subject

Chemistry

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by PrivateIce3976

Report
DAD 220 Module Two Activity Template Replace the bracketed text in this template with your answers and any supporting screenshots. Then submit it for the Module Two table and SQL identification activity. You’ll need to download this template, save it as a unique file, and then submit it for grading. Rename this document to include your last name and remove these instructions before submitting. Using the tables and SQL statements from the prompt for Module Two Activity, answer the following questions. Replace the bracketed text with your answers and any supporting screenshots. 1. How many records are shown in the Employee table? There are 5 records shown in the Employee table. 2. How many attributes are there in the Branches table? There are 2 attributes in the Branches table: Department_ID and Department_Name. 3. Which attribute could be a primary key for the Employee table? The “Employee_ID” attribute could be a primary key for the Employee table since it appears to uniquely identify each employee. 4. How many decimal places (maximum) can be stored in an employee’s salary field? The employee’s salary field can store a maximum of 2 decimal places. 5. How many decimal places (maximum) can a Department_ID have? The Department_ID does not have any decimal places because it is a type of SMALLINT. 6. What three rules do tables obey? Tables obey three rules: each column must have a unique name, the order of columns is not significant, and each row must be unique. 7. Is the Employee table normalized? How do you know? The Employee table does not seem to be fully normalized. One indication is that the “Classification” column contains NULL values. NULL values are typically avoided in a fully normalized table. 8. What is the result of the following query? Select sum(Salary) from Employee where Department_ID=3; The results of the query”Select sum(Salary) from Employee where Department_ID=3;” would be the sum of the salaries of employees belonging to the department with ID 3. 9. Identify the Employee ID(s) that would be returned as a result of the following query. Select * from Employee where Classification <> 'Exempt'; The Employee ID(s) that would return as a result of “ Select * from Employee where Classification <> 'Exempt';” are 101,103, and 104. 10. What is the result of the following query? Select max(Salary) from Employee;
The result of the query “ Select max(Salary) from Employee;” would be the maximum value among the salaries of all employees.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help