Skip to content

This repository contains all the DBMS College Practicals using MySQL done by me in B.Sc. 4th Semester.

Notifications You must be signed in to change notification settings

Kaustav-Purkayastha/DBMS-Using-MySQL-4th-Sem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’» Database Management Systems

DBMS-Using-MySQL-4th-Sem

πŸ”₯ Let's Connect! πŸ‘‡


       

πŸ“œList of Practical Questions:

Q1)   Create a table Employee (empid, empname, sex, dept, salary). 'empid' as primary key.

    (a) Make at least 6 entries in the table.

    (b) Display the names of the employees whose salary are more than 20000 but less than 30000.

    (c) Count the number of employees who are working in the 'Maths' department.


Q2)   Create a table Route (rid, rno, origin, destn, fare, distance). 'rid' as primary key.

    (a) Make at least 6 entries in the table.

    (b) Display only those routes whose origin has a substring 'ma'.

    (c) Increase the fare of all the routes by 5%.


Q3)   Create a table Student (roll, name, address, dept). 'roll' as primary key.

    (a) Store at least 5 records.

    (b) Add an attribute named 'contact' in the table.

    (c) Update all the records.


Q4)   Create a table Client (clno, name, address, city, state).

    (a) Display the distinct city in the table.

    (b) Display only those routes whose origin has a substring 'ma'.

    (c) Count the number of clients in the state 'Bihar'.


Q5)   Create the following tables:

    Customer (Cid, Cname); 'Cid' as primary key.

    Branch (Bcode, Bname); 'Bcode' as primary key.

    Account (Ano, Atype, Balance, Cid, Bcode); 'Ano' as primary key.

  An account can be saving account or a current account. Check Atype in 'S' or 'C'. A customer can have both types of accounts.

    Transaction (Tid, Ano, Ttype, Tdate, Tamount); 'Tid' and 'Ano' as primary key.

  Ttype can be 'D' or 'W'. D - Deposit, W - Withdrawal.

    (a) Make entries in each of the table.

    (b) Develop a SQL query to list the details of customers who have a saving account and a current account.

    (c) Develop a SQL query to list the details of branches and the number of accounts in each branch.

    (d) Develop a SQL query to list the details of branches where the number of accounts is less than the average number of accounts in all branches.





πŸ€–Join Community!

- Stuck at any question?
- Confusions regarding any solution provided?
- Want to discuss something regarding above topics?
- Want to connect with other students?

  • join JOIN HERE !!

      discord  



πŸ”Connect With Me!

       

Give this Repository a STAR⭐

(If you find this repository helpful)
Thank You!!πŸ’

Made by Kaustav PurkayasthaπŸ˜‰

About

This repository contains all the DBMS College Practicals using MySQL done by me in B.Sc. 4th Semester.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages