Unit-3 B New - PDF
Unit-3 B New - PDF
Chapter
Unit :3 :1 Database Management System (PART-B)
Session 1
Icebreaker
Consider the following suggestions:
Ensuring Student Safety:
• chools can act quickly in medical emergencies if they have access to up-to-date medical records, including allergies,
S
chronic conditions, or required medications.
Facilitating Quick Communication:
• mergency contact information helps schools immediately reach guardians or parents in case of urgent situations,
E
ensuring timely intervention.
Providing Personalised Care:
• nowing medical histories enables staff to provide better care tailored to individual student needs, ensuring a safer
K
environment for all students.
Compliance with Regulations:
• chools are often required to maintain such records to meet health and safety standards mandated by education boards
S
or government regulations.
Organised Data Management:
• sing a structured database for storing this information makes retrieval efficient, especially during audits, inspections, or
U
emergencies.
Planning Activities:
• chools can plan field trips, physical activities, or sports events considering the medical conditions of students, minimising
S
risks.
Self Assessment
A. Multiple Choice Questions
Ans. : 1. (d) 2. (a) 3. (d) 4. (b) 5. (b)
B. Answer the following
Ans-1 : DBMS stands for Database Management System.
Ans-2 : Advantages of a database
1. E
asy searching and updating: When a large amount of information is stored together, it is difficult to searchfor
information. For example, if in a students’ list, you would like to see the students who have scored 75% in
allsubjects, you would require a database.A database makes it very easy to perform calculations and make
changes to hundreds of records in one go. Forexample, if an accounts manager wants to increase the salaries of
all clerks by 10%, he can achieve this by writinga simple query in the database without actually going to each
record and making the changes.
2. S
torage: A database not only stores information but also lets you add, delete, update, and organise information
easily.
3. R
eduction of data redundancy: Data redundancy means duplication of data or information. A databasenormally
stores all the data in a centralised manner, which makes sure that the data is stored only once.
4. C
ontrolled inconsistency: Due to the centralised nature of storage, data is updated or deleted in the sameplace,
avoiding any kind of data inconsistencies. Thus, any number of applications accessing the data will get thesame
or uniform data.
5. D
ata sharing: Every point revolves around centralised data. This feature allows resource or data sharing. Onlya
single occurrence of the data can be shared by a set of applications.
Computers-10 1
Ans-3 : RDBMS stands for Relational Database Management System. It organises data into related tables and allows
operations using SQL.
Ans-4 :
• Tables: Tables are the building blocks of a database. They store data in rows and columns.
• Fields: Fields are the columns in a table that represent the attributes of data.
• Records: Records are the rows in a table containing different data values about the same subject.
Ans-5 :
• Tuples: Rows in a table are called tuples, which represent records.
• Attributes: Columns in a table are called attributes, which represent the fields.
C. Practical Work
Table Design for School’s Library Management System
Fields (Columns):
1. Book ID (Primary Key): Unique identifier for each book.
2. Book Title: Name of the book.
3. Author: Name of the author.
4. Category: Genre or category of the book (e.g., Fiction, Science).
5. Publisher: Name of the publishing house.
6. Year of Publication: Year the book was published.
7. Availability Status: Whether the book is available or issued.
Sample Records (Rows):
Book ID Book Title Author Category Publisher Year of Availability
Publication Status
101 To Kill a Harper Lee Fiction J.B. Lippincott 1960 Available
Mockingbird
102 A Brief History Stephen Science Bantam Books 1988 Issued
of Time Hawking
103 The Great F. Scott Fiction Scribner 1925 Available
Gatsby
104 Sapiens Yuval Noah History Harper 2011 Issued
Harari
105 Cosmos Carl Sagan Science Random House 1980 Available
D. Group Discussion
Types of Databases
Relational Database (RDBMS):
o Stores data in structured tables with rows and columns.
o Examples: Student information, fee records, and library systems.
o Use in Schools: Manage student details, attendance records, and grading systems efficiently.
Flat File Database:
o Simple database stored in a single table or file (e.g., spreadsheets).
o Use in Schools: Maintaining small datasets like inventory of school supplies or event registrations.
Hierarchical Database:
o Data is organized in a tree-like structure, with parent-child relationships.
o Use in Schools: Managing course structures, staff hierarchies, or subject modules.
NoSQL Database:
o Designed for unstructured or semi-structured data.
2 Computers-10
o Use in Schools: Managing multimedia files, like student project videos or photos.
Cloud-Based Database:
o Databases hosted on the cloud, allowing access from anywhere.
o Use in Schools: Online learning management systems, student portals, and remote administration.
Uses of Databases in Schools
Student Records Management:
o Storing student details, grades, attendance, and achievements in relational databases for easy retrieval.
Library Management:
o Using relational or flat file databases to track book availability, issuance, and returns.
Fee and Finance Tracking:
o Managing payment details and generating reports using databases for transparent financial management.
Resource Allocation:
o Maintaining inventory records for school supplies, laboratories, and sports equipment.
Communication:
o Keeping staff and parent contact details for quick communication using relational or cloud-based databases.
Online Learning Platforms:
o everaging NoSQL or cloud databases to store and manage online learning materials, student submissions, and
L
assessments.
Session 2
Icebreaker
1. Improves Clarity:
o sing a table to organise data, like names, phone numbers, or tasks, makes information clear and structured, avoiding
U
confusion.
2. Quick Access:
o ables allow for quick retrieval of specific information, such as looking up contact details or cross-checking attendance
T
records.
3. Efficient Management:
o list or table helps keep track of tasks, deadlines, or inventory, ensuring nothing is missed and everything is accounted
A
for.
4. Data Analysis:
o rganizing information in tables allows for easy comparison or summary of data, such as analysing student performance
O
or calculating totals.
5. Time-Saving:
o Structured data eliminates the need to search through scattered information, saving time and reducing effort.
Self Assessment
A. Multiple Choice Questions
Ans. : 1. (c) 2. (c) 3. (c) 4. (a)
B. Answer the following
Ans-1 : Tables can be created in Base using two ways:
o Using Design View
o Using Table Wizard.
Ans-2 : The data types used in DBMS/RDBMS include:
o Text
o Numeric
Computers-10 3
o Date/Time
o Binary Large Object (BLOB).
Ans-3 : The different alphanumeric data types are:
o Text
o Memo
o Varchar
o Char.
C. Practical Work
Steps to Create the Table:
1. Open LibreOffice Base.
2. Create a new database and name it “Student Database”.
3. Go to Tables → Create Table in Design View.
4. Define the following fields with the appropriate data types:
Book ID Description Data Type
Student’s Name Stores the full name of the student Text (Varchar)
Roll Number Unique identifier for each student Integer
Address Stores the address of the student Text (Memo)
Date of Birth Date of birth of the student Date
Phone Number Contact number of the student Numeric
Class Current class or grade of the student Text (Varchar)
Gender Gender of the student (M/F) Text (Char)
Example Data:
Student’s Roll Address Date of Birth Phone Number Class Gender
Name Number
Aman Kumar 101 123 Main Street 2008-05-12 9876543210 x M
Riya Sharma 102 456 Green Lane 2009-07-25 8765432109 x F
Ankit Singh 103 789 Blue Avenue 2008-03-18 9123456789 x M
Data Types Used:
1. Student’s Name: Text (Varchar)
2. Roll Number: Integer
3. Address: Text (Memo)
4. Date of Birth: Date
5. Phone Number: Numeric
6. Class: Text (Varchar)
7. Gender: Text (Char)
D. Group Discussion
Key points for discussion
Importance of Data Types
• Accuracy in Data Storage: Data types ensure the data is stored in the correct format, reducing errors.
• Efficient Database Design: Assigning the right data types optimises storage space and improves performance.
• Validation: Data types help validate input to ensure only valid data is entered (e.g., dates, numbers).
Common Data Types and Their Uses
4 Computers-10
1. Text Data Types (e.g., VARCHAR, CHAR, TEXT):
• Used for storing alphanumeric data like names, addresses, or descriptions.
• Example: Student’s Name, Email Address.
2. Numeric Data Types (e.g., INT, FLOAT, DECIMAL):
• Used for storing numbers, often with arithmetic operations.
• Example: Roll Number, Marks, Price.
3. Date/Time Data Types (e.g., DATE, TIME, TIMESTAMP):
• Used for storing date and time information.
• Example: Date of Birth, Attendance Records.
4. Boolean Data Types:
• Used for storing true/false or yes/no values.
• Example: Attendance Status, Pass/Fail.
Benefits of Using the Right Data Types
• Improved Query Performance: Queries execute faster when data is stored in appropriate data types.
• Enhanced Data Integrity: Prevents incorrect or incompatible data entry.
• Optimised Storage: Choosing compact data types reduces storage requirements.
Challenges with Data Types
• Data Type Mismatch: Incorrectly assigned data types can lead to data errors or loss.
• Storage Overheads: Using larger data types unnecessarily can waste resources.
• Conversion Issues: Changing data types in a live database can result in data compatibility problems.
5. Real-World Applications
• School Management Systems: Use text for names, numeric for roll numbers, and date for birth dates.
• E-Commerce Platforms: Use numeric for prices, text for product descriptions, and boolean for availability.
• Banking Systems: Use a float for account balances, the date for transaction timestamps, and a boolean for account
status.
Session 3
Icebreaker
Consider the given suggestions:
Helps Organise Data:
• Using a table, like a list of friends’ phone numbers, makes it easy to organise information in a structured format.
Quick Access:
• With a table, it becomes quicker to locate specific details, such as searching for a friend’s contact during emergencies.
Easy Updates:
• Tables allow easy modification, such as adding new contacts or editing outdated numbers without confusion.
Better Management:
• Categorising contacts (e.g., friends, family, classmates) in different columns ensures better information management.
Self Assessment
A. Multiple Choice Questions
Ans. : 1. (c) 2. (a) 3. (c)
B. Answer the following
Ans-1 : To sort the table in LibreOffice Base:
• Open the desired table in the Datasheet view.
• Right-click on the column header that you want to sort by.
• Select Sort Ascending or Sort Descending from the context menu.
Computers-10 5
Ans-2 : The different types of relationships in a database are:
• One-to-One Relationship: Each record in Table A is linked to one and only one record in Table B.
• One-to-Many Relationship: A single record in Table A is linked to multiple records in Table B.
• Many-to-Many Relationship: Multiple records in Table A are linked to multiple records in Table B.
Ans-3 : The advantages of relationships in a database are:
• They reduce data redundancy.
• They ensure data integrity.
• They allow for easy data retrieval by linking related data across tables.
C. Practical Work
Steps to Create the Database:
1. Open LibreOffice Base:
o Launch LibreOffice Base and create a new database.
2. Create the First Table (e.g., Student_Details):
o Go to Tables → Create Table in Design View.
o Add the following fields:
Field Name Field Type
Student_ID (Primary Key) Integer
Name Text (Varchar)
Class Text (Varchar)
Age Integer
o Save the table as Student_Details and enter 10 records.
3. Create the Second Table (e.g., Student_Contact):
o Go to Tables → Create Table in Design View.
o Add the following fields:
Field Name Field Type
Student_ID (Primary Key) Integer
Phone_Number Text (Varchar)
Email_Address Text (Varchar)
o ave the table as Student_Contact and enter the same 10 Student_ID values as in Student_Details, along with
S
corresponding contact details.
Steps to Create a One-to-One Relationship:
1. Open the Relationships Window:
o Go to Tools → Relationships.
2. Add the Tables:
o Add both tables (Student_Details and Student_Contact) to the relationship editor.
3. Establish the Relationship:
o Drag the Student_ID field from Student_Details to the Student_ID field in Student_Contact.
o A dialog box will appear. Select One-to-One Relationship.
4. Save the Relationship:
o Click OK and save the relationship.
Sample Data for Tables:
Student_Details Table
6 Computers-10
Student_ID Name Class Age
101 Aman Kumar X 15
102 Riya Sharma IX 14
103 Ankit Singh VIII 13
104 Meera Patel X 15
105 Arjun Gupta VII 12
106 Simran Kaur IX 14
107 Rohit Jain VIII 13
108 Nisha Roy X 15
109 Dev Malik VII 12
110 Tanya Sen IX 14
Student_Contact Table
Student_ID Phone_Number Classa
101 9876543XXX [email protected]
102 8765432XXX [email protected]
103 9123456789 [email protected]
104 9988776655 [email protected]
105 8877665544 [email protected]
106 7766554433 [email protected]
107 6655443322 [email protected]
108 5544332211 [email protected]
109 4433221100 [email protected]
110 3322110099 [email protected]
D. Group Discussion
Key points for discussion
Methods of Editing Data in Tables
Direct Editing:
• Modify data directly in the table by selecting the cell and entering the new value.
• Useful for quick corrections or updates.
Using Design View:
• Edit the structure of the table, such as changing field names and data types or adding constraints like default values.
Search and Replace:
• Use the Find and Replace tool to quickly update specific data across the table.
Update Queries:
• Write queries to update multiple records at once, automating bulk changes efficiently.
Deleting or Adding Records:
• Add new rows or delete unnecessary rows directly in the datasheet view.
Methods of Sorting Data in Tables
Column Sorting:
• Right-click on a column header and select Sort Ascending or Sort Descending.
• Ideal for organising data by numeric or alphabetical order.
Multi-Field Sorting:
• Use multiple fields to sort data hierarchically, such as sorting by “Class” first and then by “Name”.
Computers-10 7
Sort Using Queries:
• Create queries to apply custom sorting rules across multiple fields.
Custom Sorting:
• Define custom sorting orders for specific use cases, such as sorting by priority levels (e.g., High, Medium, Low).
Benefits of Editing Data
Data Accuracy:
• Keeps records up to date and ensures information is accurate.
Improved Usability:
• Helps maintain clean and well-organised data for easy retrieval.
Error Reduction:
Editing allows the correction of typos or incorrect entries, improving data reliability.
Benefits of Sorting Data
Better Organisation:
• Sorting arranges data logically, making it easier to analyse and work with.
Faster Data Retrieval:
• Sorted data helps locate specific information quickly.
Enhanced Reporting:
• Organising data by category or value improves the quality of reports.
Efficiency in Analysis:
• Sorting simplifies comparing and grouping related data for decision-making.
Session 4
Icebreaker
Consider the given suggestions:
Efficient Search:
• hen working with a large table, using the Find or Filter options in spreadsheet tools helped to locate specific rows
W
quickly.
Real-Life Scenario:
• or example, while managing a list of students and their marks, sorting the data by names or roll numbers made it easier
F
to find the required student details.
Use of Queries:
• In databases, running a query with specific conditions (like find all students with marks > 80) simplified data retrieval.
Time-Saving:
• sing search or sort functionalities reduced manual effort and saved significant time, especially when dealing with
U
hundreds of rows.
Organised Workflow:
• tructured search tools allowed focussing on specific information while keeping the rest of the data intact, improving
S
workflow efficiency.
Self Assessment
A. Multiple Choice Questions
Ans. : 1. (a) 2. (b) 3. (d) 4. (a)
B. Answer the following
Ans-1 : To create a query in design view, follow these steps:
Step-1: Click on Queries icon in the Database section.
8 Computers-10
Ans-1 : To create a query in the Design view:
• Click on the Queries option in the Database pane.
• Click on Create Query in Design View.
• Add the required tables or queries to the query design window.
• Drag the fields to the Field row in the grid and specify the criteria in the Criteria row.
• Save and run the query to see the results.
Ans-2 : The SELECT statement is used to retrieve specific data from one or more tables in a database.
C. Practical Work
Steps to Create the Database
1. Open LibreOffice Base:
o Create a new database and name it Unemployment_India.
2. Create a Table:
o Go to Tables → Create Table in Design View.
o Add the following fields with their data types:
Field Name Field Type Description
State_ID Integer (Primary Key) Unique identifier for each
state
State_Name Text (Varchar) Name of the state
Unemployment_Rate Numeric (Decimal) Unemployment rate (%)
o Save the table as Unemployment_Data and enter the data for 2022-2023.
3. Sample Data for Table:
State_ID State_Name Unemployment_Rate
1 Andhra Pradesh 4.8%
2 Maharashtra 6.2%
3 Gujarat 3.9%
4 Uttar Pradesh 7.5%
5 Tamil Nadu 4.3%
Create a Query to Display States with Less Than 5% Unemployment Rate
1. Go to Queries:
o Click on the Queries option in the database pane.
2. Create Query in Design View:
o Select Create Query in Design View.
o Add the Unemployment_Data table to the query design window.
3. Add Fields to the Query:
o Drag the following fields to the query grid:
• State_Name.
• Unemployment_Rate.
4. Set Criteria:
o In the Criteria row under the Unemployment_Rate column, enter:
<5
5. Run the Query:
o Save the query as States_with_Less_Than_5_Percent.
o Click the Run Query (F5) button to see the results.
Computers-10 9
Query Output
State_Name Unemployment_Rate
Andhra Pradesh 4.8%
Gujarat 3.9%
Tamil Nadu 4.3%
D. Group Discussion
Benefits of Using Queries
1. Efficient Data Retrieval:
o Queries quickly extract relevant information from large datasets, saving time and effort.
2. Custom Filtering:
o pecific criteria can be applied to filter data, such as states with less than 5% unemployment or students scoring
S
above 90%.
3. Data Consolidation:
o Queries allow combining data from multiple tables, providing a unified view of related information.
4. Dynamic Updates:
o Queries update results dynamically as the underlying data changes, ensuring accuracy.
Real-World Applications
1. Student Records:
o Retrieving details of students with attendance below a certain threshold.
2. Business Data:
o Identifying products with sales exceeding a specific target.
3. Government Reports:
o Extracting states or regions with specific economic or health indicators.
Advantages in Large Databases
1. Scalability:
o Queries work effectively even with millions of records, ensuring scalability for growing datasets.
2. Speed:
o omplex operations like sorting, filtering, and summarising are executed faster using queries than manual
C
processing.
Session 5
Icebreaker
Efficient Data Collection:
• illing out forms, whether online or on paper, helps in collecting relevant and organised data, such as names, addresses
F
and contact details.
Common Information Provided:
• Typical forms ask for basic details such as:
• Full Name
• Address
• Phone Number
• Email ID
• Date of Birth
Purpose of Forms:
• orms are used for a variety of purposes, including job applications, school admissions, event registrations and feedback
F
collection.
10 Computers-10
Self Assessment
A. Multiple Choice Questions
Ans. : 1. (d) 2. (a) 3. (c)
B. Answer the following
Ans-1 : To create a report using the wizard:
• Click on Reports under the Database section.
• Under the Tasks section, click Use Wizard to Create Report.
• Select the required table or query from the drop-down list and shift the fields to the Fields in the Report box.
• Define the field labels if required and click Next.
• Set grouping, sorting, and layout preferences, and provide a title for the report.
• Click on Finish to generate the report.
Ans-2 : To create a form:
• Click on the Forms icon under the Database section.
• Select Use Wizard to Create Form under the Tasks section.
• Choose the table or query and shift the desired fields to the Fields in the Form box.
• Set subform, arrange controls and style preferences, and provide a name for the form.
• Click Finish to create the form.
Ans-3 : To add a background to your form:
• Right-click on the form name in the LibreOffice Base window and select Edit.
• In the Database Form window, right-click on the blank area of the form and select Page Style.
• In the Page Style dialog box, go to the Area tab and choose the Image option.
• Browse and select the desired background image, then click OK to apply it.
C. Practical Work
Step 1: Create a Student Database
1. Open LibreOffice Base:
• Create a new database and name it Student_Database.
2. Create a Table:
• Go to Tables → Create Table in Design View.
• Define the following fields:
Field Name Field Type Description
Student_ID Integer (Primary Key) Unique identifier for each student
Name Text (Varchar) Full name of the student
Age Integer Age of the student
Class Text (Varchar) Current class or grade
Email Text (Varchar) Email address
Contact_Number Text (Varchar) Phone Number
1. Save and Enter Data:
• Save the table as Student_Info.
• Open the table and enter sample data for at least 10 students.
Step 2: Create a Form for Data Entry
1. Use the Form Wizard:
• Go to Forms → Use Wizard to Create Form.
• Select the Student_Info table as the data source.
Computers-10 11
• Move all fields to the Fields in Form box.
2. Design the Form:
• Choose an arrangement for the fields (e.g., Columnar or Tabular).
• Add a title for the form (e.g., Student Entry Form).
3. Save and Enter Data:
• Save the form as Student_Form.
• Open the form and use it to add data for the required fields.
• Save the entered data.
Step 3: Create a Report Using Report Wizard
1. Use the Report Wizard:
• Go to Reports → Use Wizard to Create Report.
• Select the Student_Info table as the data source.
2. Customise the Report:
• Move all fields to the Fields in Report box.
• Set grouping options if required (e.g., Group by Class).
• Add sorting preferences (e.g., Sort by Name or Age).
3. Design Layout:
• Choose a layout for the report (e.g., Columnar, Tabular).
• Add a title for the report (e.g., Student Report).
4. Save and Generate:
• Save the report as Student_Report.
• Open the report to view the summary of the student database.
D. Group Discussion
Key points for discussion
Importance of Using Forms
1. Simplified Data Entry:
• Forms provide a user-friendly interface for entering data into databases, reducing complexity for non-technical users.
2. Structured Data Input:
• Predefined fields ensure that only relevant and required information is collected.
3. Error Reduction:
• Forms can include validation rules, dropdowns, and input masks to minimise data entry errors.
4. Improved Accessibility:
• Forms make databases more accessible to users with little or no knowledge of database design or queries.
Benefits of Using Forms
1. Efficiency:
• Forms save time by allowing users to enter data directly without navigating raw tables.
2. Consistency:
• Standardised input formats ensure uniform data across all entries (e.g., date format, phone number format).
3. Enhanced User Experience:
• Attractive designs with labels, drop-down menus, and navigation buttons improve ease of use.
4. Data Validation:
• Built-in validation prevents incorrect data from being entered (e.g., ensuring numeric values in age fields).
5. Customisable Layouts:
• Forms can be tailored to specific needs, showing only the fields required for a particular user or process.
6. Integration with Reports:
• Forms can link seamlessly to reports, enabling efficient data summarisation and presentation.
12 Computers-10
Answer key Revised Excel In Information Technology – 10
Chapter
Unit :3 :1 Database Management System (PART-B)
Section-C
C. Short answer questions
Ans-1. : To edit a relationship, double-click on the relationship line or right-click and select the Edit option. The Relations
dialog box will appear, allowing you to make the necessary changes and click OK.
Ans-2. :
• Easy searching and updating: Databases make it very easy to search for information or update hundreds of
records in one go.
• Data sharing: A single occurrence of the data can be shared by a set of applications.
Ans-3. : To insert a new row in a table, select the desired cell, click on the appropriate toolbar or menu optionand enter the
new row details.
Ans-4. :
• To create a database in LibreOffice Base:
o Open LibreOffice Base.
o Click on Create a new database in the Database Wizard.
o Follow the steps and save the database with a specific name.
Ans-5. :
• NUMERIC: Stores numeric values with no limit.
• VARCHAR: Stores alphanumeric characters up to the specified length.
• DATE: Stores date information (month, day, year).
Computers-10 13
• BINARY: Stores binary data like images and sound files.
Section-D
D. Long Answer Questions
Ans-1. : o Open the required form by double-clicking on it.
o Click on the Find Record icon on the form navigation toolbar.
o In the Record Search dialog box, enter the text to be searched under the Search for section.
o Select the All Fields option under the Where to Search section or specify a field to search.
o Click on the Search button, and the matching record will be displayed in the form.
Ans-2. :
o Right-click on the desired form from the Forms section and select the Edit option.
o To resize a form component, select the desired control (label or field), then drag the resizing handles to adjust
size.
o To move components, select the desired control and drag it to the desired location when the pointer changes to
a four-headed arrow.
o To change the label, double-click on it, then modify the label in the Properties window.
o Save changes after modifying the layout.
Ans-3. : (i) Display data of all books whose quantity is more than 3:
SELECT * FROM Books WHERE Qty > 3;
(ii) Display the total amount of all books whose price is less than 500 (amount = Qty x Price):
SELECT SUM(Qty * Price) AS Total Amount FROM Books WHERE Price < 500;
Practical Work
1. Follow the steps given in the book.
2.
(i) Display username, full name, gender, and qualification
SQL Query:
SELECT USERNAME, FULLNAME, GENDER, QUALIFICATION
FROM Resume;
USERNAME FULLNAME GENDER QUALIFICATION
[email protected] Nidhi Gupta Female MBA
[email protected] Nisha Female B.Tech
(ii) Display the username of people having EXPYEARS > 3
SQL Query:
SELECT USERNAME
FROM Resume
WHERE EXPYEARS > 3;
Result Example:
USERNAME
[email protected]
(iii) Display username, full name, qualification, sal exp, join time, and email of people whose name starts
with ‘N’
SQL Query:
SELECT USERNAME, FULLNAME, QUALIFICATION, SALEXP, JOINTIME, EMAIL
FROM Resume
WHERE FULLNAME LIKE ‘N%’;
14 Computers-10
USERNAME FULLNAME QUALIFICATION SALEXP JOINTIME EMAIL
[email protected] Nidhi Gupta Female 80000 2020-06-15 nidhi_gupta@
cordova.co.in
[email protected] Nisha Nidhi Gupta 60000 2022-02-20 nisha@gmail.
com
3. Create the Database and Tables
1. Open LibreOffice Base:
o Create a new database named Cricketer_Database.
2. Create Table 1 (Cricketer Register):
o Define the following fields:
Field Name Data Type Description
Cricketer ID Text Unique identifier for cricketer
Name Text Full name of the cricketer
Age Number Age of the cricketer
Category Text Category (e.g., Batsman)
Strong Points Text Key skills
Week Points Text Weekly performance points
Average Number Batting/Bowling average
o Save the table as Cricketer_Register and add 10 records.
3. Create Table 2 (Cricketer Profile):
o Define the following fields:
Field Name Data Type Description
Match ID Text Unique identifier for the match
Cricketer ID Text Reference to Cricketer ID
Runs Scored Number Total runs scored
Wickets Taken Number Total wickets taken
Catches Number Total catches made
o Save the table as Cricketer_Profile and add 10 records.
Step 1: Create a Form for Each Table
1. Create Forms:
o Use the Form Wizard to create forms for both tables (Cricketer_Register and Cricketer_Profile).
o Add all fields to the form, select a suitable layout, and save the forms.
2. Enter Data:
o Use the forms to add 10 relevant records in each table.
Step 2: Write Queries for the Given Requirements
(i) Cricketers under the age of 25 with their names
SQL Query:
SELECT Name, Age
FROM Cricketer_Register
WHERE Age < 25;
Result Example:
Name Age
Virat Kohli 24
Computers-10 15
Shubman Gill 22
(ii) Cricketers with more than 2000 runs and more than 50 wickets
SQL Query:
SELECT Cricketer_ID, Runs_Scored, Wickets_Taken
FROM Cricketer_Profile
WHERE Runs_Scored > 2000 AND Wickets_Taken > 50;
Result Example:
Cricketer_ID Runs_Scored Wickets_Taken
CR_102 2500 60
(iii) Cricketers with more than 2000 runs OR more than 50 wickets
SQL Query:
SELECT Cricketer_ID, Runs_Scored, Wickets_Taken
FROM Cricketer_Profile
WHERE Runs_Scored > 2000 OR Wickets_Taken > 50;
Result Example:
Cricketer_ID Runs_Scored Wickets_Taken
CR_102 2100 40
CR_102 2500 60
4. Steps to Create the Report
1. Open LibreOffice Base:
o Launch the Cricketer_Database created earlier.
2. Access the Report Section:
o Click on Reports in the left pane.
3. Use the Report Wizard:
o Select Use Wizard to Create Report.
4. Choose the Table or Query:
o Select the table Cricketer_Profile or the query that includes both Cricketer_Name and Runs_Scored (if you’ve
linked the Cricketer ID with Cricketer Register).
5. Select Fields to Include in the Report:
o Move the following fields to the Fields in Report section:
• Name (from Cricketer_Register)
• Runs_Scored (from Cricketer_Profile)
6. Customize Report Layout:
o Choose a layout (e.g., Columnar or Tabular) that best displays the data.
o Choose a style for the report.
7. Add Sorting (Optional):
o Sort the report by Runs_Scored in descending order to display the highest runs first.
8. Name and Save the Report:
o Name the report “Cricketer Runs Report”.
o Click Finish to generate the report.
16 Computers-10
Expected Output
Name Runs Scored
Virat Kohli 2500
Shubman Gill 2300
MS Dhoni 2100
Rohit Sharma 2000
Computers-10 17