Create table department12 that includes columns deptid and


Create table DEPARTMENT12 that includes columns dept_id and dept_name2. Create a table EMPLOYEE12 that includes the columns employee_id, FirstName , MiddleName,LastNarne, and social security number3. Modify the EMPLOYEE12 table to create a composite unique key on combination of firstname,middlename and lastname4. Create a sequence as below:CREATE SEQUENCE deptseqSTART WITH 1INCREMENT BY 1;5. Insert 2 records into DEPARTMENT12. Remember to use Sequence numbers for dept_id6. Modify EMPLOYEE12 table to add column dept_id (Foreign key)7. Add 2 employees into EMPLOYEE12 table with one employee should belong to dept_id 1 andanother employee should belong to dept_id 2. Remember to create and use Sequence numberfor employee_id which will start from 1000 and increment by 18. Write SQL statement to delete dept_id 1 from Department table. Explain what happens whenyou attempt the SQL statement9. To enable delete of department with dept_id 1, you need to use the ON DELETE clause inForeign Key constraint. Refer to Oracle documentation for further guidance. Drop Foreign Keyconstraint and recreate with ON DELETE clause10. Now, delete department with dept_id 1. Explain what happens11. Modify table DEPARTMENT12 to add a column DIVISION that should be constrained to checkvalues in the range of 51 and 10012. Modify DEPARTMENT12 table to add constraint on dept_name to ensure that all recordsinserted will have dept_name in UPPERCASE. Review Oracle Documentation if needed13. Test the constraint14. Write a query to display all constraints for table EMPLOYEE12 and DEPARTMENT12

 

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create table department12 that includes columns deptid and
Reference No:- TGS01061255

Expected delivery within 24 Hours