0% found this document useful (0 votes)
19 views19 pages

IT Portfolio Final

Uploaded by

sarthaktiwari467
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)
19 views19 pages

IT Portfolio Final

Uploaded by

sarthaktiwari467
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/ 19

Unit 3

Database Management System

Learning Outcome – Create and edit tables using wizard


Assignment 1

Objective: Steps to create a table using table wizard


Task: Create a table using wizard and insert data.

Solution:
1. Click on Start → All Programs → LibreOffice 24.2 → LibreOffice Base. 24.2 LibreOffice
Base window will open with Database Wizard.
2. Click on Create a new database option.
3. Click on Next button.
4. Select the database Register option either Yes, or No.
5. Check on Open database for editing.
6. Click on Finish button.
7. It will prompt to save the database.
8. Type the desired name and save it. I have given db1.
9. Now click on Tables button from Left pane and choose the option - Use Wizard to Create
Table… from the tasks window.
10. The Table Wizard will open. Follow wizard steps to create a table.
11. In first step of wizard select the Category either Business or Personal,
12. Now choose a table from list of table. As I have selected Employees table.
13.Click on Next and select field types and all if you want to change it. Click on Next. I have
selected EmployeeID, Firstname, Lastname, Salary, Datehired.
14. Set a primary key for your table in this step. Click on Use an existing field as a Primary Key.
I have selected EmplyeeID as Primary key. Click on Next.
15. If you wish to change the table name then type new name for the table and click on Insert.
Data immediately, and click on Finish.
1
16. Enter data now.

Learning Outcome – Retrieve data using query


2
Assignment 2

Objective: Query creation using wizard


Task: Create table Marksheet (Using SQL Command) and perform the bellow given
queries using wizard and design view.

Field Name Data Type Size


Stud_No Integer 2
Name Text 15
RollNo Integer 3
Sub101 Decimal 3,2
Sub102 Decimal 3,2
Sub103 Decimal 3,2
1. In the Database file Add these Fields: (Total: Datatype- Number 3 digits, Percentage: Datatype
- Number 3 digits with 2 decimal places, Grade: Datatype- Char with 2 letters)
2. Insert more 3 records in MARKSHEET using SQL mode.
3. Display name, rollno, marks of 3 subjects, total and percentage using design view.
4. Display name, rollno, grades from the marksheet table using query wizard.
5. Display the maximum marks for Sub101 and minimum marks for Sub102 using design view.
6. Display the rollno, name and percentage whose percentage are more than 70 using design view.
7. Display all the record in ascending order of names using design view.
Solution:
create table “marksheet”
(“Stud_no” tinyint primary key,
“Name” varchar(15),
“RollNo” tinyint,
“Sub101” decimal(5,2),
“Sub102” decimal(5,2),
“Sub103” decimal(5,2)) ;
Output:

3
Queries

 Add Columns

1. Click on Tools → SQL option.

2. Add column Total → alter table "marksheet" add column "Total" tinyint

3. Add column Percentage → alter table "marksheet" add column "Percentage" decimal(5,2)

4. Add column grade → alter table "marksheet" add column "Grade" char(2)

5. Click on Execute button.

6. Click on Close button.

Output:
4
Command Screen

Table Preview

 Insert records
5
1. Click on Tools > SQL option.
2. insert into "marksheet" values (101, 'Sagar', 105, 27, 25, 28, 80 , 88 , 'B1')
3. Click on Execute button.
4. Close the window.
5. Click on View > Refresh Tables option to update data into the table.
Output:
SQL Command:

Table Preview:
6
 Steps to perform a query using design view
1. Click Queries → Create Query in Design View….
2. The query design window will open.
3. Select the marksheet table and click on Add button.
4. Now select fields given in the question like name, rollno, marks,Sub101, Sub102, Sub103,
Total and Percentage.
5. Save the query.
Output:

Query Result:
7
 Query Wizard Steps
1. Click on Queries → Use Wizard to Create Query…

2. Query Wizard opens.

3. Select the table marksheet and select the fields given the question.
8
4. Click on finish.

9
 Design View
➔ Display maximum marks and minimum marks for the fields given in the question, using
design view.
1. Click Queries → Create Query in Design View….
2. The query design window will open.
3. Select the marksheet table and click on Add button.
4. Now select the field Sub101 and Sub102.
5. Choose the function maximum under Sub101 and Minimum under Sub102.
6. Save the query and check the result.
Query Design:

Output:

10
Assignment 3 (Query using criterion and sorting)
→ Display the rollno, name and percentage whose percentage are more than 70 using design
view
1. Click Queries → Create Query in Design View….
2. The query design window will open.
3. Select the marksheet table and click on Add button.
4. Select columns given in the question i.e. Rollno, Name and Percentage.
5. Type >70 in the front of criterion under the percentage field.
6. Save the query and check the result.
Query Design:

Output:

11
→ Display all the record in ascending order of names using design view.
1. Click Queries → Create Query in Design View….
2. The query design window will open.
3. Select the marksheet table and click on Add button.
4. Select markesheet.* and name in the column list.
5. Select sort → ascending under name field.
6. Now click on Visible checkbox to hide the name column in result.
7. Save the query and check the result.
Query Design View

Output:

12
Learning Outcome – Create Forms and Reports using wizard
Assignment 4
Objective: Creating form using wizard
Task: Create table a form using wizard by selecting all the fields for the table - Marksheet

Solution
Steps to create a form using wizard
1. Click on Forms → Use Wizard to Create Form…

2. A Form Wizard appears.

13
3. Select the table from Tables or Queries then add all the fields.

4. Click on Next button. Ignore step 3 and step 4 from wizard.


5. Select the first option i.e. Columnar – Labels Left then click on the next button.

14
6. Now set data entry step will be there. Ignore this step and click on Next. Choose the styles for
the form interface and click on next.

7. Type new name for the form and click on work with the form. Click on Finish

15
Form Output:

16
Assignment 5
Objective: Creating report using wizard
Task: Create table a report using wizard by selecting all the fields for the table - Marksheet
Solution
1. Click on Reports → Use Wizard to Create report. The report wizard will open in the new
window.

2. Select the table and add fields.

17
3. Now change the label text that you want in the report. I have changed the label Stud_no
into Adm. No. Click on Next.

4. I have skipped groping and sorting options by click on Next button.


5. Now choose the layout. I have selected Columnar, Single Column as Layout of Data,
Landscape Orientation and Click on Next.

18
6. Now type the title of the report and select dynamic report → Create report now option.

7. Now click on finish.


Output:

19

You might also like