Yash Ism PDF
Yash Ism PDF
PRACTICAL NO.-1
Ques. What do you mean by Data, Information, Database, DBMS, and RDBMS?
DATA
Data can be defined as a systematic record of a particular quantity. It is the different values of that
quantity represented together in a set. It is a collection of facts and figures to be used for a specific
purpose such as a survey or analysis. When arranged in an organized form, can be called
information. The source of data (primary data, secondary data) is also an important factor.
Fig.1.1
INFORMATION
Information is processed, organized and structured data. It provides context for data and
enables decision making process. For example, a single customer’s sale at a restaurant is data
– this becomes information when the business is able to identify the most popular or least
popular dish.
More technically, information can be thought of as the resolution of uncertainty; it answers the
question of "What an entity is" and thus defines both its essence and the nature of its
characteristics. The concept of information has different meanings in different contexts.
Fig.1.2
DATABASE
In computing, a database is an organized collection of data stored and accessed electronically.
Small databases can be stored on a file system, while large databases are hosted on computer
clusters or cloud storage. The design of databases spans formal techniques and practical
considerations including data modeling, efficient data representation and storage, query
languages, security and privacy of sensitive data, and distributed computing issues including
supporting concurrent access and fault tolerance.
Fig.1.3
DBMS
Database management system (or DBMS) is essentially nothing more than a computerized
data-keeping system. Users of the system are given facilities to perform several kinds of
operations on such a system for either manipulation of the data in the database or the
management of the database structure itself.
Database management systems are set up on specific data handling concepts, as the practice of
administrating a database evolves. The earliest databases only handled individual single pieces
of specially formatted data. Today’s more evolved systems can handle different kinds of less
formatted data and tie them together in more elaborate ways.
Fig.1.4
RDBMS
The software used to store, manage, query, and retrieve data stored in a relational database
is called a relational database management system (RDBMS). The RDBMS provides an
interface between users and applications and the database, as well as administrative
functions for managing data storage, access, and performance.
It is a DBMS in which the database is organized and accessed according to the relationships
between data items. In a relational database, relationships between data items are expressed
by means of tables. Interdependencies among these tables are expressed by data values
rather than by pointers. This allows a high degree of data independence.
Fig.1.5
PRACTICAL NO.-2
Ques. Write s to Open Microsoft Access. Write s to create a database. What are the various
elements/objects of a database? What are the s to create table in database?
Fig.2.1
Fig.2.2
1. TABEL.- Tables contain fields or columns that store different kinds of data, such as
a name or an address, and records or rows that collect all the information about a
particular instance of the subject, such as all the information about a customer or
employee etc.
2. FORM.- Form is an object in a desktop database designed primarily for data input or
display or for control of application execution. You use forms to customize the
presentation of data that your application extracts from queries or tables.
Fig.2.3
Fig 2.4
Fig 2.5
Fig.2.6
Fig.2.7
Fig.2.8
1. After the above s, save the table by clicking on save as from the office view.
Fig.2.9
s 2. After saving the table with a new name, right click on the table name and click on the
design view.
Fig.2.10
Fig 2.11
PRACTICAL NO. – 3
Ques. What do you mean by field name, data types and Field Size. With its description
Answer.-
Field Name.
Field name is the name of column. It should represent the contents of the field such as !
"Name", "Address" and "Final Grade" etc. the name of the field cannot exceed 64 characters
in length. It many include spaces. The use of spaces in field name is not a good practice.
Fig.3.1
Data Type
Each filed must be assigned a particular data type. The data type specifies the type of data that
can be stored in the field. Common data types in MS Access are Number, Text, Currency and
Date etc.
Fig.3.2
Field Size
Field size is used to set the number of characters required in text or number held. The default
field size for the text type is 50 characters. The field size can be limited to ai certain number of
characters if value in field is small. It waves disk space and prevents entry errors. The filed size
is set in exact characters for Text type. The options for numbers are as follows.
Fig.3.3
PRACTICAL NO. – 4
Ques. Create a student database with a table STUDENT_DETAILS containing the field
name as
ID
FIRST NAME
LAST NAME
AGE
ADDRESS
Insert 5 records using the design view in MS-ACCESS.
Create another table using datasheet view as STUDENT_COURSE with the field name as
ID
COURSE CODE
COURSE NAME.
Enter records.
S.-
Fig.-4.1
Fig.-4.2
Fig.-4.3
4. Now go to the database view and enter the records in the table.
Fig.-4.4
Ques. Create another table using datasheet view as STUDENT_COURSE with the field name
as
ID
COURSE CODE
COURSE NAME.
Enter records.
S.-
1. In the same database; Click on create tab and then click on table tab and then a new
table will appear in the datasheet view.
Fig.-4.5
Fig.-4.6
Fig.-4.7
Fig.-4.8
PRACTICAL NO. – 5
Ques. Create an EMPOYEE database with the following fields as
Emp_code
Emp_ssn
Emp_name
DOB
Emp_design
Emp_dept
DOJ
E_SAL
Years of experience
For the above created database set the following fields properties.
1. Employee names should be in upper case with field size equal to10
2. Set the default value of Emp_design as Manager.
3. Date of joining should be set to the current date by default.
4. E_SAL should be in dollars.
S
1. Create a new database in MICROSOFT ACCESS named “emp1” ; then create a table and
save it as “emp”.
Fig 5.1
Fig 5.2
3. Select the Emp_name cell and in the General properties below, change the “field size” from
255 to 10. And in the “Format ” option , enter “>” symbol which will display the text in upper
case.
Fig 5.3
4. Click on Emp_dept cell and set the “Default value” option to “Manager”.
Fig 5.4
5. Click on “DOJ” cell and in the properties , set the “default date” to present date that is
“=DATE()”.
Fig 5.5
6. Click on the “E_sal” cell and in the properties, click on the arrow in the “Format” option and
select “Currency ”.
Fig 5.6
Fig 5.7
7. Enter 10 records in the “DATASHEET VIEW” and save the file.
Fig 5.8
PRACTICAL NO. – 6
Ques. Create an EMPOYEE database with the following fields as.
Emp_code
Emp_ssn
Emp_name
Emp-dob
For the above created database set the input mask for the field property for Emp_ssn and
Emp_dob using the input mask wizard.
S.
FOR SSN
Fig 6.1
4. In the "place character", select any character ("-" in this case); then press "next".
Fig 6.2
5. Now select the way you want to store the data i.e. with symbols or without symbols.
And press "next".
Fig 6.3
6. Click on finish
Fig 6.4
7. Now the input mask will display the format of emp sen.
Fig 6.5
FOR DOJ
Fig 6.6
2. Go to general, click on input Mask wizard.
3. Now in the dialogue box, click on "short date" and press "Next".
Fig 6.7
4. In the "placeholder character", select any character ("-" in this case); then press
"next".
Fig 6.8
5. Click finish.
Fig 6.9
Fig 6.10
PRACTICAL NO. – 7
Ques. Create a local template of ‘FACULTY’, insert 5 records and perform the following
queries on faculty template table.
S
1. Open MS Access and on the left corner of the home page , click on “local templates”. Now
in the center part of the screen, click on the “Faculty” template.
Fig 7.1
Fig 7.2
Fig 7.3
4. For department; there is a drop down menu which has numerous departments which can be
selected.
Fig 7.4
Fig 7.5
6. Insert a records using “new faculty” tab in faculty template. Fill the details and click on “save
and new”
Fig 7.6
Fig 7.7
8. Now right click on the “first name” field and select “sort A to Z” , to arrange the faculty
names in ascending order.
Fig 7.8
9. Now right click on the “Department” field and select “sort Z to A” , to arrange the faculty
names in descending order.
Fig 7.9
10. Now to generate a report for All faculty category; click on the drop down menu of “Reports”
and select “All faculty”.
Fig 7.10
11. The following view will be displayed showing report for “all faculty”.
Fig 7.11
12. Now to generate a report for faculty by department category; click on the drop down menu
of “Reports” and select “Faculty by department”.
Fig 7.12
13. The following view will be displayed showing report for “Faculty by department”.
Fig 7.13
PRACTICAL NO. – 8
Ques. Create a database named as STUDENT DATABASE. With a table
STUDENT_DETAILS with the given fields as
stu_id
Stu_roll
St_name
St_age
St_dob
St_course
St_address
St_contact
Add at least 10 records in the table. Answer the following.
A. What is a primary key? Make a field stu_roll as the primary key in the table. Also
write down the s for the same.
B. In the table STUDENT_DETAILS, make stu_roll no and stu_name as a composite
key also write the s for the same.
PRIMARY KEY
A primary key is the column or columns that contain values that uniquely identify each row in
a table. A database table must have a primary key for Optima to insert, update, restore, or delete
data from a database table. Optima uses primary keys that are defined to the database.
S.
Fig.8.1
Fig.8.2
Fig.8.3
Fig.8.4
PRACTICAL NO. – 9
Ques. Create a table as STUDENT_DETAILS with the following fields
S_id
S_name
S_course
S_marks
S_dob
Make S_id as the primary key and apply the following validations.
SOLUTION.-
Fig.9.1
Make S_id as the primary key and apply the following validations.
s
1. Select the field you want to add primary key.
Fig.9.2
Fig.9.3
Fig.9.4
Fig.9.5
Write ‘Like “A*M”’ inside validation rule and save the table.
Fig.9.6
Fig.9.7
Fig.9.8
Fig.9.9
Fig.9.10
Fig.9.11
Fig.9.12
Only marks between 0 and 50 will be accepted by table.
Fig.9.13
PRACTICAL NO.-10
Ques. Write s to put password on the database and convert it into the required format.
1. To set a password on an Access database, open Access and then click the “File” tab in
the Ribbon.
2. Click the “Open” command in the command panel at the left side of the backstage view.
3. Click the “Browse” button to the right to launch an “Open” dialog box.
4. Use the “Open” dialog box to navigate to the folder which contains the database you
want to open.
5. Click the database file to select it.
6. Click the small drop-down arrow next to the “Open” button in the lower-right corner of
the “Open” dialog box.
7. From this drop-down menu, select the “Open exclusive” command to open the database
for your exclusive use.
8. Once the database is opened exclusively, click the “File” tab in the Ribbon once again.
9. Click the “Info” command in the command panel at the left side of the backstage view.
10. To the right, click the “Encrypt with Password” button in the backstage view to open
the “Set Database Password” dialog box.
11. Enter your database password into the “Password.” text box.
12. Then retype it into the “Verify.” text box.
13. Then click the “OK” button.
14. Write down the password and store in a safe place for later retrieval, if necessary. You
cannot open the database without the password. If you lose the password, you’ll need
to start all over again! We cannot overemphasize the importance of securing your
password in a safe place.
PRACTICAL NO.-11
Ques. Explain in brief about the query object in MS-ACCESS 2007. Write s to execute
queries using the query wizard. Create an ACCOUNT table with the following fields.
Acc no
Act type
Do_opening
Transaction_type
Balance
Account H_name
Transaction ID
Enter 10 records in the table and perform the following queries on it.
STEPS
Fig 11.1
2. In the database “NEW ACCOUNT”, create a new table named “ACCOUNT”.
Fig 11.2
3. In the design view of the table, enter the field names and their respective data
types.
Fig 11.3
4. Now enter the records in the table in the data sheet view.
Fig 11.4
5. Click on the create tab and then select “Query Wizard”.
Fig 11.5
6. A dialogue box will appear, now select “Simple query wizard” and click “ok”.
Fig 11.6
7. In the simple query wizard, move all the available fields to the selected fields.
Fig 11.7
8. Now click on “Next”.
Fig 11.8
Fig 11.9
10. Now a new tab will appear named as “ACCOUNT Query” as shown below.
Fig 11.10
11. Now click on the “ACCOUNT Query” and a query command will be displayed
as shown below.
Fig 11.11
12. Now right click on the “ACCOUNT Query” and then click on “Design View”,
the following will be displayed.
Fig 11.12
13. For Query 1, “Display the Acc_no and transaction type in ascending order” ,
tick the “Acc_no” checkbox as shown below.
Fig 11.13
14. Now click on the Sort drop down menu of column “Acc_no” and “transaction
type” then press “Ascending”.
Fig 11.14
Fig 11.15
16. On running the query, the output will display the “Acc_no” in ascending order.
Fig 11.16
17. Now right click on the “ACCOUNT Query” and select the “SQL View” to
look for the query command of Query no. 1.
Fig 11.17
Fig 11.18
15.Again go to the query design view, for Query 2, “Display the details of where
Acc_no is 104
“Criteria” row.
Fig 11.15
20. On running the Query, the output will display all the details of the Account
Holder , who has Acc_no. = 104
Fig 11.20
21 .Again go to the query design view, for Query 2, “Display the details of where
Acc_no is 101 and name NIKET”, tick the checkboxes of all the columns. In
“Acc_no” column, write “=101” in the “Criteria” row. Similarly, in the
“Acc_H_name” write “=NIKET” in the
“Criteria” row.
Fig 11.21
22. On running the Query, the output will display all the details of the Account Holder , who has
Acc_no. = 101 and name = niket.
Fig 11.22
23. Now right click on the “ACCOUNT Query” and select the “SQL View” to
look for the query command of Query no. 2. The query command will now appear
as shown below.
Fig 11.23
14. Again go to the query design view, for Query 3, “Display the Acc_no,
Acc_type,
Account_H_name and blance is greater than 10000”. Tick the checkboxes of the
columns “Acc_no”, “Acc_type”, “Balance”, and “Acc_H_name”. In “Balance”
column , write “>10000” in the “Criteria” row as shown below.
Fig 11.14
25. On running the Query, the output will display the Acc_no, Acc_type,
Account_H_name and blance where balance is greater than 5000.
Fig 11.25
26. Now right click on the “ACCOUNT Query” and select the “SQL View” to
look for the query command of Query no. 3. The query command will now appear
as shown below.
Fig 11.26
PRACTICAL NO.-12
Ques. Create a table named as STUDENT with the following fields as:
Roll_no
S_name
S_city
age
marks
Execute the following queries using query wizard after entering 10 records in the
table.
Display all the details of the given table
Display the names in alphabetical order
Display the name along with the marks where marks are greater than 60
Display the name of students whose name starts with letter ‘A’.
Display the details of students who live in ‘Delhi’.
Display the details of students who are older than 10 years.
Display the details of students who live in ‘Pune’ and age should be greater than 18.
Steps:
Fig 12.1
Fig 12.2
Fig 12.3
Fig 20 .4
Fig 12.5
Fig 12.6
7. For Query 1, “Display all the details of the given table”, write the query
as shown below.
Fig 12.7
8. Now go to “Design” ribbon and click on “RUN”.
Fig 12.8
9. On running the query, the following table appears which consists all the
details of student table.
Fig 12.9
10. Now repeat the same s for Query 2 “Display the names in alphabetical
order” , write the query as shown below and then click on “RUN”.
Fig 12.10
11. On running the query, the output will display the names of all students
in ascending order.
Fig 12.11
12. For Query 3 “Display the name along with the marks where marks are
greater than 60” , write the query as shown below and then click on “RUN”.
Fig 12.12
13. On running the query, the output will display the names and marks of
the students where marks are greater than 60.
Fig 12.13
14. For Query 4, “Display the name of students whose name starts with
letter ‘A’”, write the query as shown below and then click on “RUN”.
Fig 12.14
15. On running the query, the output will be display the names of the
students which are starting with the letter ‘A’.
Fig 12 .15
16. For Query 5, “Display the details of students who live in ‘Delhi’”, write
the query as shown below and then click on “RUN”.
Fig 12 .16
17. On running the query, the output will display the names of the students
who live in ‘Delhi’.
Fig 12.17
18. For Query 6, “Display the details of students who are older than 10
years” , write the query as shown below and then click on “RUN”.
Fig 12 .18
15. On running the query, the output will display all the details of the
students who are older than 10 years.
Fig 12 .19
PRACTICAL NO.- 13
Ques. Create a table named as STUDENT_MARKS with the following fields as:
S_no
Name
Marks
Execute the following queries after entering 10 records in the table.
Display the S_no of those students whose names starts with L and ends with A or marks
less than 70
Display the name and S_no of those students who have scored marks equal to 95
Display the names and marks of all those students who have scored marks between 75
and 90.
Steps:
1. Create a database named “Student”.
Fig 13.1
Fig 13.2
3. Enter the field names and there corresponding data types in the design view.
Fig 13.3
Fig 13.4
Fig 13.5
6. A dialogue box will appear, add the table “STUDENT_MARKS”.
Fig 13.6
Fig 13.7
8. For Query 1, “Display the S_no of those students whose names starts with L and ends with
A or marks less than 70” , write the query as shown below and then click on “RUN”.
Fig 13.8
9. On running the query, the output will display the S_No of students whose name starts with
L and ends with A or marks less than 70.
Fig 13.9
10. For Query 2, “Display the name and S_no of those students who have scored marks equal
to 95”, write the query as shown below and then click on “RUN”.
Fig 13.10
11. On running the query, the output will display the name and S_No of students who have
scored 95 marks.
Fig 13.11
12. For Query 3, “Display the names and marks of all those students who have scored marks
between 75 and 90”, write the query as shown below and then click on “RUN”.
Fig 13.12
13. On running the query, the output will display the names and marks of the students who
have scored between 75 and 90.
Fig 13.13
PRACTICAL NO.- 14
Ques. Create a table employee with the following fields:
Emp_id
Emp_name
Contact no.
Gender
Salary
Emp_grade
Designation
Address
Execute the following queries on the table created:
Display the details of the employees
Display the employee id of employee whose name is siddharth.
Display the name of the employee whose contact no. is 98454863011.
Update the employee details, set EMP_GRADE equal to A whose salary is greater than
50000.
Delete the record of the employee whose gender is male and designation is manager
Steps:
1. Create a database in MSAccess and then create a table named as “EMPLOYEE”.
Fig 14.1
2. Enter the field names and their corresponding data types in the design view.
Fig 14.2
3. Now go to the datasheet view and enter the records in the table.
Fig 14.3
Fig 14.4
5. Now a dialogue box will appear, “Add” the table EMPLOYEE.
Fig 14.5
6. Now right click on the “Query 1” tab and then select “SQL View”.
Fig 14.6
7. For Query 1, “Display the details of the employees”, write the query as shown below and
then go to the “Design” ribbon and then click on “RUN”.
Fig 14.7
8. On running the query, the output will display the details of all the employees.
Fig 14.8
9. For Query 2, “Display the employee id of employee whose name is “siddharth”, write the
query as shown below and then go to the “Design” ribbon and click on “RUN”.
Fig 14.9
10. On running the Query, the output will display the Emp_id of the customer whose name is
“Siddharth”.
Fig 14.10
11. For Query 3, “Display the name of the employee whose contact no. is 98454863011”, write
the query as shown below and then click on “RUN”.
Fig 14.11
12. On running the Query, the output will display the name(s) of the employee(s) whose
contact no. is 98454863011.
Fig 14.12
13. For Query 4, “Update the employee details, set EMP_GRADE equal to A whose salary is
greater than 50000.”, write the query as shown below and then click on “RUN”.
Fig 14.13
14. On running the query, a dialogue box will appear regarding the updation of the number of
records, Click on yes if you want to update the record(s).
Fig 14.14
15. Now save the table and the record(s) will be updated. Here, the Emp_grade of the
employee(s) whose salary is greater than 50000 will be updated and the grade will be updated
to ‘A’.
Fig 14.15
16. For Query 5, “Delete the record of the employee whose gender is male and designation is
manager”, write the query as shown below and then click on “RUN”.
Fig 14.16
17. On running the query, a dialogue box will appear regarding the deletion of the number of
records, Click on yes if you want to delete the record(s).
Fig 14.17
18. Now save the table and the record(s) will be deleted. Here, the record(s) of the employee(s)
will be deleted who is male and has manager as the designation. In the given table no record
will be deleted
Fig 14.18
PRACTICAL NO.- 15
Ques. Create the following table CUSTOMER having the columns, data types.
Customer_ID Number
Customer_Name Text
Designation Text
City Text
Country Text
Phone Number
Insert the data into table Customer. And apply the queries:
Steps:
Fig 15.1
2. Enter the field names and their respective data types in the design view as
mentioned in the question.
Fig 15.2
Fig 15.3
Fig 15.4
Fig 15.5
6. Now right click on the “Query 1” tab and select “SQL View”.
Fig 15.6
Fig 15.7
8. On running the query, the output will display the details of the customers who
have the designation as sales representative.
Fig 15.8
9. For Query 2, “Retrieve customer who is living in Canada”, write the query as
shown below and then click on “RUN”.
Fig 15.9
10. On running the query, the output will display the names of the customers who
live in Canada.
Fig 15.10
11. For Query 3, “Show details of the customer whose name is anuradha”, write
the query as shown below and the click on “RUN”.
Fig 15.11
12. For Query 4, “Show details of the customer who live in sweden”, write the query
as shown below and the click on “RUN”.
Fig 15.12
Fig 15.13
14. For Query 5, “Show details of the customer who is accountant”, write the query as shown below
and the click on “RUN”.
Fig 15.14
Fig 15.15
16. For Query 6, “Show details of the customer who live in america”, write the query as shown below
and the click on “RUN”.
Fig 15.16
Fig 15.17
PRACTICAL NO.- 16
Ques. Create a table EMPLOYEE either the following fields.
Emp_id
Emp_name
Dept_name
Designation
Grade
Salary
Address
Perform the following queries on it.
Display the name, designation, and salary of all the employees whose names begins
with M.
Update the employee designation to assistant manager where designation is trainer.
Display the employee id, name, salary and designation for the employees having grade
A.
Delete the record of the employee whose name begins with S or salary >10000.
Fig 16.1
2. Enter the field names and their corresponding data types in the design view.
Fig 16.2
3. Now go to the datasheet view and enter the records in the table.
Fig 16.3
Fig 16.4
5. Now a dialogue box will appear, “Add” the table EMPLOYEE.
Fig 16.5
6. For Query 1, “Display the name, designation, and salary of all the employees whose names
begins with M”, write the query as shown below and then click on “RUN”.
Fig 16.6
7. On running the query, the output will display the Emp_name, Designation and Salary of the
employee(s) whose name starts with ‘A’.
Fig 16.7
8. For Query 2, “Update the employee designation to assistant manager where designation is
trainee”, write the query as shown below and then click on “RUN”.
Fig 16.8
9. On running the Query, a dialogue box will appear regarding the updation of the number of
records, Click on yes if you want to update the record(s).
Fig 16.9
10. Now save the table and the record(s) will be updated. Here, the records of the employees
whose designation is “trainee’ will be changed/updated to ‘Assistant manager’.
Fig 16.10
11. For Query 3, “Display the employee id, name, salary and designation for the employees
where emp_grade is A.”, write the query as shown below and then click on “RUN”.
Fig 16.11
12.On running the query, the output will display the Emp_id, Emp_name, Salary and
Designation of the employee(s) whose Emp_grade is ‘A’.
Fig 16.12
13. For Query 4, “Delete the record of the employee whose name begin with S or salary
>10000”, write the query as shown below and then click on “RUN”.
Fig 16.13
14. On running the query, a dialogue box will appear regarding the deletion of the number of
records, Click on yes if you want to delete the record(s).
Fig 16.14
15. Now save the table and the record(s) will be deleted.
Fig 16.15
Emp_id
Emp_name
Contact no.
Gender
Salary
Emp_grade
Designation
Address
Execute the following queries on the table created.
Steps:
Fig 17.1
2 . Enter the field names and the corresponding data types in the design view.
Fig 17.2
Fig 17.3
4 . Now go to the “Design” ribbon and click on “Query Design”. A dialogue box will appear
and now add the table “EMPLOYEE”.
Fig 17.4
5 . Now right click on the “Query 1” tab and then select “SQL View”.
Fig 17.5
6 . For Query 1. Display the details of the employee whose address is D-29, IITM-
JANAKPURI write the query as shown below and then go to the Design ribbon and then click
on “RUN”.
Fig 17.6
7. On running the query the following output will displays
Fig 17.7
8. For Query 2. Display the name of the employees having salary between 10,000 and 30,000
write the query as shown below and then go to the Design ribbon and then click on “RUN”.
Fig 17.8
Fig. 17.9
10. For Query 3. Update the employee details, set salary increased by 10% having grade A.
write the query as shown below and then go to the Design ribbon and then click on “RUN”.
Fig. 17.10
Fig. 17.11
Fig. 17.12
13. For Query 4.Display the name, designation, and salary of all the employees whose names
contains ‘as’ as a substring write the query as shown below and then go to the Design ribbon
and then click on “RUN”.
Fig. 17.13
Fig. 17.14
15. For Query 5. Delete the record of female employees write the query as shown below and
then go to the Design ribbon and then click on “RUN”.
Fig. 17.15
16. The following dialogue box will appear after clicking run
Fig. 17.16
Fig. 17.17
Fig. 18.1
1. COUNT FUNCTION
o COUNT function is used to Count the number of rows in a database table. It can work on both
numeric and non-numeric data types.
o COUNT function uses the COUNT(*) that returns the count of all the rows in a specified table.
COUNT(*) considers duplicate and Null.
Syntax
1. COUNT(*)
or
2. COUNT( [ALL|DISTINCT] expression )
2. SUM Function
Sum function is used to calculate the sum of all selected columns. It works on numeric fields
only.
Syntax
1. SUM()
or
3. AVG function
The AVG function is used to calculate the average value of the numeric type. AVG function
returns the average of all non-Null values.
Syntax
1. AVG()
or
2. AVG( [ALL|DISTINCT] expression )
4. MAX Function
MAX function is used to find the maximum value of a certain column. This function
determines the largest value of all selected values of a column.
Syntax
1. MAX()
or
2. MAX( [ALL|DISTINCT] expression )
5. MIN Function
MIN function is used to find the minimum value of a certain column. This function determines
the smallest value of all selected values of a column.
Syntax
1. MIN()
or
2. MIN( [ALL|DISTINCT] expression )
PRACTICAL NO.-19
Ques. Create a table Student with following fields
Enrollment_no
Sname
Course_id
Batch
Semester
Marks
percentage
Execute the following queries after entering 10 records in the table.
STEPS
1 . Create a database in MS Access named as “STUDENTS” and create a table in it named as
“STUDENT”.
Fig. 19. 1
2 . Enter the field names and there corresponding data types in the design view.
Fig. 19. 2
3 . Now enter the records in the table in the datasheet view.
Fig. 19. 3
4 . In the “Create” ribbon, click on “Query Design” and then a dialogue box will appear,
“Add” the table “STUDENT”.
Fig. 19. 4
5 . For Query 1, “Display the Enrollment_no of fourth semester students”, write the query as
shown below and then click on “RUN”.
Fig. 19. 5
6 . On running the query, the output will Display the Enrollment_no of fourth semester
students .
Fig. 19. 6
7 . For Query 2, “Display the list of students of batch ‘2017-2020’ and course_id is 17”, write
the query as shown below and then click on “RUN”.
Fig. 19. 7
8 . On running the query, the output will Display the list of students of batch ‘2017-2020’ and
course_id
Fig. 19.8
9 . For Query 3, “Display the number of students in course_id 44”, write the query as shown
below and then click on “RUN”.
Fig. 19. 9
10 . On running the query, the output will Display the number of students in course_id 44.
Fig. 19. 10
11 . For Query 4, “Update the semester by 6 those having percentage above 60%”, write the
query as shown below and then click on “RUN”.
Fig. 19. 11
12. The following dialogue box will appear after clicking on RUN
Fig. 19. 12
13 . On clicking yes the following output will display
Fig. 19. 13
14. For Query 5, “Calculate the Sum, Avg of total marks column.”, write the query as shown
below for Sum and then click on “RUN”.
Fig. 19. 14
15. the following output will display.
Fig. 19. 15
16. For Avg write the query as shown below.
Fig. 19.16
17. he following output will be displayed.
Fig. 19.17
18. For Query 6, “Calculate the MAX, MIN percentage of student table”, write the query as
shown below for Sum and then click on “RUN”.
Fig. 19.18
19. The following output will be displayed.
Fig. 19.19
20. For calculating minimum percentage write the following query.
Fig. 19.20
21. The following output will be displayed after clicking run.
Fig. 19.21
22. For Query 6, “Delete the records of students having batch ‘2018-2021’”, write the query
as shown below for Sum and then click on “RUN”.
Fig. 19.22
Fig. 19.23
Fig. 19.24
PRACTICAL NO.-20
Ques. Create a company database with the following table EMP_DETAILS with the fields as:
EMP_ID
EMP_NAME
EMP_DESIGNATION
And make EMP_ID as the primary key. Create another table as DEPT_DETAILS with the
fields as:
DEPT_ID
DEPT_NAME
DEPT_LOCATION
P_ID
P_NAME
Designate primary key in all the tables. Establish a relationship between the table EMP-
DETAILS AND DEPT_DETAILS as 1:1 and 1: M. Also, establish a relationship between the
tables EMP-DETAILS AND PROJECT as 1:1. Enforce referential integrity constraint on it
and write down the steps for the same.
Steps
1. Create a database in MS Access named as “COMPANY”.
Fig 20.1
Fig 20.2
3. Enter the field names and there corresponding data types in the design view.
Fig 20.3
4. Now enter the records in the table in the data sheet view.
Fig 20.4
Fig 20.5
6. Now enter the field names and there corresponding data types in the design view.
Fig 20.6
7. Now enter the records in the table in the data sheet view.
Fig 20.7
Fig 20.8
9. Enter the field names and there corresponding data types in the design view.
Fig 20.9
10. Now enter the records in the table in the data sheet view.
Fig 20.10
11. Now right click on the table names and close all the tables.
Fig 20.11
Fig 20.12
13. A dialogue box will appear now, “Add” the tables “DEPT_DETAILS” and
“EMP_DETAILS” to create a relationship between them.
Fig 20.13
14. On adding the tables, the following will be displayed in the relationship window.
Fig 20.14
15. Now for creating a ONE TO ONE relationship between “DEPT_DETAILS” and
“EMP_DETAILS” table, drag and drop the primary key of “DEPT_DETAILS” table on the
primary key of “EMP_DETAILS” table, and then a dialogue box will appear as shown below.
16. Now tick the checkboxes below as shown and then click on “Create”.
Fig 20.15
11. Now a ONE TO ONE relationship will be created between the two tables as shown below.
Fig 20.16
18. Now for creating a ONE TO MANY relationship between “DEPT_DETAILS” and
“EMP_DETAILS” table, drag and drop the primary key of “DEPT_DETAILS” table on any
key of “EMP_DETAILS” table, and then a dialogue box will appear as shown below.
15. Now tick the checkboxes below as shown and then click on “Create”.
Fig 20.11
20. Now a ONE TO MANY relationship will be created between the two tables as shown
below.
Fig 20.18
21. Below is displayed the ONE TO ONE and ONE TO MANY relationships between the two
tables.
Fig 20.15
22. Now close the previous relationship, and now go to “Design” ribbon and select
“Relationships” button again to create a new relationship; then a dialogue box will appear, add
the tables “EMP_DETAILS” and “PROJECTS” and then the following will be displayed on
the relationship window.
Fig 20.20
23. Now drag and drop the primary key of “EMP_DETAILS” table on the primary key of
“PROJECTS” table; then a dialogue box will appear as shown below.
14. In the dialogue box, tick all the checkboxes as shown below and then click on “Create”.
Fig 20.21
25. A ONE TO ONE relationship will be established between the tables “EMP_DETAILS”
and “PROJECTS” as shown below.
Fig 20.22
Course_id
Course_name
Duration
Create a relationship of Course table with Student table which is created in previous
exercise (Practical no. 19).
Display all students enrolled in B.Com and BBA course.
Update the course name to B.com having course id 208.
Display the course id of those students enrolled in batch ‘2020-2023’.
Steps:
1. Create a database in MS Access and name it as “question”. Now create a new table in the
database and name the table as “COURSE”.
Fig 21.1
2. Enter the field names and there corresponding data types in the design view.
Fig 21.2
Fig 21.3
4. Now create a new table in the database and name the table as “STUDENT”.
Fig 21.4
5. Enter the field names and there corresponding data types in the design view.
Fig 21.5
6. Now enter the records in the table in the data sheet view.
Fig 21.6
7. Now click on the “Database tools” ribbon and then click on “Relationships”.
Fig 21.7
8. A dialogue box will appear, add both the tables “COURSE” and “STUDENT”.
Fig 21.8
9. The following will be displayed on adding both the tables in the relationship. Now click on
“edit relationships” button from the above ribbon.
Fig 21.9
10. A dialogue box will appear , now click on the drop down menu of the “COURSE” table in
the dialogue box and click on “Course_ID” (the primary key) and similarly do for the table
“”STUDENT”, as shown below and then click on “Create”.
Fig 21.10
11. A ONE TO ONE relationship will be created between the COURSE table and the
STUDENT table, as shown below.
Fig 21.11
12. Now go to the “Create” ribbon and then select “Query Design” button.
Fig 21.12
13. Now a dialogue box will appear, add both the tables i.e. “COURSE” table and
“STUDENT” table.
Fig 21.13
14. After adding both the tables, the following relationship between the tables will be
displayed. Now right click on the “Query1” and select SQL view.
Fig 21.14
15. For query 1, “Display all students enrolled in BBA course”, write the query as shown
below and then click on “RUN”.
Fig 21.15
16. On running the query, the output will display the details of the students who are enrolled
in BBA course.
Fig 21.16
17. Again go to “Query Design” and then go to SQL View, for Query 2, “Display name of
students enrolled in 2 year course”, write the query as shown below and then click on “RUN”.
Fig 21.17
18. On running the query, the output will display the names of the student who are enrolled in
a 2 year course.
Fig 21.18
15. For Query 3, “Display details of students of BBA course of batch ‘2011-2020’”, write the
query as shown below and then click on “RUN”.
Fig 21.19
20. On running the query, the output will display the details of the students enrolled in BBA
course of batch’2011-2020’.
Fig 21.20
PRACTICAL NO.-22
Ques. Discuss All DDL Commands with its syntax.
DDLCommands .
In this section, We will cover the following DDL commands as follows.
1. Create
2. Alter
3. truncate
4. drop
Command-1
CREATE.
This command is used to create a new table in SQL. The user has to give information like
table name, column names, and their datatypes.
Syntax –
CREATE TABLE table_name
(
column_1 datatype,
column_2 datatype,
column_3 datatype,
....
);
Example –
We need to create a table for storing Student information of a particular College. Create
syntax would be as below.
CREATE TABLE Student_info
(
College_Id number(2),
College_name varchar(30),
Branch varchar(10)
);
Command-2
ALTER.
This command is used to add, delete or change columns in the existing table. The user needs
to know the existing table name and can do add, delete or modify tasks easily.
Syntax–
Syntax to add a column to an existing table.
ALTER TABLE table_name
ADD column_name datatype;
Example–
In our Student_info table, we want to add a new column for CGPA. The syntax would be as
below as follows.
ALTER TABLE Student_info
ADD CGPA number;
Command-3
TRUNCATE.
This command is used to remove all rows from the table, but the structure of the table still
exists.
Syntax–
Syntax to remove an existing table.
TRUNCATE TABLE table_name;
Example–
The College Authority wants to remove the details of all students for new batches but wants
to keep the table structure. The command they can use is as follows.
TRUNCATE TABLE Student_info;
Command-4
DROP.
This command is used to remove an existing table along with its structure from the Database.
Syntax –
Syntax to drop an existing table.
DROP TABLE table_name;
Example –
If the College Authority wants to change their Database by deleting the Student_info Table.
DROP TABLE Student_info;
PRACTICAL NO.-23
Ques. Discuss All DML Commands with its syntax.
2. SELECT
Select command is used to retrieve data from the database.
The syntax for the select command is as follows −
Syntax
SELECT * from <table_name>;
For example, if we want to select all rows from the Employee database, we can use the
following command −
Example
SELECT * from Employee;
3. DELETE
Delete command is used to delete records from a database table.
The syntax for the delete command is as follows -
Syntax
Delete from <table_name>WHERE condition;
For example, if we want to delete an entire row of employee id 002, we can use the following
command −
Example
DELETE from Employee WHERE Emp_id=002;
4. UPDATE
Update command is used to update existing data within a table.
The syntax for the update command is as follows -
Syntax
UPDATE <table_name> SET column_number =value_number WHERE condition;
For example, if we want to update the name of the employee having the employee id 001, we
can use the command given below −
Example
UPDATE Employee SET Emp_name= Ram WHERE Emp_id= 001;
PRACTICAL NO. – 24
Ques. Create a table named as B.Com_M with the following fields:
E_no
Student name
Address
Phone no
Grade
Now create another table named as B.Com_E with the same fields. Add at least 10 records
to the table B.Com_M (with first 10 enrollment no’s and B.Com_E with next 10 e_no) and
then perform the following queries on it.
Create a make table query which contains the A grade students from B.Com_M
Append the A grade holders from B.Com_E to the newly created table in the above query.
Steps:
1. Create a database in MS Access and then create a table named as “BBA_M1”.
Fig 24.1
2. Enter the field names and their corresponding data types in the design view.
Fig 24.2
Fig 24.3
Fig 24.4
5. Enter the field names and their corresponding data types in the design view.
Fig 24.5
6. Now go to the datasheet view and enter 10 records in the table.
Fig 24.6
Fig 24.7
8. Now a dialogue box will appear, add the table “BBA_M1” to perform the query.
Fig 24.8
9. Now drag and drop all the field names to the properties below.
Fig 24.9
10. Now un tick the checkbox of “Grade” and in the Criteria row, under “Grade” column, write
“’A’” as shown below.
Fig 24.10
Fig 24.11
12. On running the Query, the output will display the details of the students having ‘A’ grade.
Fig 24.12
13. Right click on the “Query1” tab and select “SQL View” for the query command as shown
below.
Fig 24.13
Fig 24.14
15. A dialogue box will appear, write the name of the new table to be created for the ‘A’ grade
students of “BBA_M1”. Select the “Current Database” option and then click on “OK”.
Fig 24.15
Fig 24.16
11. Now again go to the “Create” tab and select “Query Design” and then a dialogue box will
appear, now add “BBA_M2” table to perform query.
Fig 24.17
18. Now drag and drop the field names of “BBA_M2” to the properties below.
Fig 24.18
19. Now un tick the checkbox of the column “Grade” and then in the “Criteria” row , under
the “Grade” column, write “’A’” as shown below.
Fig 24.19
20. On running the Query, the output will display the ‘A’ grade students from “BBA_M2”.
Fig 24.20
21. Now in the “Design” ribbon, click on the “Append” button.
Fig 24.21
22. A dialogue box will appear, click on the drop down button in the table name and then select
“A_GRADE_STUDENTS” table. Click on the “Current Database” option and then click on
“OK”.
Fig 24.22
23. Now go to the “A_GRADE_STUDENTS” table and save the table. A dialogue box will
then appear, click “Yes” to modify/append the records.
Fig 24.23
24. Another dialogue box will appear, which will tell the number of records to be appended.
Click on “Yes” to append the records.
Fig 24.24
Fig 24.25
PRACTICAL NO.-25
Ques. Create a table employee with the following fields:
Emp_id
Emp_name
Dept_name
Salary
Address
Dob
STEPS
Fig 25.1
2. Enter the field names and their corresponding data types in the design view.
Fig 25.2
3. Now go to the datasheet view and enter the records in the table.
Fig 25.3
4. Go to “Design” ribbon and then click on “Query Design”.
Fig 25.4
5. A dialogue box will appear, “Add” the table “EMPLOYEE” to perform the queries.
Fig 25.5
6. Now right click on the “Query1” tab and then select “SQL View”. For Query 1, “Find the
employee ids of the employees having same salary”, write the query as shown below and then
go to the “Design” ribbon and then click on “RUN”.
Fig 25.6
7. On running the query, the output will display the Emp_id of the employees having the same
salary.
Fig 25.7
8. Foe Query 2, “Find the details of the employee working in the same dept.”, write the query
as shown below and then click on “RUN”.
Fig 25.8
9. On running the query, the output will display the details of the employees working in same
department.
Fig 25.9
10. For Query 3, “Find employee id, emp_name of the employee having same dob”, write the
query as shown below and then click on “RUN”.
Fig 25.10
11. On running the query, the output will display the Emp_name and Emp_id of the employees
having same DOB.
Fig 25.11
PRACTICAL NO.-26
Ques. Create 2 tables as EMPLOYEE and DEPARTMENT with the following table
structure. Employee should have the following fields:
F_name
L_name
E_id
Dob
Add
Salary
D_no ()
The fields for dept table are:
Dept_no
D_name
Mgr_no
Mgr_doj
Perform the following queries on it:
Select the employee’s f_name, d_no and d_name from the above table.
Select the f_name, l_name and add of the employee who works in the research dept.
Select the f_name, l_name, d_no, d_name for all the employees having salary>40000
STEPS
1. Create a database in MS Access and then create a table and name it as “EMPLOYEE”.
Fig 26.1
2. Enter the field names and their corresponding data types in the design view.
Fig 26.2
3. Now go to the datasheet view and enter the records in the table.
Fig 26.3
4. Now create another table named as “DEPARTMENT” in the same database.
Fig 26.4
5. Enter the field names and their corresponding data types in the design view.
Fig 26.5
6. Now go to the datasheet view and enter the records in the table
Fig 26.6
7. Now close the tables and then go to “Database Tools” ribbon and then click on
“Relationships” button.
Fig 26.7
8. A dialogue box will appear, add both the tables “EMPLOYEE” and “DEPARTMENT”.
Fig 26.8
9. The following window will appear, now drag and drop the primary key of “EMPLOYEE”
table to the primary key of “DEPARTMENT” table.
Fig 26.9
10. A dialogue box will appear, tick all the checkboxes below and then click on “Create”.
Fig 26.10
11. A ONE-TO-ONE relationship between “EMPLOYEE” table and “DEPARTMENT” table
as shown below.
Fig 26.11
12. Now go to “Design” ribbon and then click on “Query Design” and then a dialogue box
will appear, add both the tables “EMPLOYEE” and “DEPARTMENT”.
Fig 26.12
13. Now right click on the “Query1” tab and then select “SQL View”
Fig 26.13
14. For Query 1,”Select the employee’s f_name, d_no and d_name from the above table”,
write the query as shown below and then click on “RUN”.
Fig 26.14
15. On running the query, the output will display the F_name, D_no and D_name of the
employees.
Fig 26.15
16. For Query 2. “Select the f_name, l_name and add of the employee who works in the
research dept.”, write the query as shown below and then click on “RUN”.
Fig 26.16
17. On running the query, the output will display the F_name, L_name and Address of the
employee(s) working in research department.
Fig 26.17
18. For Query 3, “Select the f_name, l_name, d_no, d_name for all the employees having
salary>10000”, write the query as shown below and then click on “RUN”.
Fig 26.18
19. On running the query, the output will display the F_name, L_name, D_no and D_name of
the employee(s) whose salary is greater than 10000.
Fig 26.19
PRACTICAL NO.-27
Ques. Create two table EMPLOYEE and DEPARTMENT with the following fields:
1. EMPLOYEE
F_NAME
L_NAME
E_ID
DOB
ADDRESS
SALARY
2. DEPARTMENT
D_NO
D_NAME
MGR_NO
MGR-DOJ
Create the forms for the employee as well as the dept table in tabular form and write the steps
to create the forms. Also provide the suitable title to both the forms and insert the page no’s
to it.
STEPS
1. Create a database in MS Access and then create a table named as “EMPLOYEE”.
Fig 27.1
2. Enter the field names and their corresponding data types in the design view.
Fig 27.2
3. Now go to the datasheet view and then enter the records in the table.
Fig 27.3
Fig 27.4
5. Enter the field names and their corresponding data types in the design view.
Fig 27.5
6. Now go to the datasheet view and enter the records in the table.
Fig 27.6
Fig 27.7
METHOD 1
1. In the “Create” ribbon, in the forms group, click on “More Forms” option and then select
“FORM WIZARD”.
Fig 27.8
Fig 27.9
3. Transfer all the “Available fields” to the “Selected fields” column and then click on “Next”.
Fig 27.10
4. Another dialogue box will appear, select “Tabular” for the form to appear in tabular form.
And then click on Next.
Fig 27.11
Fig 27.12
6. Another dialogue box will appear, write the suitable title for your form and then click on
“Finish”.
Fig 27.13
Fig 27.14
8. For editing the form, right click on the “VIEW” button and then select “Layout View”.
Fig 27.15
9. The form can be edited in the layout view as shown below and the form can also be given
suitable heading as shown.
Fig 27.16
METHOD 2
1. In the “Create” ribbon, in the forms group, click on “FORM” button.
Fig 27.17
2. The form will be created as shown below. At the bottom is the page/record number, which
can be changed with the help of the arrows provided.
Fig 27.18
3. On clicking the forward arrows the further records show up. The form can be edited in
“Layout View” and can be given a suitable heading from the “Layout View”.
Fig 27.19
METHOD 3
1. In the “Create” ribbon, in the forms group, click on “SPLIT FORM” button.
Fig 27.20
2. The form will appear as shown below; the form screen will be split between two halves as
the first half displaying a particular record and the second half displaying the whole table.
Fig 27.21
3. Go to the layout view to edit the form and give it a suitable heading.
Fig 27.22
4. Also one can go to “Design View” to edit the form as shown below.
Fig 27.23
5. The form will appear in the design view, where the editing can be done as shown below.
Fig 27.24
METHOD 4
1. In the “Create” ribbon, in the forms group, click on “MULTIPLE ITEMS” button.
Fig 27.25
2. The form will appear as shown below.
Fig 27.26
3. For editing the form and giving a suitable heading, go to the “Layout View” and the form
can be edited as shown below.
Fig 27.27
#S FOR CREATING FORM FOR “DEPARTMENT” TABLE.
METHOD 1
1. In the “Create” ribbon, in the forms group, click on “More Forms” option and then select
“FPRM WIZARD”.
Fig 27.28
2. A dialogue box will appear, Transfer all the “Available fields” to the “Selected fields”
column and then click on “Next”.
Fig 27.29
3. Another dialogue box will appear, select “Tabular” for the form to appear in tabular form.
And then click on Next.
Fig 27.30
4. Another dialogue box will appear, click on “Next”.
Fig 27.31
5. Another dialogue box will appear, write the suitable title for your form and then click on
“Finish”.
Fig 27.32
6. The form will appear as shown below.
Fig 27.33
7. Go to the “Layout View” to edit the form.
Fig 27.34
8. The form can be edited and a suitable heading can be given to the form in the layout view
as shown below.
Fig 27.35
METHOD 2
1. In the “Create” ribbon, in the forms group, click on “FORM” button.
Fig 27.36
2. The form will be created as shown below.At the bottom is the page/record number, which
can be changed with the help of the arrows provided.
Fig 27.37
3. On clicking the forward arrows the further records show up. The form can be edited in
“Layout View” and can be given a suitable heading from the “Layout View”.
Fig 27.38
METHOD 3
1. In the “Create” ribbon, in the forms group, click on “SPLIT FORM” button.
Fig 27.39
2. The form will be created as shown below; the form screen will be split between two halves
as the first half displaying a particular record and the second half displaying the whole table.
Fig 27.40
3. The form can be edited and can be given a suitable heading in the layout view as shown
below.
Fig 27.41
METHOD 4
1. In the “Create” ribbon, in the forms group, click on “MULTIPLE ITEMS” button.
Fig 27.42
2. The form will appear as shown below.
Fig 27.43
3. The form can be edited in the “Layout View” as shown below.
Fig 27.44
PRACTICAL NO.- 28
Ques. Create a table named STUDENT_DETAILS with the following fields.
R_no
Name
Course name
Attendance
DOB
Address
Course will have values either BBA, BCA or B.Com. Enter 5 records. Create a form for the
above table in design view. Add text box and the following buttons to it.
Go to first record
Go to last record
Go to previous record
Go to next record
Add a label student form to it.
Steps:
1. Create a database in MS Access and then create a table named as “STUDENT_DETAILS”.
Fig 28.1
2. Enter the field names and their corresponding data types in the design view.
Fig 28.2
3. Now go to the datasheet view and then enter the records in the table,
Fig 28.3
Fig 28.4
Fig 28.5
Fig 28.6
7. The following box will appear on the left side of the screen.
Fig 28.7
Fig 28.8
8. Now drag and drop all the field names to the Design area except “Course_name”. For
“Course_name”, select a label and draw it as shown below.
Fig 28.9
9. Now select a “Combo box” from the above tab, to create a drop down menu for
“Course_name”.
Fig 28.10
10. A dialogue box will now appear, select the option “I will type in the values that I want”,
and then click on “Next”.
Fig 28.11
11. Another dialogue box will appear, type in the values of “Course_name”, i.e. “Economics”
and “DBMS”. And then click on “Next”.
Fig 28.12
12. Another dialogue box will appear, select “Remember the value for later use” option and
then click on “Next”.
Fig 28.13
13. Another dialogue box will appear, write the name of the field to which you want to apply
the combo box. And then click on “Finish”
Fig 28.14
14. The Course_name will have a drop down menu having the options “Economics” and
“DBMS”.
Fig 28.15
Fig 28.16
16. Now go to the design view and edit the form as shown below.
Fig 28.17
17. Now to add a label “STUDENT FORM” to the form, select the label button from the
“Design” ribbon and draw the label on the top of the form as shown below.
Fig 28.18
18. Now to add buttons, select the “Button” option from the “Design” ribbon.
Fig 28.19
19. Draw the button and then a dialogue box will appear, In the Categories column, select
“Record Navigation”.
Fig 28.20
20. Now select the “Go To First Record” option and then click on “Next”.
Fig 28.21
21. Another dialogue box will appear, select the type of button you want and then click on
“Next”.
Fig 28.22
22. Another dialogue box will appear, give a suitable name to your button to save it and then
click on “Finish”.
Fig 28.23
Fig 28.24
24. For creating another button, again select the button option and then draw a button and then
a dialogue box will appear. Select the “Go To Last Record” option and then click on “Next”.
Fig 28.25
25. Another dialogue box will appear, select the type of button you want and then click on
“Next”.
Fig 28.26
26. Another dialogue box will appear, give a suitable name to your button to save it and then
click on “Finish”.
Fig 28.27
Fig 28.28
28. For creating another button, again select the button option and then draw a button and then
a dialogue box will appear. Select the “Go To Previous Record” option and then click on
“Next”.
Fig 28.29
28. Another dialogue box will appear, select the type of button you want and then click on
“Next”.
Fig 28.30
30. Another dialogue box will appear, give a suitable name to your button to save it and then
click on “Finish”.
Fig 28.31
Fig 28.32
32. For creating another button, again select the button option and then draw a button and then
a dialogue box will appear. Select the “Go To Next Record” option and then click on “Next”.
Fig 28.33
33. Another dialogue box will appear, select the type of button you want and then click on
“Next”.
Fig 28.34
34. Another dialogue box will appear, give a suitable name to your button to save it and then
click on “Finish”.
Fig 28.35
Fig 28.36
36. The form will look like shown below in the design view,
Fig 28.37
Fig 28.38
38. New records can be added in the table and the records can be changed/moved by the
buttons below.
Fig 28.39
Fig 28.40
PRACTICAL NO.-29
Ques. Create a database named as RESULT MANAGEMENT with the following table and
the fields.
Student_details:
R_no
Name
Course_ name
Dob
Marks
Address
Attendance
Course name field will have values as ISM, ITLP or ED. Enter 5 records.
Create a report named as RESULT_REPORT using the report wizard which shows the marks
obtained by students in different courses. The report should have the following:
STEP :
1. Create a database named as RESULT_MANAGEMENT.
Fig 29.1
Fig 29.2
3. Enter the field name along with the data type as mentioned below.
Fig 29.3
4. Set the Course_Name field with values as ISM, ITLP, or ED. For this, go to the Validation
Rule and write “ISM” OR “ED” OR “ITLP.”
Fig 29.4
Fig 29.5
6. Now, go to Create Tab, in the Reports ribbon, click on the Report Wizard.
Fig 29.6
7. After clicking on report wizard, a dialogue box will appear, transfer the required fields in
the selected fields box. Click on Next.
Fig 29.7
8. In the next dialogue box, if you want to group any field, transfer it using the arrow signs by
selecting them. Press Next.
Fig 29.8
9. In the next dialogue box, Set the lay out of the report. Click Next.
Fig 29.9
10. In the next dialogue box, give the title to your report and select Modify the report’s design.
Click on Finish.
Fig 29.10
11. After clicking on Finish, a report layout will appear as shown below.
Fig 29.11
12. Now, right click on the Student_Details5, go to the Report View. The result will appear as
follows.
Fig 29.12
13. Change the report name as Result_Report by going to the Design view.
Fig 29.13
14. For changing the logo, Go to the Design Tab, and click on Logo and select the logo and
drag it as per your conditions
Fig 29.15
1. Employee:
Emp_no
Ename
Department
Designation
Salary
Department field will have values as ‘HR’, “Marketing’ and ‘Finance’.
Enter 5 records.
Create a report named as PAYROLL_REPORT using the report wizard which shows the
salary of employees in different departments. The report should have the following:
STEP :
Fig 30.1
Fig 30.2
3. Enter the field name along with the data type as mentioned below.
Fig 30.3
4. Set the Department field with values as HR, Marketing, and Finance. For this, go to the
Validation Rule and write “HR” OR “Marketing” OR “Finance.”
Fig 30.4
Fig 30.5
6. Now, go to Create Tab, in the Reports ribbon, click on the Report Wizard.
Fig 30.6
7. After clicking on report wizard, a dialogue box will appear, transfer the required fields in
the selected fields box. Click on Next.
Fig 30.7
8. In the next dialogue box, if you want to group any field, transfer it using the arrow signs by
selecting them. Press Next.
Fig 30.8
9. In the next dialogue box, Set the lay out of the report. Click Next.
Fig 30.9
10. In the next dialogue box, give the title to your report and select Modify the report’s design.
Click on Finish.
Fig 30.10
11. . After clicking on Finish, a report layout will appear as shown below.
Fig 30.11
12. Now, right click on the Employee Report, go to the Report View. The result will appear
as follows.
Fig 30.12
13. Change the report name as Payroll_Management by going to the Design view.
Fig 30.13
14. For changing the logo, Go to the Design Tab, and click on Logo and select the logo and
drag it as per your conditions.
Fig 30.14
SOLUTION.-
SOLUTION.-
Fig.31.1
SOLUTION.-
Fig.33.1
SOLUTION.-