Question: The following database schema is provided. The database has 5 tables. Primary keys are underlined, and foreign keys are in superscript. USING SQLite syntax.. 1)

The following database schema is provided. The database has 5 tables. Primary keys are underlined, and foreign keys are in superscript.

The following database schema is provided. The database has 5 tables. Primary

USING SQLite syntax..

1) Query the Customer ID of customers who have an account at the New York branch, who do not own an account at the London branch and who do not co-own an account with another customer who owns an account at the London branch, order by customer ID. The result should not contain duplicate customer IDs.

2) SIN, first name, last name, and salary of employees who earn more than $70,000, if they are managers show the branch name of their branch in a fifth column (which should be NULL/NONE for most employees), order by branch name. You must use an outer join in your solution (which is the easiest way to do it).

3) Exactly as question eight, except that your query cannot include any join operation.

Customer = {customerID, firstName, lastName, income, birthDate} Account = {accNumber, type, balance, branch NumberFK-Branch? Owns = {customerIDFK-Customer, accNumber FK-Account} Transactions = {trans Number, accNumberFK-Account, amount} Employee = {sin, firstName, lastName, salary, branch NumberFK-Branch} Branch = {branchNumber, branchName, managerSINFK-Employee, budget} Customer = {customerID, firstName, lastName, income, birthDate} Account = {accNumber, type, balance, branch NumberFK-Branch? Owns = {customerIDFK-Customer, accNumber FK-Account} Transactions = {trans Number, accNumberFK-Account, amount} Employee = {sin, firstName, lastName, salary, branch NumberFK-Branch} Branch = {branchNumber, branchName, managerSINFK-Employee, budget}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!