Question: Overview To succeed in data analytics, you must understand the information in tables and certain command outputs. In this assignment, you will practice identifying the
Overview
To succeed in data analytics, you must understand the information in tables and certain command outputs. In this assignment, you will practice identifying the parts of a database. You will also see commands used to show table information and update tables.
Directions
Download the Module Two Activity Template from the What to Submit section and retitle the file to include your last name. As you complete the activity below, you will insert your answers in the retitled template and submit the document for grading.
The tables below follow a relational data structure. The SQL statements shown are similar to commands that can be used to generate the same outcomes as those shown in the tables.
Employee Table
EmployeeID FirstName LastName DepartmentID Classification Status Salary
John Smith Exempt FullTime
Mary Jones NonExempt PartTime
Mary Williams Exempt FullTime
Gwen Johnson NULL FullTime
Michael Jones NonExempt FullTime
SQL Statement
CREATE TABLE Employee
EmployeeID SMALLINT,
FirstName VARCHAR
LastName VARCHAR
DepartmentID SMALLINT,
Classification VARCHAR
Status VARCHAR
Salary DECIMAL;
Branches Table
DepartmentID DepartmentName
Accounting
Human Resources
Information Systems
Marketing
SQL Statement
CREATE TABLE Branches
DepartmentID SMALLINT,
DepartmentName VARCHAR;
To complete this activity, visually inspect the data tables and SQL code. This activity is not a coding exercise. Rather, you will examine the tables and code above to answer the questions below. Record the answer to each question in the activity template you saved.
Specifically, you must address the following rubric criteria:
Questions
How many records are shown in the Employee table?
How many attributes are there in the Branches table?
Which attribute could be a primary key for the Employee table?
What is the maximum number of decimal places that can be stored in an employee's Salary field?
What is the maximum number of decimal places that a DepartmentID can have?
What three rules do tables obey?
What is the result of the following query?
Select sumSalary from Employee where DepartmentID;
Identify the Employee ID or IDs that would be returned as a result of the following query. Hint: True NULL values will not return in the query.
Select from Employee where Classification 'Exempt';
What is the result of the following query?
Select maxSalary from Employee;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
