0% found this document useful (0 votes)
68 views14 pages

Faculty of Computer Applications Bachelor of Science (Information Technology) B.Sc. (IT)

This document outlines the syllabus for a Database Management Systems course. It includes 5 units that cover introductory concepts, entity relationship modeling, the relational model, basic SQL, and advanced SQL. It lists chapter mappings for textbook and online resources. It also provides details of 5 practical assignments involving creating tables, inserting data, and writing SQL queries on the Oracle database management system.

Uploaded by

Rudrik Bhatt
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)
68 views14 pages

Faculty of Computer Applications Bachelor of Science (Information Technology) B.Sc. (IT)

This document outlines the syllabus for a Database Management Systems course. It includes 5 units that cover introductory concepts, entity relationship modeling, the relational model, basic SQL, and advanced SQL. It lists chapter mappings for textbook and online resources. It also provides details of 5 practical assignments involving creating tables, inserting data, and writing SQL queries on the Oracle database management system.

Uploaded by

Rudrik Bhatt
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/ 14

FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

▪ Sem. :1
▪ Subject Code :05BS0104
▪ Subject : Database Management System – 1

▪ Course Objectives :
1. To understand and to get familiarize with basic concepts of DBMS.
2. To conceptualize the database using E-R Model and to understand the
process of normalization.
3. To create database design using relational model and to carry out
relational algebraic operations.
4. To execute and analyze basic SQL queries.
5. To create and manage different SQL objects.

▪ Prerequisites:Basics and elementary knowledge of working with the


computer.

Unit No Topics Covered No of


lectures
required
1 Introduction to DBMS: 10
Fundamentals of Database Management System,
DBMS Characteristics, Advantages of DBMS,
Applications of DBMS, Schema and Instance, Data
Independence, Database Models, ANSI-SPARC
Architecture.

2 Entity Relationship Model& Normalization: 10


Introduction to E-R Model, E-R Diagram Components,
Entity, Attribute and Relationships, Mapping
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

Cardinality, Binary and Ternary relationship, Symbols


of E-R Diagram, The concept of weak entity set.

Concept of Functional Dependencies, different types of


functional dependencies, decomposition process with
example, Normalization – First Normal Form (1NF),
Second Normal Form (2NF) andThird Normal Form
(3NF).

3 Relational Model: 10
Relational Model concepts, RelationalModel constraints
and Relational Database Schemas
Relational Algebra, Relational Algebra Operations:
Selection, Projection, Join, Union, Intersect and
Difference, Relational Algebra Examples.

4 Basic SQL: 10
Introduction to SQL, Data Types, Categories of SQL
Commands, Creating a table, Altering the structure of
table, Removing the table, Rename the table, Insert,
Update, Delete operation, Assigning and revoking
object privileges using Grant and Revoke Command,
Primary Key, Foreign Key, Unique, Not Null, Check
Constraint, Oracle SQL operators.

5 Advanced SQL: 10
Range Searching, Pattern Matching, Order By Clause,
Group By and Having Clause,Set Operators, Sub
Queries, Joins, Dual Table, Oracle Aggregate and
built-in Functions, Views, Index, Sequence,
Synonyms.

Course Outcomes:

1. Student will be able to understand the basic concepts, applications and


features of DBMS.
2. Student will be able to create conceptual representation of database and will
be able to carry out database normalization process.
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

3. Students will be able to perform various relational algebra operations on


database.
4. Student will be able to execute different SQL commands and Queries.
5. Student will be able to implement advanced queries and built in functions.

Course Outcomes – Program Outcomes Mapping Table :

PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10
CO1 L L H
CO2 L M H M
CO3 H L H
CO4 M L L
CO5 L M M H

Text Book :

1. “Fundamentals of Database Systems”, RamezElmsari, Shamkant B Navathe,


Pearson Education, 4th Edition.
2. “SQL, PL/SQL the programming Language of Oracle”, Ivan Byross, BPB
Publication, 4th Edition.

Reference Books :

1. “An Introduction to Database Systems”, C J Date, A Kannan, S Swaminathan,


Pearson Education, 8th Edition.
2. “Database Systems : Design, Implementation and Management”, Peter Rob,
Carlos Coronel, 7th Edition, Cengage Learning (2007)
3. “Database System Concepts, Design &Applications”, S. K. Singh, Pearson
Education.
4. “Oracle Database 11g: The Complete Reference”, Kevin Loney, Oracle Press.

Web References:

1. https://www.oracletutorial.com/
2. https://www.guru99.com/sql.html
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

3. https://www.oracle.com/webfolder/technetwork/tutorials/obe/db/
12c/r1/odb_quickstart/odb_quick_start.html
4. https://www.techonthenet.com/oracle/index.php
5. https://www.w3resource.com/oracle/index.php

App References:

1. https://livesql.oracle.com/apex/
2. https://apex.oracle.com/en/
3. https://play.google.com/store/apps/details?id=in.ajaykhatri.learnd
bms&hl=en_IN
4. https://play.google.com/store/apps/details?id=com.msh.plsqllearni
ng&hl=en_IN&gl=US
5. https://www.oracle.com/database/technologies/appdev/plsql.html

Syllabus Coverage from text /reference book & web/app reference:

Unit # Chapter Numbers


1 Book – 1: Chapter 1: (1.1 to 1.6), Chapter 2: (2.1 to 2.2)
2 Book – 1: Chapter 3, Chapter 10: (10.2 to 10.5)
3 Book – 1: Chapter 5: (5.1 to 5.2), Chapter 6: (6.1 to 6.3)
4 Book – 2: Chapter 7, 8
5 Book – 2: Chapter 9, 10, 11
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

PRACTICALS
# Tool: Oracle 10g or above
Sr. Unit : 1
No
1 - Create following tables:
(1) DEPOSIT (3) CUSTOMERS
Column Name Datatype(Size) Column Name Datatype(Size)
ACTNO VARCHAR2(5) CNAME VARCHAR2(15)
CNAME VARCHAR2(15) CITY VARCHAR2(15)
BNAME VARCHAR2(15)
AMOUNT NUMBER(9,2)
ADATE DATE (4) BORROW
Column Name Datatype(Size)
(2) BRANCH LOANNO VARCHAR2(5)
Column Name Datatype(Size) CNAME VARCHAR2(15)
BNAME VARCHAR2(15) BNAME VARCHAR2(15)
CITY VARCHAR2(15) AMOUNT NUMBER(9,2)

- Insert the following data inside the tables:


(5) DEPOSIT
ACTNO CNAME BNAME AMOUNT ADATE
100 ANIL VRCE 1000.00 01-MAR-95
101 SUNIL AJNI 5000.00 04-JAN-96
102 MEHUL KAROLBAGH 3500.00 17-NOV-95
104 MADHURI CHANDI 1200.00 17-DEC-95
105 PRMOD M G ROAD 3000.00 27-MAR-96
106 SANDIP ANDHERI 2000.00 31-MAR-96
107 SHIVANI VIRAR 1000.00 05-SEP-95
108 KRANTI NEHRU PLACE 5000.00 02-JUL-95
109 MINU POWAI 7000.00 10-AUG-95

(6) BRANCH (7) CUSTOMERS


BNAME CITY CNAME CITY
VRCE NAGPUR ANIL CALCUTTA
AJNI NAGPUR SUNIL DELHI
KAROLBAGH DELHI MEHUL BARODA
CHANDI DELHI MANDAR PATNA
DHARAMPETH NAGPUR MADHURI NAGPUR
M G ROAD BANGLORE PRAMOD NAGPUR
ANDHERI BOMBAY SANDIP SURAT
VIRAR BOMBAY SHIVANI BOMBAY
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

NEHRU PLACE DELHI KRANTI BOMBAY


POWAI BOMBAY NAREN BOMBAY

(8) BORROW
LOANNO CNAME BNAME AMOUNT
201 ANIL VRCE 1000.00
206 MEHUL AJNI 5000.00
311 SUNIL DHARAMPETH 3000.00
321 MADHURI ANDHERI 2000.00
375 PRMOD VIRAR 8000.00
481 KRANTI NEHRU PLACE 3000.00
201 ANIL VRCE 1000.00
206 MEHUL AJNI 5000.00
311 SUNIL DHARAMPETH 3000.00
321 MADHURI ANDHERI 2000.00

- Perform the following queries on the above tables:


1. Describe deposit, branch from deposit table.
2. Describe borrow, customers tables.
3. List all data from table DEPOSIT.
4. List all data from table BORROW.
5. List all data from table CUSTOMERS.
6. List all data from table BRANCH.
7. Give account no and amount of depositors.
8. Give name of depositors having amount greater than Rs. 4000.
9. Give name of customers who opened account after date '01-DEC-96'.
10.List all the customers from Bombay city.

2
Id Name Type Price Quality Item_pack_date

I1 Dairymilk Chocolate 500 Good 12-aug-2000

I2 Kajukatri Mithai 1000 Verygood 15-jan-2016

I3 Pizza Fastfood 350 Average 20-Feb-2015

I4 Orangejuice Juice 50 Best 05-feb-2016

I5 Vanilla_cack Bakery 2000 Good 01-jan-2016


Item
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

1. Create above Table name as item_master.


2. Insert Data shown in table.
3. Select information about price,quality and item_pack_date of the item.
4. Display information about item.
5. Sort the item by its quality.
6. Display quality from table with distinct values.
7. Change the quality of item from Good to Verygood.
8. Display item having quality Verygood.
9. Add new columns item_pur_date into table.
10.Display all information of items having price more than Rs. 500.
11.Delete the item having price of Rs. 50.
12.Rename table from person to Item_detail.

3 Cust_no Cust_name Address1 Address2 City State Ph_no

C1 Priya RingRoad Puja Park Ahmedabad Gujarat 8989878548

C2 Puja Lajpat Shyamal Banaras UP 7898456213


Nager colony

C3 Ankit Borivali Panchayat Mumbai Maharashtra 7885984251


nager

C4 Ravi VajdiRoad Nandbhoomi Delhi Delhi 7898452034


colony

C5 Alpa Jamanager Railway Ahmedabad Gujarat 7465241589


Road colony

1. Create above Table name as Cust_master.


2. Insert Data shown in table.
3. Select information about all customers.
4. Display the list of customers belonging to “Gujarat” state.
5. Sort the customer by their customer name.
6. Display city from table with distinct values.
7. Change the address1 of priya from “Ring Road‟ to “CG Road‟.
8. Display city of customer whose state is Gujarat.
9. Add new column pin_code into cust_master table.
10.Drop column pin_code from table.
11.Delete the customer having ph_no value '7898452034’.
12.Rename table from cust_master to customer_detail.
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

4 Person_Id Fname Lname City Salary

1 Sneha Sheth Rajkot 10000

2 Puja Parmar Ahmedabad 2000

3 Riya Gajar Pune 8000

4 Sandip Jadeja Pune 5000

5 Alpesh Prajapati Mumbai 20000

1. Create above Table name as Person.


2. Insert data shown in table.
3. Select information about Person_Id, Fname of the person.
4. Display the list of person.
5. Sort the person by salary.
6. Display city from table with distinct values.
7. Change the city of sandip from pune to kolkata.
8. Display person whose Lname is “Prajapati‟.
9. Add new columns state, Birthdate and pincode into table.
10.Display all information of person having salary more than 6000.
11.Delete the person having salary less than 3000.
12.Rename table from person to person_master.

5 Branch_id Branch_name Branch_Address Branch_City Branch_State Branch_Open_Date


B001 BOI JagnathRoad Rajkot Gujarat 22-mar-2015
B002 SBI Boriwali Road Mumbai Maharashtra 12-jan-2000
B003 HDFC AgraRoad Agra U.P 04-feb-1998
B004 DenaBank CGRoad Ahmedabad Gujarat 20-sep-2012
B005 ICICI MajavdiRoad Junagadh Gujarat 07-may-2011

1. Create above table with name Bank_Branch.


2. Insert given information into a table.
3. Display all information of Bank_Branch.
4. Display Branch_id of branch.
5. Display Branch_name of Branch table.
6. Display Branch_address of branch.
7. Display Branch_city of branch.
8. Display Branch_state of branch.
9. Display Branch_open_date of branch.
10.Display Branch_name and Branch_open_date of branch.
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

11.Display Branch_id and Branch_address from Branch.


12.Display Branch_name, Branch_addess and Branch_city from branch table.
13.Display Branch_city, Branch_state and Branch_open_date from Branch.
14.Sort table by Branch_id.
15.Sort table by Branch_name.
16.Sort table by Branch_city.
17.Sort table by Branch_state.
18.Change the size of Branch_state column.
19.Change the branch_name=’Union’ where id=B003.
20.Change the state=’Delhi’ of BOI branch.
21.Change the branch_open_date=04-nov-2015 of Union branch.
22.Add column Pincode in branch.
23.Insert pincode=360006 of Dena Bank.
24.Insert pincode=360005 of state Delhi.
25.Delete information of ICICI.
26.Delete information of Branch having branch_open_date=07-may-2011.
27.Rename table Bank_Branch to Branch_master.
28.Display structure of Branch_master.
29.Create Banch_info from Branch_master.
30.Create Branch_detail from Branchg_info.

Unit : 2
6 - Create following tables with proper normalization process :

(1) JOB (3) DEPOSIT


Column Name Datatype(Size) Column Name Datatype(Size)
job_id Varchar2(15) a_no Varchar2(5)
job_title Varchar2(30) cname Varchar2(15)
min_sal Number(7,2) bname Varchar2(10)
max_sal Number(7,2) amount Number(7,2)
a_date Date
(2) EMPLOYEE
Column Name Datatype(Size)
emp_no Number(3)
emp_name Varchar2(30)
emp_sal Number(8,2)
emp_comm Number(6,1)
dept_no Number(3)
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

- Insert the following data inside the tables:


(1) JOB
job_id job_name min_sal max_sal
IT_PROG Programmer 4000 10000
MK_MGR Marketing manager 9000 15000
FI_MGR Finance manager 8200 12000
FI_ACC Account 4200 9000
LEC Lecturer 6000 17000
COMP_OP Computer Operator 1500 3000

(2) EMPLOYEE
emp_no emp_name emp_sal emp_comm dept _no
101 Smith 800 20
102 Snehal 1600 300 25
103 Adama 1100 0 20
104 Aman 3000 15
105 Anita 5000 5,000 10
106 Sneha 2450 2,450 10
107 Anamika 2975 30

(3) DEPOSIT
A_no cname Bname Amount date
101 Anil andheri 7000 01-jan-06
102 sunil virar 5000 15-jul-06
103 jay villeparle 6500 12-mar-06
104 vijay andheri 8000 17-sep-06
105 keyur dadar 7500 19-nov-06
106 mayur borivali 5500 21-dec-06

- Perform the following queries on the above tables:

1. Retrieve all data from employee, jobs and deposit.


2. Give details of account no. and deposited rupees of customers having account opened
between dates 01-01-06 and 25-07-06.
3. Display all jobs with minimum salary is greater than 4000.
4. Display name and salary of employee whose department no is 20. Give alias name to
name of employee.
5. Display employee number,name and department details of those employee whose
department lies in(10,20).
6. Display all employee whose name start with ‘A’.
7. Display all employee whose third character is ‘a’.
8. Display all employee whose name start with ‘A’ and third character is ‘a’.
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

9. Display name, number and salary of those employees whose name is 5 characters long
and first three characters are ‘Ani’.
10.Sort and display the names of customers from deposit table.

7 - Perform the following queries on the tables created in practical exercise 1 and 6:
1. List total deposit from deposit.
2. List total loan from karolbagh branch.
3. Give maximum loan from branch vrce.
4. Count total number of customers .
5. Count total number of customer’s cities.
6. Create table supplier from employee with all the columns.
7. Create table sup1 from employee with first two columns.
8. Create table sup2 from employee with no data.
9. Insert the data into sup2 from employee whose second character should be ‘n’ and string
should be 5 characters long in employee name field.
10.Delete all the rows from sup1.
11.Delete the detail of supplier whose sup_no is 103.
12.Rename the table sup2 to suplier_two.
13.Destroy table sup1 with all the data.
14.Update the value dept_no to 10 where second character of emp. name is ‘m’.
15.Update the value of employee name whose employee number is 103.

8 - Perform the following queries on the tables created in practical exercise 1 and 6:
1. List total deposit of customer having account date after 1-jan-96.
2. List total deposit of customers living in city Nagpur.
3. List maximum deposit of customers living in Bombay.
4. Display the highest, lowest, sum, and average salary of all employees. Label the columns
Maximum, Minimum, Sum, and Average, respectively. Round your results to the nearest
whole number.
5. Write a query that displays the difference between the highest and lowest salaries. Label
the column DIFFERENCE.
6. Create a query that will display the total number of employees and, of that total, the
number of employees hired in 1995, 1996, 1997, and 1998
7. Find the average salaries for each department without displaying the repetitive
department numbers.
8. Write a query to display the total salary being paid to each job title, within each
department.
9. Find the average salaries > 2000 for each department without displaying the repetitive
department numbers.
10.Display the job and total salary for each job with a total salary amount exceeding 3000.
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

Unit : 3
9 - Perform the following queries on the tables created in practical exercise 1 and 6:
1. Give name of customers who are depositors having same branch city of mr.sunil.
2. Give deposit details and loan details of customer in same city where pramod is living.
3. Create a query to display the employee numbers and last names of all employees who
earn more than the average salary. Sort the results in ascending order of salary.
4. Display the last name and salary of every employee who reports to ford.
5. Display the department number, name, and job for every employee in the Accounting
department.
6. Give name of customer who are borrowers and depositors and having living city nagpur
7. Give city as their city name of customers having same living branch.
8. Write a query to display the last name, department number, and department name for all
employees.
9. Create a unique listing of all jobs that are in department 30. Include the location of the
department in the output
10.Write a query to display the employee name, department number, and department name
for all employees who work in CALCUTTA.
10 1. Create the following table named table as CUSTOMER with proper normalization.
COLUMN NAME DATATYPES SIZE DESCIPTION
CUST_NO NUMBER 4 PRIMARY KEY
FIRST_NAME VARCHAR2 20 NOT NULL
LAST_NAME VARCHAR2 20 -
ADDRESS VARCHAR2 20 -
CITY VARCHAR2 8 -
STATE VARCHAR2 20 -
PIN NUMBER 6 -
B_DATE DATE - -
STATUS CHAR 1 VALUES MUST BE IN (‘V’,’I’,’A’)– Check Constraint

2. Insert the following data into the CUSTOMER table:

1003 RAJ BAHADUR SHANTI VILLA UDP KARNATAKA 576101 1-AUG-70 V


1004 FELIX SIMON M-J-56 PJM GOA 403002 12-FEB-71 A
1005 RAJAN KUTTY A1 TRADERS KNR KERALA 670001 09-JUN-71 A
1006 SHILPA PAI 12/4B MNG KARNATAKA 574154 11-DEC-70 I
1007 BOSCO RAKSHIT R.K. PLAZA BNG KARNATAKA 576201 01-JAN-71 A

3. Display all the records from the table.


4. Display all the records from the table where state is KARNATAKA.
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

5. Delete the row from the table where PIN CODE is 576201.
6. Set the PIN CODE equal 476001 where CUST_NO=1004.
7. Change the ADDRESS as “KAVI MUDDANNA MARG” AND PIN=576104 where
CUST_NO=1003.
8. Delete the records of GOA state from the table and then retrieve all the records back.
9. List all the records for INVALID (‘I’) persons.
10.Select all the records with single occurrence (without duplication) of state from the table.
11.Sort and display the customer data, in the alphabetic order of state.
12.Sort and display the state field in the in descending order.
13.Select the records of KARNATAKA customers who are valid (‘V’).
14.Retrieve records of Karnataka / Kerala customers.
15.Retrieve records of Karnataka / Kerala customers who are ACTIVE (‘A’).
16.Retrieve records of Karnataka customers with pin code 576201.
17.Display all the rows from the table except for customer number 1005.
18.Retrieve rows where the state name begins with K and following by any other character.
19.Retrieve rows where name contains the word RAJ embedded it.
20.Display all the row who’s CUST_NO is in the range from 1003 to 1005.
21.Display all the rows whose dates are in the range of 10-JAN-71 and 31-DEC-71.
22.Retrieve all the rows where city column equals to UDP or MNG or BNG or PGN.
23.Rename customer table to CUST.
Unit : 4
11 - Perform the following queries on the tables created in practical exercise 10:
1. Create view named as CUST_VIEW from CUSTOMER table using CUST_NO, FIRST_NAME,
LAST_NAME columns and list out the records from CUST_VIEW.
2. Insert new record into CUST_VIEW.
3. Update LAST_NAME to RAO where CUST_NO 1006;
4. Delete the record from CUST_VIEW for CUST_NO 1005;
5. Create read only view CUST_RVIEW from CUSTOMER table and list out the records from
CUST_RVIEW.

12 - Perform the following queries on the tables created in practical exercise 6:


1. Create simple index on emp_no column of EMPLOYEE table.
2. Create composite index by taking emp_no, emp_name columns of EMPLOYEE table.
3. Create UNIQUE index on emp_no column of EMPLOYEE table.
4. Create composite index by taking emp_no, emp_name columns of EMPLOYEE table.
5. Drop all the indexes.

13 - Perform the following queries on the tables created in practical exercise 6:


1. Delete all the records from EMPLOYEE table
2. Create sequence named as EMP_SEQ on EMPLOYEE table. Sequence starts with values
FACULTY OF COMPUTER APPLICATIONS

Bachelor of Science (Information Technology)


B.Sc. (IT)

101, increment by 1, MinValue 1, MaxValue 1000.


3. Show the current value of index using dual table.
4. Show the next values of index using dual table.
5. Insert the records in EMPLOYEE table and use EMP_SEQ sequence to automatically
generate and store the value inemp_no column.

Unit : 5
14 - Perform the following queries on the tables created in practical exercise 1 and 6:
1. Create synonym DEPOSITOR for DEPOSIT table and list out the records.
2. Create synonym BORROWER for BORROW table and list out the records.
3. Create synonym FUNCTION for JOB table and list out the records.
15 - Perform the following queries on DUAL table:
1. Write a query to add 15 days to the current date.
2. Write a query to Add and subtract 5 months from the current month.
3. Find out the ASCII equivalent of character ‘M’.
4. Find out the character equivalent of ASCII 67, 65 and 84.
5. Write a query to find the last day of the month.
6. Write a query to calculate the Date difference between current date and 20/05/2015.
7. Write a query to Calculate the number of months between current date and03/03/2016.
8. Find out the second occurrence of ‘or’ from third position in the string ‘corporate floor.
9. Convert the string ‘marwadi university’ so that first character of eachword is in capital.
10.Find out the user name and user id of currently logged on user.

You might also like