Queries for Practical Exam
Queries for Practical Exam
Queries for Practical Exam
4. Create a view cust_loan consisting of customer names, their addresses, the amount they have
have borrowed and from which branch.
5. List some advantages of DBMS
6. For all customers who have a loan from the bank, find their names, loan numbers and loan
amount
7. Explain DDL. Name some DDL commands with syntax and examples
8. Find the customers names, loan numbers and loan amounts for all loans at the Perryridge
branch
9. Explain DML. Name some DML commands with syntax and examples
10. For all customers who have a loan from the bank, find the names, loan numbers (rename loan
number as Loan ID) and loan amount
11. Explain three levels of data abstraction
12. Find the names of all branches that have assets greater than at least one branch located in
Brooklyn
13. Explain normalization
14. Find the names of all customers whose street address includes the sub string ‘Main’.
15. List and explain the various normal forms
16. List in alphabetic order all customers who have a loan at the Perryridge branch.
17. Why is normalization required
18. List the entire loan relation in descending order of amount and ascending order of loan
number.
19. Explain ER model
20. Find all customers having a loan, an account, or both at the bank (Union)
21. Explain functional dependency
22. Find the number of tuples in the customer relation.
23. Explain weak entity set
24. Find all customers who both a loan, an account, or both at the bank
25. Explain domain constraints
26. Delete all accounts at every branch located in the city ‘Needham’.
27. Explain triggers
28. Find all customers who have an account but no loan at the back
29. Explain assertions
30. Find the average balance for all accounts.
31. Explain various types of joins
32. Select the names of customers who have a loan at the bank, and whose names are neither
Smith nor Jones.
33. Explain index
34. Find the names of all branches in the loan relation Specify explicitly that duplicates are not
removed.
35. What are views?
36. Find all loan numbers for loans made at the Perryridge branch with loan amounts greater than
$1200
37. What is ACID?
38. Find the loan number of those loans with loan amount between $9,000 and $10,000 (use
between)
39. Find all branches that have greater assets than some branch located in Brooklyn.
40. What is stored procedure?
41. Find all customers who have a loan at the bank but do not have an account at the bank.
42. Difference between delete and drop
43. Find all customers who both a loan an account ,or both at the bank( retain duplicates)
44. Difference between alter and update
45. Find the average account balance at the Perry ridge branch.
46. Explain the different type of keys
47. Find the average account balance at each branch.
48. What is concurrency?
49. Find the number of depositors for each branch.( In this case, a depositor counts only once,
regardless of the number of accounts that depositor may have)
50. What is a transaction?
51. Find the branches where the average account balance is more than $1200.
52. Why is normalization important
53. Find all customers who have an account but no loan at the bank (retain duplicates)
54. Difference between two tier and three tier architecture
55. Find all customers having a loan, an account, or both at the bank (retain all duplicates)
56. List some advantages of MySQL
57. Find the average balance for each customer who lives in Harrison and has at least three
accounts.
58. Command to list the various databases in MySQL.
59. Create a view cust_account consisting of customer names, their account numbers, the branch
name and the balance they are having.
60. Explain views with advantages
61. Find all loan numbers that appear in the loan relation with null values for amount