Question: Question 2 (5 marks) Create 2 tables based on the ER model shown below. Include all the constraints in the CREATE TABLE statements. You should

 Question 2 (5 marks) Create 2 tables based on the ER

Question 2 (5 marks) Create 2 tables based on the ER model shown below. Include all the constraints in the CREATE TABLE statements. You should have only two create Table statements and no ALTER TABLE statements. Name all constraints except NOT NULLS 306 COMP 122W21_002_P_40. EMPLOYEE PENO CHAR (4 BYTE) ENAME VARCHAR2(30 BYTE) VARCHAR2 (30 BYTE) MANAGER CHAR(4 BYTE) JDATE TIMESTAMP GENDER CHAR (1 BYTE) SALARY NUMBER (2) COMISSION NUMBER (62) F. DEPTNO NUMBER (0) EMPLOYEE_PK (NO) 3 SYS_CO053807 (DEPTNO) COMP122W21_002_P_40 DEPARTMENT PONO NUMBER (0) U DNAME VARCHAR2 (30 BYTE) U DLOCATION VARCHAR2 (30 BYTE) DEPARTMENT_PK (NO) DEPARTMENT DNAME UN (ONAME) DEPARTMENT_DLOCATION_UN (DLOCATION Use the column datatypes and sizes as indicated in the ER model ENO and DNO are used to uniquely identify rows in these tables. Each Employee must be assigned a Department, and no duplicate department names are allowed. Assign commission default value 0. The Salary entered should be greater than zero If the data is given in Gender coloumn, only 'M' or 'F' are acceptable values Each table should have 5 data records in them Create and execute the SQL statements needed to enforce the data relationships among these tables

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!