2080 1

Database Management System208010 marksComplex Retrieval Queries

Consider a banking database with three tables and primary keys underlined as given below: Customer(CustomerID, CustomerName, Address, Phone, Email) Owns(CustomerID, AccountNumber) Account(AccountNumber, AccountType, Balance) Write both relational algebra and SQL queries: a. To display name of all cu

Consider a banking database with three tables and primary keys underlined as given below: Customer(CustomerID, CustomerName, Address, Phone, Email) Owns(CustomerID, AccountNumber) Account(AccountNumber, AccountType, Balance) Write both relational algebra and SQL queries: a. To display name of all customers who live in 'Kathmandu'. b. To count total number of customers. c. To find name of those customers who have balance greater than or equal to 100000. d. To find average balance of each account type.[10]

  • Customer(<uCustomerID</u, CustomerName, Address, Phone, Email) - Owns(<uCustomerID</u, <uAccountNumber</u) - Account(<uAccountNumber</u, AccountType, Balance) --- Steps: 1. Apply selection (σ) on Customer table where Address = 'Kathmandu' 2. Apply projection (π) to retrieve only CustomerName --...
Up nextDefine normalization. Why normalization is important in database design? Explain 1NF, 2NF