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

Record Work-Dbms-2024

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)
11 views8 pages

Record Work-Dbms-2024

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/ 8

DATABASE DEVELOPMENT(BASIC)

Activity-1

Aim:- To Create a Table in Open Office Base and Write the SQL
statements for the Queries .

Consider the following table “Item”:


Table name: Item
Itemno Iname Price Quantity
11 Soap 40 80
22 Powder 80 30
33 Face cream 250 25
44 Shampoo 120 100
55 Soap box 20 50
Write queries to:
i. Display the total amount of each item. The
amount must be calculated as the price
multiplied by quantity for each item.
ii. Display the details of items whose price is less
than 50.
iii. Display the table in descending order of the field
quantity.
iv. Insert a new record with the following details:
(150,’Paint box’,10, 30)
v. Delete all the records of items whose price is
less than Rs.50/-.
vi. Change the quantity of shampoo from 100 to 65.

Software Used:-Open office Base.

Features used:- Create table in Design view and use Query.

Procedure :-

Step 1-Tables->Create table in Design view.

Step 2-Enter Field name, Field Type and Field Properties and set
primary key.

Step 3: Click on File->Save.

Step 4: Enter the data by double clicking on the table


name.

SQL Statements:

(i) Select “Price” * “Quantity” from “Item”;


(ii)Select * from “Item” where “Price” < 50;
(iii) Select * from “Item” order by “Quantity” desc;
(iv)Insert into “Item”(“Itemno”,”Iname”,”Price”,”Quantity “)
values(150,’Paint box’,10, 30);

(v)Delete from “Item” where “Price”<50;


(vi)Update “Item” set “Quantity”=65 where
“Iname”=’shampoo’;

Output:

A table in Open office Base has been created and executed


all the queries.
ACTIVITY-2

AIM

Consider the following EMPLOYEE table and write the


queries(4 marks)

EMPID EMPNAME DESIGN SALARY

E1001 SANKALP DOCTOR 50000

E1002 ALOKH ENGINEER 45000

E1003 NEERAJ ACCOUNTANT 30000

E1004 SATHI DOCTOR 60000

E1005 SHARMA ENGINEER 50000

(i)Write a query to display all the records whose DESIGN


is DOCTOR.
(ii) Write a query to display half of the salary amount
paid to the employees.
(iii)Write a query to add a new row with the following
details:(‘E1006’,’KAPIL’,’TEACHER’,30000)
(iv)Write a query to modify the designation of Neeraj from
Accountant to Artist.
(v)Write a query to delete the record of employees whose
design=doctor.
(vi)Identify the primary key in the table.
(vii) To view records in descending order of empname,
from the table.
Software Used:-Open office Base.

Features used:- Create table in Design view and use Query.

Procedure :-

Step 1-Tables->Create table in Design view.

Step 2-Enter Field name, Field Type and Field Properties and set
primary key.

Step 3: Click on File->Save.

Step 4: Enter the data by double clicking on the table


name.

SQL Statements:
(i)Select * from “EMPLOYEE” where
“DESIGN”=’DOCTOR’;
(iiI Select “EMPID”, “EMPNAME”,”DESIGN”, “SALARY”/2
from “EMPLOYEE”;
(iii) Insert into “EMPLOYEE”
values(‘E1006’,’KAPIL’,’TEACHER’,30000);
(iv) Update “EMPLOYEE” set “DESIGN” = ‘ARTIST’ where
“EMPNAME” =’NEERAJ’;
(v) Delete from “EMPLOYEE” where “DESIGN”=’DOCTOR’;
(vi) EMPID
(vii)Select * from “EMPLOYEE” order by “EMPNAME”
DESC;

Output:
A table in Open office Base has been created and executed
all the queries.

ACTIVITY 3
AIM: Create a FORM for the EMPLOYEE TABLE created.

Software Used:-Open office Base.

Features used:- Create Form using wizard.

Procedure :-To create a Form:

Step1- Using Wizard.

Click on Forms option under database section.

Step2-Click Use wizard to create form under Task section.

Step3-Select the fields of your form and click next button.

Step4-Select the option Add Subform , if you need to


setup a sub form and click next button.

Step5-Arrange the controls on your form and click next


button.

Step6-Select the data entry mode and click next button.

Step7-Apply the style of your form and click next button.


Step8-Set the name of the form and click finish button.

Output-
A form has been created for the table.

ACTIVITY 4
AIM: Design a REPORT to display the data from
EMPLOYEE TABLE created.

Software Used:-Open office Base.

Features used:- Create

Step1- using Wizard.

Procedure :-To create a Report.

Step1-Click on Report under database and select use


wizard to create report.

Step1-Select the required fields and click on next button.

Step2-Select labelling fields and click on next button.

Step3-Specify the grouping levels, if you want and click on


next button.

Step4-Use sort option if needed and click next.


Step5-Choose the layout of the report and press next
button.

Step6-Select create report now and click on finish button.

Output-
A report has been generated for the table.

Note:-

Please take the hard copy of the activities (1 to 4)and stick


in the record.

You might also like