Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

7. Write a query that lists all fields in the department table. Write a SQL stat

ID: 3640980 • Letter: 7

Question

7. Write a query that lists all fields in the department table. Write a SQL statement to delete the Comp. Sci. department. Before executing the department delete, write queries that list the contents relations that will be affected by the delete. Execute the delete SQL statement and list the modified department table. List the fields of all the affected relations. Explain how the relations change.
We can image there are some detailed information e.g. fall and spring terms, student 1, id1, student 2, id 2, student 3, id3, and courses include CS-I01 and CS-315, and so on.
Please provide a complete, detailed answer. Thanks.

Explanation / Answer

1)Write a query that lists all fields in the department table: Select COLUMN_NAME from user_tab_columns where table_name='department' 2)Write a SQL statement to delete the Comp. Sci. department DELETE FROM DEPARTMENT WHERE departmentname='Comp. Sci' 3)Before executing the department delete, write queries that list the contents relations that will be affected by the delete IT WILL DELETE ALL THE RECORDS WHO BELONG'S TO COMPUTER SCIENCE DEPARTMENT SO , IF YOU EXECUTE A QUERY AS SELECT * FROM DEPARTMENT WHERE departmentname='Comp. Sci' you will get 0 records 4) Execute the delete SQL statement and list the modified department table. List the fields of all the affected relations. Explain how the relations change if all the students belong to computer science department then all the records will be deleted so, all the fields will be effected

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote