0% found this document useful (0 votes)
6K views7 pages

Adobe Scan Dec 01, 2022

Uploaded by

Ujjwal Jaiswal
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)
6K views7 pages

Adobe Scan Dec 01, 2022

Uploaded by

Ujjwal Jaiswal
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

15.

(a) Create a database in OpenOffice:


i. Create a Student table with attributes RollNo. (Set Primary Key), Name,
Class and Total using SQL.
ii. Insert records into the table Student.
ii. Display all records.
iv. Update the marks of the student with RollNo 333
v. Sort the records in descending order of name.
vi. Display the details of the student with RollNo 444.
vii. Delete the details of student with RollNo 222.
(b) Create form using Wizard
(c) Create report using Wizard

Select Tools SQL


Type the command to create a table and click Execute.
Execute SQlL Statement

SQl command

Command to erecute

CREATE TABLE STUDENT (ROLLNO INTEGER PRIMARY KEY, NAME


ARCHAC0, CLASS CHARCIO, TOTAL INTEGEP01

Erecute
o u s Ccommands

Stetus

Command successfully executed.

delp Cjose

Command tocreatetable STUDENT.


CREATE TABLE STUDENT (ROLLNO INTEGER PRIMARY KEY,

NAME VARCHAR(20), CLASS CHAR(10), TOTAL INTEGER):

Command toinsertvalues into thetable STUDENT.


INSERT INTO STUDENT VALUES(111,Shreya', '10A.456):
INSERT INTO STUDENT VALUES(222, Remya', '10B,392):
INSERT INTO STUDENT VALUEs(333, Amir, '10A'473):
INSERT INTO STUDENT VALUES(444,Bindhya', '10B',403):
INSERT INTO STUDENT VALUES(555,Rishika', '10A,378):
T o display the records, select Queries option from database bar and select
Create Query in SQL View.

i Demodatabase.odb-OpenOffice Base
Eile Edit View Insert Iools Window Help

Database Tasks

Create Query in Design View..


Use Wizard to Create Query
Tables suL Create Queryin $QL View

Queries

Type the command and select Edit > Run Query (F5).
Demodatabase.odb: Query1 -OpenOffice Base: Query Design
Eile gdit View Insert Tools Window Help

ROLLNO
D 111
NAME CLASS TOTAL
Shreya10A
2 222 Remya 108 392
333 Amir 1OA 473
444
Bindhya108 403
Rishika 10A 378

Record1 |of
SELECT FROM STUDENT;

Command to displayrecords,
SELECT * FROM STUDENT:

Update the marks ofthestudentwith RollNo 333 (select Tools sOL)


UPDATE STUDENT SET TOTAL=TOTAL + 10 WHERE ROLLNO=333;

ROLLNONAME CLASS TOTAL


Shreya 10A 456
Remya10B 392
333 Amir 10A 483
44 Bindhya 108 403
55 Rishika 10A 378
Sortthe recordsin descending order of name.
SELECT FROM STUDENT ORDER BY NAME DESC;

ROLLNO NAME CLASS TOTAL


Shreya 10A 456
D111
555 Rishika 10A 378
22 Remya 10B 392
Bindhya 108 403
Amir 10A 483

Display the detailsof thestudentwithRolINo444,


SELECT FROM STUDENT WHERE ROLLNO-444;

ROLLNO NAME CLASS TOTAL


444 Bindhya108 403

Delete the details of studentwith RollNo 222. (Tools SOL)


DELETE FROM STUDENT WHERE ROLLNO-222;

ROLLNONAME CLASS TOTAL


J111 Shreya 10A 456
333 Amir 10A 483
44 Bindhya 10B 403
555 Rishika 10A 378

CREATE FORM USING WIZARD


Select Forms from database bar and select Use Wizard to Create Form.

Database Tasks

EB
Create Formin Design View
e Wizard to Create Form..
Tables

queries

Forms

Forms

Eeports
Select the table and move fields to form and click Next.

Select the fields of your form

Tables or quenes

. Set up asubform E STODENT


.Add subtom fieas
vailable fields Felds in the fom
. Get joined tielas
ROLLNO
S.Arnange controls NAME

6.Set data entry CLASS


TOTAL
7.Apply styles
L.Set name

Sinary fields are alwaya lsted and selectable frommthe


the left
left lot.
lat
possible they are interd

Belp et Enish ancel

Tick the check box Add Subform and click Next.


Form Wizard

Stes Decide if you want to set up a subform

1.Field selection ddsubtem


Sutfom based on eicting9 relation
. Add subfom fields
r e o n do you wantte
4.Get joirn fields
h
S. Arange ontrol

.Set data enty

7.Apply styles Subform based on manual selection of fields

Set name
0 Asubform is a form that is inserted in another form.
Use subforms to show data from tables or quenes wth a one-to-many
elationshipP

Help Back
et h Sancel
Add the fields and click Next.
orfm Wizerd

Select the joins between your forms

1.Field selection
2.Set up a subfom
irst joinedsubform field Fst joined main ferm field
undefined undefined
3.Add subform fields

Gdjained fields nd joned sublom feld Cendjoned main fom field


5.Arrange controls
6Set data enty
ndened Eunened
TApply style
hird joined tubfom field hurd joined main fom iea
&. Set name

ourth joinedsubfom fieid Fgurth joined mein forms tield

-undefined undefined-

elp eck LBet Enih ncel


I n the arrange control wizard select the arrangement of main form
and sub form. Click Next
Fom Wizard

Aange thee contros o your torm

1.Feld selection Label glacee


parorm
Ag
s.Add suttorm fhelds

4 Get joined fields t a n g e m e n t of the main form

Angsc
6 Set data entry

7.Apphy sty
&Set name ohumnaLRbers Cn top

rangerment ef the subformm

selp
Beck iet nah Cancel

Click Next for Data Entry Wizard.


I n the Apply Styles Wizard select the colour and click Next.
Fom Wigard

Steps Aply the style of your form

1.Field selection Agpyyles eld boroe

O No berder
2.Set up asubform
LAdd ubfom fhel 2 0 loek

4Get joined filds Light Gray


Dark
OFi
3Aange centroks
6.Set data entry

2Apphyte Water
&Set name Hed

jelp Beck L et Enish Cancel

Type name for the form and click Finish.


OLLNO
CLASS
111 104A

AME
nrey

ROLLNO AE CUASS OTAE


Shreya 104
J33 Amir 0

55 Rishika 104

ecord
CREATE REPORTUSING WIZARD
Select Reports from Database bar and select Use Wizard to Create Report.
Databas

Use Wiazard to Create Repot..


abies

ueres

Forgms
Reports

Select Fields and click Next


Report Wizard

Which fiekds do you want to have in your report?

LReldelecio Tables gr quen


2.Labeling fields Table: STUDENT
s. Grouping
vailable fields Eields in repo
4. Sert options
ROLLNO
s.Choose iyout NAME
6.Create report CLASS
OAL

Binary fields cannot be displayed in the report.

Help eck
et Enih
Cance
Select Labeling Fields and Click Next
Report Wizard

Steps How do you want to label the fields?

1. Freld selection Field abe

2.Labeling fields ROLLNO


L Grouping ROLDNO
Sort options NAME NAME
Choose layout
CLASS
Create report
CLASS
TOTAL TOTAL

Help Beck L Net Einish Cancel


Select Grouping. Click Next
Select Sort Options. Click Next
Choose the desired layout and Click Next.
Report Wizard

teps How do you want your report to look?

. Field selection Layout of data


Layout of headegs and footers
2. Labeling fields Outline- Borders Bubbles
.Grouping Outine-Compact Cinema
Outline-Elegant Controlling
A. Sort options Outline-Highlighted Defauit
Outline-Modern Drafting
choose layout utline- Red &Elue Finances
5. Create repot Outine, indented- Borders
Flipchart
Outline, indented Compact Formal with Company Logo
Outline, indented- Elegant
Outline, indented - Highlighted
Generic
Modern
Worldmap
Outline, indented -

Outline, indented- Red & Blue

Orientation Note: The dummy text will be replaced


by data from the database when the
Landscage
report is created.
OPortrait

Reck L Net Einish Cance

Give a name for the report and click Finish.

Author: SUDHA BENSON


Date: 12/29/20

ROLLNO NAME CLASS TOTAL


|111 Shreya | 10A 456
333 Amir 10A 483
444 Bindhya 10B 403
555 |Rishika 10A 378

****************

You might also like