Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

write sql statement to create a table from the given tables which has a foreign key from Dept table and need to describe the options

write sql statement to create a table from the given tables which has a foreign key from Dept table and need to describe the options to enforce Referential Integrity e.g if a user tries to delete a row from Dept, what should be done in the foreign key row so that referential integrity is not voilated image text in transcribed
Consider the following tables/relations of a company and answer the following question. Emp(eid: int, ename: varcahar(20), age: int, salary: float) Works(eid: int, dept_id: int, pcttime: int) Dept(dept_id: int, dname: varchar(20), budget: float, managerid: int) Give an SQL example of a foreign key constraint that involves the Dept relation (Create a table from the above relations which involves a foreign key referring to the Dept relation). What are the options for enforcing a referential integrity constraint when a user attempts to delete a record/tuple from Dept table

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_2

Step: 3

blur-text-image_3

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students explore these related Databases questions

Question

help asp

Answered: 3 weeks ago