Data Mgmt Lab_Part_7 - 19 The Relational Model 2. Write the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
The Relational Model 19 2. Write the SQL statements required to create the preceding relations, including appropriate versions of all primary and foreign key integrity constraints. 3. DeFne the Dept relation in SQL so that every department is guaranteed to have a manager. 4. Write an SQL statement to add John Doe as an employee with eid = 101, age =32 and salary =15 , 000. 5. Write an SQL statement to give every employee a 10 percent raise. 6. Write an SQL statement to delete the Toy department. Given the referential integrity constraints you chose for this schema, explain what happens when this statement is executed. Answer 3.8 Answer omitted. sid name login age gpa 53831 Madayan madayan@music 11 1.8 53832 Guldu guldu@music 12 2.0 Figure 3.2 Students with age < 18 on Instance S Exercise 3.9 Consider the SQL query whose answer is shown in ±igure 3.2. 1. Modify this query so that only the login column is included in the answer. 2. If the clause
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Data Mgmt Lab_Part_7 - 19 The Relational Model 2. Write the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online