Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Using the data dictionary below write the MySQL code that will create the table structure for both the JOB and EMP 1 tables. I

image text in transcribed

1. Using the data dictionary below write the MySQL code that will create the table structure for both the JOB and EMP 1 tables. I expect that both primary and foreign keys are added to these tables as indicated in the data dictionary. I also expect if you use a foreign key that you create an INDEX for that foreign key (see lecture slide 57). Also add a CONSTRAINT CHECK or a CHECK that checks the JOB_CODE in EMP 1 is either 500, 501, or 502-remember that JOB CODE is a CHAR(3) and not a number. If you don't recall how to do this in MySQL look at lecture slides 48 (PK & FK) and lecture slide 54 (CHECK). In the file that you turn in for your homework I expect the SQL code pasted in as text from the MySQL environment AND1 expect a pasted in tables as images that result from running commands DESCRIBE JOB; and DESCRIBE EMP 1; after running the create table code to create both tables in MySQL environment in the database indicated by your last name. (4 points) For example if my name was Jane Smith, I would login the classroom VM and to MySQL and once in the mysal environment I would choose database ismith with the command: use ismith In this ismith database I will be able to create and delete tables. Key Table Type EMP 1PK Attribute (Field) Na me Data Declaration 3) EMP NUM EMP LNAME EMP FNAME EMP_INITIAL EMP_HIREDATE OB CODE OB CODE OB DESCRIPTION OB CHG HOUR OB LAST UPDATE 15 15 DATE FK OB PK 5) DATE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions