0% found this document useful (0 votes)
81 views8 pages

Course Description:: M21DE0108 Rdbms Lab L T P C Duration:14 Wks 0 0 2 2

This document provides information about a Relational Database Management System (RDBMS) lab course including its duration, description, prerequisites, objectives, outcomes, and details of experiments involving creating tables and inserting sample data. The course is a 14 week problem-based learning course that introduces concepts of database systems and relational databases, building ER diagrams and normalization, and using Oracle software for database development and manipulation. The objectives are to teach basic database concepts, building ER diagrams and normalization, using Oracle software to develop tables, and manipulating tables. On completion, students will understand basic database concepts, relational schema design, Oracle features, and applying database languages to real world applications. Listed are table structures to create and sample data to insert for tables like

Uploaded by

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

Course Description:: M21DE0108 Rdbms Lab L T P C Duration:14 Wks 0 0 2 2

This document provides information about a Relational Database Management System (RDBMS) lab course including its duration, description, prerequisites, objectives, outcomes, and details of experiments involving creating tables and inserting sample data. The course is a 14 week problem-based learning course that introduces concepts of database systems and relational databases, building ER diagrams and normalization, and using Oracle software for database development and manipulation. The objectives are to teach basic database concepts, building ER diagrams and normalization, using Oracle software to develop tables, and manipulating tables. On completion, students will understand basic database concepts, relational schema design, Oracle features, and applying database languages to real world applications. Listed are table structures to create and sample data to insert for tables like

Uploaded by

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

M21DE0108 L T P C

RDBMS LAB
Duration:14 Wks 0 0 2 2

Course Description:

The course, Relational Database Management System, provides an introduction to the management of
database systems. The course emphasizes the understanding of the fundamentals of relational systems
including data models, database architectures, and database manipulations. The course also provides
an understanding of new developments and trends such as Internet database environment and data
warehousing. The course uses a problem-based approach to learning.
Prerequisites:

Basic knowledge of Database


Course Objectives:

The objectives of this course are:


1. To introduce the basic concepts in Database Systems and Relational Databases.
2. To expose the students to the steps in building E-R Diagrams and Normalization.
3. To train the students in the practical skills using Oracle9i software to develop and alter tables.
4. To equip the students with skills to manipulate tables using updation, deletion and arithmetic
operations.
5. To provide the basic understanding to group data using built-in functions and join multiple
tables.

Course Outcomes:
On completion of this course the student will be able to:
1. Understanding basic concepts of Database Systems and relate the knowledge of mathematical
operations in databases.
2. Analyse and design the decomposed relational schema by using dependency algorithms.
3. Understanding the various features of Oracle 9i software tool and programming the various
database languages.
4. Applying the knowledge of databases languages to find the solutions for real world database
related applications.
LabExperiments
LISTING – I : Creation of tables:
Table Name: Client_master :
Description: Use to store information about clients.
Column Name Data Size Attributes
Type
Client_no Varchar2 6 Primary Key / First letter must start with ‘C'.
Name Varchar2 20 Not Null
Address1 Varchar2 30
Address2 Varchar2 30
City Varchar2 15
State Varchar2 15
Pincode Numeric 6
Bal_due Numeric 10,2

Table Name :product_master


Description : Use to store information about products.
Column Name Data Type Size Attributes
Product_no Varchar2 6 Primary Key / first letter must start with ‘P'
Description Varchar2 15 Not Null
Profit_percent Numeric 4,2 Not Null
UNIT_measure Varchar2 10 Not Null
Qty_on_hand Numeric 8 Not Null
Reorder_lvl Numeric 8 Not Null
Sell_price Numeric 8,2 Not Null, Cannot be 0.
Cost_price Numeric 8,2 Not Null, Cannot be 0.

Table Name :salesman_master


Description : Use to store information about salesman working in the company

Column Name Data Type Size Attributes


Salesman_no Varchar2 6 Primary Key / First letter must start with ‘S'
Salesman_name Varchar2 20 Not Null
Address1 Varchar2 30 Not Null
Address2 Varchar2 30
City Varchar2 20
Pincode Varchar2 6
State Varchar2 20
Sal_amt Numeric 8,2 Not Null, cannot be 0
Tgt_to_get Numeric 6,2 Not Null, cannot be 0
Ytd_sales Numeric 6,2 Not Null
Remarks Varchar2 60
Table Name :sales_order
Description : Use to store information about order
Column Name Data Type Size Attributes
S_order_no Varchar2 6 Primary Key / First letter must start with ‘O'
S_order_date Date
Client_no Varchar2 6 Foreign Key references client_no of client_master table
Dely_addr Varchar2 25
Salesman_no Varchar2 6 Foreign Key references salesman_no of
salesman_master table.
Dely_type Char 1 Delivery : part (P) / full (F), Default ‘F'
Billed_yn Char 1
Dely_date Date Cannot be less than s_order_date
Order_status Varchar2 10 Values(‘In Process', ‘Fulfilled',
‘BackOrder','Canceled')
Table Name :sales_order_details
Description : Use to store information about products ordered.
Column Name Data Type Size Attributes
S_order_no Varchar2 6 Primary Key / Foreign Key references s_order_no of
sales_order table.
Product_no Varchar2 6 Primary Key / Foreign Key references product_no of
product_master table.
Qty_ordered Numeric 8
Qty_disp Numeric 8
Product_rate Numeric 10,2

Table Name :Challan_Header


Description :Use to store information about challans made for the order.
Column Name Data Type Size Attributes
Challan_no Varchar2 6 Primary Key / first two letters must start with ‘CH'.
S_order_no Varchar2 6 Foreign key references s_order_no of sales_order table.
Challan_date Date Not Null
Billed_yn Char 1 Values(‘Y','N'), Default ‘N'.
LISTING - II : Insertion of values
1. Data for client_mastr table:

Client_no Name City Pincode State Baldue


C00001 lvanBayross Bombay 4000J4 Maharashtra 15000
C00002 VandanaSaitwal Madras 780001 Tamil Nadu 0
C00003 PramadaJaguste Bombay 400057 Maharashtra 5000
C00004 BasuNavindgi Bombay 4000J6 Maharashtra 0
C0000J Ravi Sreedharan Delhi 100001 2000
C00006 Rukmini Bombay 400050 Maharashtra 0
2. Data for Product_master table:
Product_no Description Profit UOM Qtyonhand Reorderlvl Sellprice Costprice
Percent
P00001 1.44 Floppies 5 Piece 100 20 525 500
P034J3 Monitors 6 Piece 10 3 12000 11280
P06734 Mouse 5 Piece 20 5 1050 1000
P0786J 1.22 Floppies 5 Piece 100 20 525 500
P07868 Keyboards 2 Piece 10 3 3150 3050
P0788J CD Drive 2.5 Piece 10 3 5250 5100
P0796J J40 HDD 4 Piece 10 3 8400 8000
P0797J 1.44 Drive 5 Piece 10 3 1050 1000
P0886J 1.22 Drive 5 Piece 2 3 1050 1000

3. Data for Salesman_master table:


Salesman Salesman Add1 Add2 City Pincod State Sal Tgt_toG YtdSa Remar
No Name e Amt et les ks
S00001 Kiran A/14 Worli Bomba 400002 MAH 3000 100 50 Good
y
S00002 Manish 6J Nariman Bomba 400001 MAH 3000 200 100 Good
y
S00003 Ravi P-7 Bandra Bomba 400032 MAH 3000 200 100 Good
y
S00004 Ashish A/J Juhu Bomba 400044 MAH 3000 200 150 Good
y

4. Data for sales_order table:


S_order_n Sorderdate Clientno DelyT Bill Salesman No Delydate Order
o ype YN Status
O19001 12-JAN-96 C00001 F N S00001 20-JAN-96 In Process
O19002 2J-JAN-96 C00002 P N S00002 27-JAN-96 Cancelled
O4686J 18-FEB-96 C00003 F Y S00003 20-FEB-96 Fulfilled
O19003 03-APR-96 C00001 F Y S00001 07-APR-96 Fulfilled
O46866 20-MAY-96 C00004 P N S00002 22-MAY-96 Cancelled
O10008 24-MAY-96 C0000J F N S00004 26-MAY-96 In Process
5..Data for sales_order_details table :

S_order_no Productno Qtyordered Qtydisp Productrate


O19001 P00001 4 4 525
O19001 P07965 2 1 8400
O19001 P07885 2 1 5250
O19002 P00001 10 0 525
O46865 P07868 3 3 3150
O46865 P07885 3 1 5250
O46865 P00001 10 10 525
O46865 P03453 4 4 1050
O19003 P03453 2 2 1050
O19003 P06734 1 1 12000
O46866 P07965 1 0 8400
O46866 P07975 1 0 1050
O10008 P00001 10 5 525
O10008 P07975 5 3 1050

6. Dataforchallan_headertable:
Challan_no Sorderno Challandate Billed
CH9001 O19001 12-DEC-95 Y
CH6865 O46865 12-NOV-95 Y
CH3965 O10008 12-OCT-95 Y

7.Data for challan_details table:


Challan_no Productno Qtydisp
CH9001 P00001 4
CH9001 P07965 1
CH9001 P07885 1
CH6865 P07868 3
CH6865 P03453 4
CH6865 P00001 10
CH3965 P00001 5
CH3965 P07975 2

LISTING – III : SINGLE TABLE RETRIEVAL


1) Find out the names of all clients.
2) Print the entire client_master table.
3) Retrieve the list of names and the cities of all the clients.
4) List the various products available from the product_master.
5) Find the name of all clients having 'a' as the second letter in their names.
6) Find out the clients who stay in city whose second letter is 'a'.
7) Find the list of all clients who stay in Bombay or city Delhi or city Madras.
8) List all the clients who are located in 'Bombay'.
9) Print the list of clients whose bal_due are greater than value 10000.
10) Print the information from sales_order table of order placed in month of January.
11) Display order information for client_no 'c00001' and 'c00002' ;
12) Find the products with description as '1.44 drive' and '1.22 drive' .
14) Find the product whose selling price is more than 1500 and also find the new selling price as
original price * 15
15) Rename the new in the above query as new_price
16) Find the product whose cost price is less than 1500
17) List the product in sorted order of their description
18) Calculate the square root of price of each product.
19) Divide the cost of product '540 HDD' by difference between its price and 100.
20) List the names,city,state of clients not in the state of 'Maharashtra' .
21) List the product_no,description,sell_price of products whose description begin with letter 'M' .
22) List of all orders that were canceled in month of March.

LISTING – IV : TABLE UPDATIONS


1)Change the s_order_date of cllient_no'C00001' to 24/07/96
2)Change the selling price of '1.44 Drive' to Rs. 1150.00
3) Delete the record with order no 'O19001' from the order table
4) Delete all the records having delivery date before 10-jul-96
5)Change the city of client_no 'C00005' to 'Bombay'
6) Change the delivery date of order no 'O10008' to 16-08-96
7) Change the bal_due of client_no 'C00001' to 1000
8) Change the cost price of '1.22 Floppy Drive' to Rs.950.00

LISTING – V : SET FUNCTIONS AND CONCATENATION


1)Count the total no. of orders.
2)Calculate the average price of all the products.
3)Calculate the minimum price of product
4)Determine the maximum and minimum product price.Rename the title as max_price and min_price
respectively.
5)Count the number of product having price greater than or equal to 1500.
6)Find all products whose qty_on_hand is less than recorder level.
7)Print the information of client_master,product_master,sales_order table in the following format for
all the record.{cust_name}has placed order {order_no}on {s_order_date}.

LISTING – VI : JOINS AND CORRELATION


1) Find out the product which has been sold to 'ivanbayroos'.
2) Find out the product and their quantities that will have to delivered in the current month.
3) Find the product_no and description of moving products.
4) Find the names of the clients who have purchased 'CD Drive'.
5) List the product_no and s_order_no of customers having qty_ordered less than 5 from the order
detail Table for the product '1.44 Floppies'.
6) Find the products and their quantities for the orders placed by 'VandanaSaitwal' and 'Ivan Bayross'.
7) Find the products and their quantities for the orders placed by client_no'C00001' and 'C00002'.

LISTING – VII : NESTED SUBQUERIES


1) Find the product_no and description of non-moving products(eg.products not being sold).
2)Find the customers name,address1,address2,city and pincode for the client who has placed order no
"O19001'.
3) Find the client name who have placed order before the month of may,96.
4)Find out if product "1.44 Drive" is ordered by any client and print client_no name to whom it was
sold.
5) Find the name of clients who have placed ordered worth RS. 10000 or more.
LISTING – VIII : PL/SQL

1. Write a PL/SQL to update the rate field by 20% more than the current rate in inventory table which
has the following fields: Prono, ProName and Rate. After updating the table a new field (Alter) called
for Number of item and place for values for the new field without using PL/SQL block.
2. Write a PL/SQL to split the student table into two tables based on result (One table for ―Pass‖ and
another for ―Fail‖). Use cursor for handling records of student table. Assume necessary fields and
create a student details table.

LISTING – IX : PL/SQL

1. Create a database trigger to implement on master and transaction tables which are based on
inventory management system for checking data validity. Assume the necessary fields for both tables.
2. Write a PL/SQL to raise the following Exception in Bank Account Management table when deposit
amount is zero.

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