0% found this document useful (0 votes)
33 views5 pages

Database Setup for Pollution Data

Uploaded by

VAIBHAV MISHRA
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)
33 views5 pages

Database Setup for Pollution Data

Uploaded by

VAIBHAV MISHRA
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

Project Steps

Step 1: Setting Up the Database

1. Open LibreOffice Base:


a. Launch LibreOffice Base from your applications.
2. Create a New Database:
a. Choose Create a New Database.
b. Click Next and then select Yes, register the database for me.
c. Name the database POLLUTION DATA and choose a file location to save it.
d. Click Finish to create the database.

Step 2:

Creating the Table (P_DATA)

1. Define Table Structure:


a. In LibreOffice Base, go to Tables in the left pane and click Create Table in
Design View.
2. Design View - Field Definitions:
a. Add the following fields with their data types:
i. CITY_NAME (Text [VARCHAR] - use a suitable length, e.g., 50).
ii. PM 2.5 (Number [DECIMAL] or [FLOAT]).
b. Ensure that CITY_NAME can handle unique values if required, or add a
separate ID field as a Primary Key.
c. Save the table as P_DATA.

Step 3: Enter Data into the Table

1. Open Table in Datasheet View:


a. Double-click the P_DATA table to open it in Datasheet View.
2. Enter Records:
a. Manually enter at least 10 records with city names and their PM 2.5 values
(representing real or sample data for pollution levels).
3. Save Data:
a. Save the table after entering data.
Step 4: Create a Form for Data Entry

1. Use the Form Wizard:


a. In the left pane, select Forms, then click Use Wizard to Create Form.
2. Select Table and Fields:
a. Choose P_DATA as the data source.
b. Move CITY_NAME and PM 2.5 fields to the right to include them in the form.
3. Form Layout:
a. Follow the wizard prompts to choose a layout and style for your form.
b. Customize the layout if needed, then proceed to the end.
4. Save and Use the Form:
a. Name the form, e.g., Pollution Data Entry Form.
b. Use the form to add or view records in the P_DATA table.
Step 5: Generate a Report for the Top 5 Most Polluted Cities

1. Create a Query to Identify the Top 5 Polluted Cities:


a. In the Queries section, choose Create Query in SQL View.
b. Enter the following SQL command to get the top 5 cities with the highest PM
2.5 values:
c. Save the query as Top 5 Polluted Cities Query.

2. Create a Report Based on the Query:


a. In the Reports section, click Use Wizard to Create Report.
b. Select Top 5 Polluted Cities Query as the data source.
c. Move CITY_NAME and PM 2.5 fields to the right.
3. Customize Report Layout:
a. Choose your preferred layout, add titles and headers if needed, then
proceed.
4. Save and Display the Report:
a. Save the report as Top 5 Most Polluted Cities Report.
b. Open or print the report to verify that it displays the top 5 cities with the
highest PM 2.5 levels.

You might also like