0% found this document useful (0 votes)
23 views7 pages

All Detabase SOP Writeups

Uploaded by

abdatshaikh27
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)
23 views7 pages

All Detabase SOP Writeups

Uploaded by

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

Database – SOP1

Load the Libreoffice Base

Select Create Database

Give name StudentMaster to the Database

Create the table Student with the following field name and field type using Create Table in
Design View:

Field Name Field Type


rollno Integer [INTEGER]
studname Text [VARCHAR]
class Integer [INTEGER]
div Text [VARCHAR]
city Text [VARCHAR]
dob Date [DATE]

Inserted 8 records as asked in the question.

Create the table Employee with following field name and field type Create Table in Design
View:

Field Name Field Type


employeeid Integer [INTEGER]
lastname Text [VARCHAR]
firstname Text [VARCHAR]
city Text [VARCHAR]
salary Integer [INTEGER]
birthdate Date [DATE]

Make employeeid field as primary key then save the table with name employee

Steps for Creating Form:

1. Open Database

2. Select Form object from left pane

3. Select use Wizard to Create Form

4. Select Table or Query to create form – Employee


5. Add the available fields using arrow keys which we want to include in form

6. Arrange controls of main form like Grid (by default), Labels left, Labels top, Labels
above

7. Set the Data entry mode like for new record only, no modification, no deletion of
existing record etc.

8. Apply style like 3D (by default), No border, Flat along with applying background color
style for form

9. Give the name for the form - frmemployee & select Work with the form
Database – SOP2

Load the Libreoffice Base

Select Create Database

Give name employeemaster to the Database

Create the table employee with the following field name and field type using Create Table in
Design View:

Field Name Field Type


empid Integer [INTEGER]
empname Text [VARCHAR]
empdept Text [VARCHAR]
empqual Text [VARCHAR]
empjoindate Date [DATE]
empsal Integer [INTEGER]

Inserted 8 records as asked in the question.

Steps for Creating Query

1. Select Query object from left pan


2. Select Use Wizard to Create the Query

2. From Add the Table or Query, Select employeemaster Table, Click on Add, Select
Close

3. Select Fields from the bottom pan by clicking > arrow

4. Select one by one Fields which you want to include in Query

5. In Select Sorting Order provide the field employeeid to sort on and select Ascending
for sorting

6. In select search condition provide field name empqual

7. Select condition as is equal to

8. in Value column provide MBA

9. From select Query type select – Detailed Query

10. Click on Next and if required provide Alias to the field else click on Next
11. Give the name to the query – queryempqual – select Display Query

12. Select Edit from Menu Bar, Click Run Query / F5

Repeat the above steps for the rest of the queries.

Query 1 : Where employee qualification = MBA

SELECT * FROM "employee" WHERE ("empequal" = 'MBA' ) ORDER BY "ID"

Query 2 : Where employee department = Accounts

SELECT * FROM "employee" WHERE ("empdept" = 'Accounts' ) ORDER BY "ID"

Query 3 : Where employee salary >70000

SELECT * FROM "employee" WHERE ("empesal" > 70000 ) ORDER BY "ID"

Query 4 : Where empname = ‘Mr Suhas Kale’

SELECT * FROM "employee" WHERE ("empname" = ‘Mr Suhas Kale’ ) ORDER BY "ID"
Database – SOP3

Load the Libreoffice Base

Select Create Database

Give name ProductMaster to the Database

Create the table Product with the following field name and field type using Create Table in
Design View:

Field Name Field Type


prodid Integer [INTEGER]
prodname Text [VARCHAR]
qty Integer [INTEGER]
rate Decimal [DECIMAL]
modelyear Date [DATE]

Inserted 8 records as asked in the question.

Steps Report object from left pan –

1. Generate Report to display record in Ascending order of productname

1. Open Database & Select Report object from left pane

2. Select use Wizard to Create Report

3. Select Table or Query to create Report – product (table name)

4. Add the available fields using arrow keys which we want to include in Report

5. Type the heading for the fields the way we want to appear in Report & click on Next

6. If you want to generate report as per Group then specify the group & click on Next
7. In Sorted by column select field prodname and Ascending

8. Choose the desired layout for report from the available like Tabular, Columnar etc.

9. Give the name to the Report- rptprodname

10. Select Dynamic Report

11. Select Orientation – Landscape

12. Create Report & Click on Finish

2. Generate Report to display record in Descending order of productrate

Repeat above steps as it is and only in sort by column select rate and Descending. Rest of the
steps are as it is.

3. Generate Report to display report Model Year wise

Repeat above steps as it is and only in Group By column select modelyear. Rest of the steps are
as it is.

4. Build the Query rate * qty

Steps for Creating Query

3. Select Query object from left pan


4. Select Query Design View
5. From Add the Table or Query, Select productmaster Table, Click on Add, Select Close
6. Select required Fields by pressing ˅ arrow which you want to include in Query
7. For displaying qty * rate type qty * rate in field name
8. Type Total Amount in Alias Column
9. Give the name to the query – totalcal
10. Select Edit from Menu Bar, Click Run Query / F5

For displaying the SQL Query-


Right click on the totalcal query

Select Edit in SQL view

SELECT "prodid", "prodname", "qty", "rate", "qty" * "rate" AS "Total Amount", "modelyear"
FROM "product"

5. For Generating Bill report

Open Database & Select Report object from left pane

2. Select use Wizard to Create Report

3. Select Table or Query to create Report – totalcal (Query name)

4. Add the available fields using arrow keys which we want to include in Report

5. Type the heading for the fields the way we want to appear in Report & click on Next

6. If you want to generate report as per Group then specify the group & click on Next

7. In Sorted by column select field prodid and Ascending

8. Choose the desired layout for report from the available – In blocks, labels above

9. Select the Orientation - Lanscape

9. Give the name to the Report- rptbill

10. Select Dynamic Report

11. Click Create Report now & Click on Finish

You might also like