DAD 220 Module Four Lab

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

DAD-220-X3

Subject

Mechanical_engineering

Date

Jun 4, 2024

Type

docx

Pages

7

Uploaded by MasterButterflyPerson397

DAD 220 Module Four Lab Template Federico Castellanos 6/1/2024 Overview Begin by doing the following steps in the IDE (Codio): 1. Load the classicmodels data set. 2. Start a new terminal session and run this command: mysqlsampledatabase.sql 3. Write commands to use the classicmodels database and show its tables to verify that you are in the right place. Then perform the steps below to complete the lab. Manually enter any commands you are asked to write. At the end of each step, replace the bracketed text in this template with your screenshot, response, or both, as indicated. Submit your completed template for grading and feedback. Screenshots should be sized to about one-quarter of a page. Written responses should be in complete sentences. Rename this document by adding your last name to the file name before you submit it. Identify Cardinality and Table Relationships 1. Retrieve employee tuples and identify the number of employees in San Francisco and New York. a. Command for San Francisco: select firstName, lastName, jobTitle, offices.city from employees inner join offices on employees.officeCode = offices.officeCode where state = 'CA'. b. Write and run a command to return records from New York on your own. c. Validate the completion of this step with a screenshot of these two tables.
2. Retrieve order details for orderNumber 10330, 10338, and 10194 and identify what type of cardinality this represents in the entity relationship model. a. Retrieve the order details by running SELECT queries with WHERE clauses against the Orders table. b. Now, identify what type of cardinality this represents in the entity relationship model. i. Reference the Module Four Lab ERD diagram linked in the guidelines and rubric to help identify relationships.
3. Delete records from the payments table where the customer number equals 103. a. Run a DESCRIBE statement to identify fields in the Payments table first. b. Select the records from the Payments table for customer number 103 before deleting them. c. Delete the records from the Payments table for customer number 103. d. Run a SELECT statement against the table to show that customer number 103 is no longer there.
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