Database - SOP 3
Database - SOP 3
SOP 3:
Create table Product with fieldnames prodid, prodname, qty, rate, modelyearbwith appropriate data type.
Insert minimum 8 records.
1. Generate report to display records in ascending order of Prodname.
2. Generate report to display records in descending order of Product rate.
3. Generate report to display model year wise product list.
4. Build a query to display amount (qty*rate).
5. Generate a bill report with appropriate titles and calculate amount for each record.
Solution:
i) Steps for creating a database:
a) Click on Start-> All Program -> Libre office -> Libre office base.
b) Database wizard window appears, select Save and Proceed -> Click on Finish button, select
proper location where you wish to save the database with appropriate name, and database will be
created.
ii) Steps for Creating a Table:
a) To create a table, click on Create table in design view -> Table design window appears, in
that window set fieldname, datatype as follows:
b) To assign PRIMARY KEY to ProdID field, right click on the small button present on the left side of
the fieldname and select Primary key option.
c) To save click on save button or press CTRL+S, give table name as employee and click on OK button,
table will be saved.
iii) Steps for inserting records in a Table:
For inserting records in a table, double click on the table in which data is to be inserted, a window will appear
on the screen, type data under each field and complete all the records.