Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

PRACTICAL

FILE

IT (402)
Aahana Ajmera (10)
X-A
RELATIONAL
DATABASE
MANAGEMENT
SYSTEM (BASIC)

REPORT TITLE
Q1) A) Create a database for collecting and maintaining census data.
Hint: Create fields such as First Name, Last Name, DOB, Place of birth,
Employment Status, etc.

STEPS –

1. Click start → All Programs → Apache Open Office → OpenOffice


Base.

2. A database wizard will open which will help you in creating a


database as shown below –

3. Create a new database by selecting the option Create a new


database.

4. Click Next.

REPORT TITLE
5. A dialogue box as shown below will appear.

6. Click Finish. The Save as dialogue box appears as shown


below.

REPORT TITLE
7. Specify a name for the database in the Filename field and
click Save.

8. A window like the displayed below will appear.

9. Click on Create table in design view option available under


Tasks area and a table design window will appear.

REPORT TITLE
10. Specify the Field names and data types for all the fields as
shown below and then save the table by clicking on File→Save

11. The table CENSUS will be created and will be visible under
tables section.

REPORT TITLE
12. Right click on the table name and click open, and start
inserting values.

REPORT TITLE
B) Using queries display the data of people working in a
specific area

STEPS –

1. Click on Queries in database and then click on Create query


in SQL view in Tasks.

REPORT TITLE
2. Type the following SQL command and all the people
working in a specific area will be displayed as follows –

REPORT TITLE
Q2) Write the SQL commands to answer the queries based on
Fabric table

(i) Display all record of table Fabric

Ans. SELECT * FROM Fabric;

(ii) To display only those fabrics whose discount is more than 5

Ans. SELECT * FROM Fabric WHERE Disc>5;

(iii) To display Name and type of fabric whose discount is 10.

Ans. SELECT * FROM Fabric WHERE Disc=10;

(iv) To modify the fabric shirt by increasing discount by 10

Ans. UPDATE Fabric SET Disc=Disc+10;

(v) Display details of woolen fabric.


Ans. SELECT * FROM CENSUS WHERE TYPE=’WOOLEN’;

REPORT TITLE

You might also like