0% found this document useful (0 votes)
341 views

Group A Mysql Handout PDF

This document discusses an assignment on SQL queries involving joins, subqueries, and views in MySQL. It provides the objectives, setup instructions and sample tables to design 10 SQL queries using different join types, subqueries, and views. It also lists 10 questions at the end related to concepts like joins, normalization, aggregation functions, unique keys vs primary keys. The aim is to develop advanced database programming and administration skills by practicing different types of SQL queries and operations.

Uploaded by

Abhishek Iche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
341 views

Group A Mysql Handout PDF

This document discusses an assignment on SQL queries involving joins, subqueries, and views in MySQL. It provides the objectives, setup instructions and sample tables to design 10 SQL queries using different join types, subqueries, and views. It also lists 10 questions at the end related to concepts like joins, normalization, aggregation functions, unique keys vs primary keys. The aim is to develop advanced database programming and administration skills by practicing different types of SQL queries and operations.

Uploaded by

Abhishek Iche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

DBMS: Group A- Database Programming Languages – SQL

MES College of Engineering Pune-01


Department of Computer Engineering
Name of Student: Class:
Semester/Year: Roll No:
Date of Performance: Date of Submission:
Examined By: Experiment No: Part A-01

GROUP: A ASSIGNMENT NO: 01


AIM: Study of Open Source Relational Databases : 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
 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

For see the version use:mysql --version

Department of Computer Engineering


DBMS: Group A- Database Programming Languages – SQL

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.

Department of Computer Engineering


DBMS: Group A- Database Programming Languages – SQL

MES College of Engineering Pune-01


Department of Computer Engineering
Name of Student: Class:
Semester/Year: Roll No:
Date of Performance: Date of Submission:
Examined By: Experiment No: Part A-02 ,A-03

GROUP: A ASSIGNMENT NO: 02 & 3


AIM:
1. Design and Develop SQL DDL statements which demonstrate the use of SQL objects such
as Table, View, Index, Sequence, Synonym.
2. Design at least 10 SQL queries for suitable database application using SQL DML
statements
Insert, Select, Update, Delete with operators, functions, and set operator.

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)

Department of Computer Engineering


DBMS: Group A- Database Programming Languages – SQL

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.

Department of Computer Engineering


DBMS: Group A- Database Programming Languages – SQL

MES College of Engineering Pune-01


Department of Computer Engineering
Name of Student: Class:
Semester/Year: Roll No:
Date of Performance: Date of Submission:
Examined By: Experiment No: Part A-04

GROUP: B ASSIGNMENT NO: 04


AIM: Design at least 10 SQL queries for suitable database application using SQL DML
statements:all types of Join, Sub-Query and View..

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)

Retrieve the address of customer Fname as 'xyz' and Lname as 'pqr'

2.Create following Tables


cust_mstr(custno,fname,lname)
acc_fd_cust_dets(codeno,acc_fd_no)
fd_dets(fd_sr_no,amt)

List the customer holding fixed deposit of amount more than 5000

Department of Computer Engineering


DBMS: Group A- Database Programming Languages – SQL

3. Create following Tables


emp_mstr(e_mpno,f_name,l_name,m_name,dept,desg,branch_no)
branch_mstr(name,b_no)

List the employee details along with branch names to which they belong

4. Create following Tables


emp_mstr(emp_no,f_name,l_name,m_name,dept)
cntc_dets(code_no,cntc_type,cntc_data)

List the employee details along with contact details using left outer join & right join

5. Create following Tables


cust_mstr(cust_no,fname,lname)
add_dets(code_no,pincode)

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

perform insert update delete operations

c) create updateable view on borrower table by selecting any two columns and perform insert
update
delete operations.

Department of Computer Engineering


DBMS: Group A- Database Programming Languages – SQL

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?

Department of Computer Engineering

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy