Question: Consider the relational database of Figure using SQL define a
Consider the relational database of Figure. Using SQL, define a view consisting of manager-name and the average salary of all employees who work for that manager. Explain why the database system should not allow updates to be expressed in terms of this view.
Answer to relevant QuestionsConsider the SQL query select p.a1 from p, r1, r2 where p.a1 = r1.a1 or p.a1 = r2.a1. Under what conditions does the preceding query select values of p.a1 that are either in r1 or in r2? Examine carefully the cases where one ...Give an SQL schema definition for the employee database of Figure. Choose an appropriate domain for each attribute and an appropriate primary key for each relationschema.Let the following relation schemas be given: R = (A, B, C) S = (D, E, F) Let relations r(R) ands(S) be given. Give expressions in QBE, and Data log equivalent to each of the following queries: a. IIA(r) b. σB =17 ...Referential-integrity constraints as defined in this chapter involve exactly two relations. Consider a database that includes the following relations:salaried-worker (name, office, phone, salary)hourly-worker (name, ...In Chapter 3, we described the use of views to simplify access to the database by users who need to see only part of the database. In this chapter, we described the use of views as a securitymechanism. Do these two purposes ...
Post your question