keys are noted in the superscript. Customer = {customerlID, firstName, lastName, income, birthDate} Account = {accNumber, type, balance, branchNumberFK-Branch Dwns = {customerIDFK-Customer accNumberFK-Account Transaction = {transNumber, accNumber"K-Account, amount} Employee = {ssn, firstName, lastName, salary, branchNumberFK-Branch SENEK-Emplovee budaot)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Suppose you work at a bank as a data analyst. Your main job is to analyze the data stored in their database.
The database has five tables, whose schema is shown as below. Primary keys attributes are underlined and
foreign keys are noted in the superscript.
• Customer = {customerID, firstName, lastName, income, birthDate}
• Account = {accNumber, type, balance, branchNumberFK-Branch
• Owns = {customerlIDFK-Customer accNumberFK-Account
• Transaction = {transNumber, accNumber"K-Account, amount}
• Employee = {ssn, firstName, lastName, salary, branchNumberFK-Branch
• Branch = {branchNumber, branchName, managerSSNFK-Employce, budget}
Transcribed Image Text:Suppose you work at a bank as a data analyst. Your main job is to analyze the data stored in their database. The database has five tables, whose schema is shown as below. Primary keys attributes are underlined and foreign keys are noted in the superscript. • Customer = {customerID, firstName, lastName, income, birthDate} • Account = {accNumber, type, balance, branchNumberFK-Branch • Owns = {customerlIDFK-Customer accNumberFK-Account • Transaction = {transNumber, accNumber"K-Account, amount} • Employee = {ssn, firstName, lastName, salary, branchNumberFK-Branch • Branch = {branchNumber, branchName, managerSSNFK-Employce, budget}
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).
• You may use some date functions in the following questions. In this homework, you should refer to
the date and time functions of MySQL (which is also compatible with MariaDB). For more details,
please refer to this page.
• In this homework, you are NOT allow to use JOIN keyword or subqueries.
Transcribed Image Text: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). • You may use some date functions in the following questions. In this homework, you should refer to the date and time functions of MySQL (which is also compatible with MariaDB). For more details, please refer to this page. • In this homework, you are NOT allow to use JOIN keyword or subqueries.
Expert Solution
steps

Step by step

Solved in 5 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY