Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Down below is the data scheme we are using, it has five tables.Primary keys attributes are underlined and foreign keys are noted in the superscript.

image text in transcribed

image text in transcribed

image text in transcribed

Down below is the data scheme we are using, it has five tables.Primary keys attributes are underlined and foreign keys are noted in the superscript. Customer = {customerID, firstName, lastName, income, birthDate} Account = {accNumber, type, balance, branch NumberFK-Branch Owns = {customerIDFK-Customer, accNumberFK-Account} Transaction = {trans Number, accNumberFK-Account, amount} Employee = {ssn, firstName, lastName, salary, branchNumberFK-Branch Branch = {branchNumber, branchName, managerSSNFK-Employee, budget} Notes. The customerID attribute (Customer) is a unique number that represents a customer, it is not a cus- tomer's SSN The accNumber attribute (Account) represents the account number The balance (Account) attribute represents the total amount in an account The type (Account) attribute represents the type an account: checking, saving, or business The transNumber attribute (Transactions) represents a transaction number, combined with account number it uniquely identify a transaction The branchNumber attribute (Branch) uniquely identifies a branch The manager SSN attribute (Branch) represents the SSN of the branch manager Questions. Write SQL queries to return data specified in questions 1 to 10 (each is worth 5pts), which has to satisfy the following requirements: The answer to each question should be a single SQL query. You must order each query as described in the question, order is always ascending unless specified otherwise Every column in the result should be named. So if the query ask you to return something like income times 10, make sure you include an AS statement to name the column. While your question will not be assessed on their efficiency, marks may be deducted if unnecessary tables are included in the query (e.g., including both Owns and Customer when you only require the customerID of customers who own accounts). 2. Answer exactly question one, except that your query cannot include any JOIN keyword. 3. Return SSN, first name, last name, and salary of the highest paid employee (or employees) of London branch. In this question, you have to use a sub-query

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What does stickiest refer to in regard to social media

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago