Group A Mysql Handout PDF
Group A Mysql Handout PDF
Group A Mysql Handout PDF
OBJECTIVES:
To develop basic, intermediate and advanced Database programming skills.
To develop basic Database administration skill.
APPRATUS:
Operating System recommended: 64-bit Open source Linux or its derivative
SQL Database: MySql: 5.5.54
INSTALLATION STEP:
Step 1: Open terminal
Alt+Ctrl+t
Step 2: Update your system
sudo apt-get update
Step 3: Install MySQL
sudo apt-get install mysql-server
Step 4: Root Login
mysql -u root -p
Step 5: Create a New Database
create database mydatabase;
Step 6:Exit MySQL.
exit
QUESTIONS:
1. What is Relational Database Management System?
2. What is Mysql Server?
3. What are the features of MySql?
4. What is default port for mysql server?
5. List the different Datatypes in MySql.
6. Explain DML,DDL,and DCL with syntax
7. Write down the command to get list of databases and tables in MySql.
OBJECTIVES:
To develop basic, intermediate and advanced Database programming skills.
To develop basic Database administration skill.
APPRATUS:
Operating System recommended: 64-bit Open source Linux or its derivative
Front End: Java/PHP/Python
Backend: MySql: 5.5.54
IMPLEMENTATION:
A. Account(Acc_no, branch_name,balance)
B. branch(branch_name,branch_city,assets)
C. customer(cust_name,cust_street,cust_city)
D. Depositor(cust_name,acc_no)
E. Loan(loan_no,branch_name,amount)
F. Borrower(cust_name,loan_no)
Solve following query: Create above tables with appropriate constraints like primary key,
foreign key, unique, not null etc.
Q1. Find the names of all branches in loan relation.
Q2.Find all loan numbers for loans made at Akurdi Branch with loan amount > 12000.
Q3.Find all customers who have a loan from bank. Find their names,loan_no and loan
amount.
Q4. List all customers in alphabetical order who have loan from Akurdi branch.
Q5. Find all customers who have an account or loan or both at bank.
Q6. Find all customers who have both account and loan at bank.
Q7. Find all customer who have account but no loan at the bank.
Q8. Find average account balance at Akurdi branch.
Q9. Find the average account balance at each branch
Q10. Find no. of depositors at each branch.
Q11. Find the branches where average account balance > 12000
Q12. Find number of tuples in customer relation.
Q13. Calculate total loan amount given by bank.
Q14. Delete all loans with loan amount between 1300 and 1500.
Q15. Delete all tuples at every branch located in Nigdi.
CONCLUSION:
QUESTIONS:
1. How we can make use of Create statement to create multiple objects?
2. What is view ? How it can helpful to user?
3. What is an Index?What are the types of indexes ?
4. What is Sequence ? How it is generated in MySql?
5. How to create synonyms in MySql?
6. Which are the different commands used to modify database object?
7. List down the different operators that support MySql
8. What is difference between Delete,Drop and Truncate?
9. List down different MySql functions.
10. Explain in details column level constraints in MySql.
OBJECTIVES:
To develop basic, intermediate and advanced Database programming skills.
To develop basic Database administration skill.
APPRATUS:
Operating System recommended: 64-bit Open source Linux or its derivative
Front End: Java/PHP/Python
Backend: MySql 5.5
IMPLEMENTATION:
1. Create following Tables
cust_mstr(cust_no,fname,lname)
add_dets(code_no,add1,add2,state,city,pincode)
List the customer holding fixed deposit of amount more than 5000
List the employee details along with branch names to which they belong
List the employee details along with contact details using left outer join & right join
List the customer who do not have bank branches in their vicinity.
6. a) Create View on borrower table by selecting any two columns and perform insert update
delete operations
b) Create view on borrower and depositor table by selecting any one column from each table
c) create updateable view on borrower table by selecting any two columns and perform insert
update
delete operations.
CONCLUSION:
QUESTIONS:
1. What is Join Clause?
2. What are the different kinds of Joins ,explain in details?
3. What is cross Join?
4. What is Null value ? How it is different from zero value?
5. What are different MySql constraints?
6. What is purpose of Normalization ? How does it work?
7. What is difference between Join and Union?
8. What are the different aggregation function in MySql?
9. Explain Where and Having clause in detail.
10. What is difference between Unique Key and Primary Key?