Sem2 IDC BCA-124 P Working With Data Using MySQL
Sem2 IDC BCA-124 P Working With Data Using MySQL
Credits: 2
Course Outcomes:
The aim of this course is to enable students to
Work with database applications.
Prerequisites: No prerequisites
Contents:
MySQL Constraints (NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK,
DEFAULT), MySQL Clauses(WHERE Clause, ORDER BY clause, HAVING Clause,
TOP Clause, GROUP BY Clause), MySQL Join (Cross Join, Natural Join),
Establishing Relationship : Creating ER diagram of database in MySQL
Workbench.
Following type of sample applications can be asked in exam
Customer(cid,c_name,address,email,city)
Loan(Loanid,cid,amount,rate_of_interest,loan_type,issue_date)
Values for loan_type should be “HOUSING”,”PERSONAL” and “VEHICLE” only.
Event(eid,ename,start_date,end_date)
Participants(pid,eid,P_name,gender)
Gender should be ‘M’ or ‘F’ only. And Value for ename should not be null and default value
should be “BIRTHDAY”.
Perform the following queries
a) Count the number of participants where eid=2.
b) Display the records of participants who have participated in “BIRTHDAY”.
c) Display the records of events where ename begins with ‘B’.
d) Display all event starting between “2022/03/03” and “2022/05/05”
e) Create a view EVENTDETAIL, that displays events other than “BIRTHDAY”.
Faculty (fid,fname,qualification,salary)
Course(cid,fid,course_name,fees)
Perform the following queries
a) Default value for salary should be 10,000.
b) Display the name of courses where fees are greater than 25000.
c) Display the faculty names and course name for BCA course
d) Display the records of faculties where qualification is “M.COM”.
e) Update the fees of course to 25000 where where course_name is “MCA”
7. Create a database LIBRARY_DB with the following tables
Set appropriate datatypes and set primary keys and foreign keys. Create relationship between tables
and create E-R Model.
Book_Category(catid,cat_name)
Book_details(bid,bname,publication,author,price,catid)
Perform the following queries
a) Display books where book name begins with letter “P” or “M”.
b) Update price of book “DATABASE” to 2000.
c) Count number of books where publication is “DREAMTECH”
d) Display books where price is >500 and catid is 2
e) Create a view BOOK which will display all the book details where price is between 500 and 1000.
---------------------------------