0% found this document useful (0 votes)
21 views196 pages

Yash Ism PDF

The document provides definitions and descriptions of key database concepts: 1) It defines data, information, database, DBMS, and RDBMS. Data is a record of quantities, information is organized data that provides context, a database is a collection of organized data stored electronically, a DBMS manages the database structure and data manipulation, and an RDBMS uses relational tables to store and retrieve data. 2) It describes the various elements of a database including tables, forms, reports, and queries. Tables contain fields and records, forms customize data display, reports print and summarize data, and queries search and compile data from tables. 3) It explains how to create tables in Microsoft Access,

Uploaded by

yash choudhary
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)
21 views196 pages

Yash Ism PDF

The document provides definitions and descriptions of key database concepts: 1) It defines data, information, database, DBMS, and RDBMS. Data is a record of quantities, information is organized data that provides context, a database is a collection of organized data stored electronically, a DBMS manages the database structure and data manipulation, and an RDBMS uses relational tables to store and retrieve data. 2) It describes the various elements of a database including tables, forms, reports, and queries. Tables contain fields and records, forms customize data display, reports print and summarize data, and queries search and compile data from tables. 3) It explains how to create tables in Microsoft Access,

Uploaded by

yash choudhary
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/ 196

Yash kumar 05013788820 ISM Practical File

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

2020-2023 1 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

 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.

2020-2023 2 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 3 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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?

s to open Microsoft Access

1. Go to windows tab Search Microsoft office Select Microsoft Access 2013.

Fig.2.1

2. Open Microsoft Access 2013.

2020-2023 4 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.2.2

#VARIOUS ELEMENTS OF DATABASE.-

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.

3. REPORT.- Report is an object in desktop databases designed for formatting,


calculating, printing, and summarizing selected data. You can view a report on your
screen before you print it.
4. QUERY.- An object that provides a custom view of data from one or more tables.
Queries are a way of searching for and compiling data from one or more tables. You
can define queries to Select, Update, Insert, or Delete data.

Fig.2.3

s to create table in design and datasheet view

1. Open Microsoft office access from Windows Tab.

2020-2023 5 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 2.4

2. open any existing database or create a new one.

Fig 2.5

Fig.2.6

4. Default, table appears in datasheet view, Have to change it in design view.

2020-2023 6 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.2.7

5. Now input the desirable in the fields of the table.

Fig.2.8

#s to create a table in design view.

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.

2020-2023 7 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.2.10

3. Now the design view will appear.

Fig 2.11

2020-2023 8 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 9 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 10 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.-

1. Create a new database named as student in Design View in MS-Access.

Fig.-4.1

2. Save the table as STUDENT_DETAILS.

2020-2023 11 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.-4.2

3. Enter the Field Names and there corresponding data type.

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

2020-2023 12 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

 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

2. Save the name of the table as STUDENT_COURSE.]

Fig.-4.6

3. Enter the Field Names and there corresponding data type.

2020-2023 13 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.-4.7

4. Enter 5 records in the table.

Fig.-4.8

2020-2023 14 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2. Enter the “FIELD NAMES” and “DATA TYPE”.

Fig 5.2

2020-2023 15 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 16 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 5.4

5. Click on “DOJ” cell and in the properties , set the “default date” to present date that is
“=DATE()”.

2020-2023 17 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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 ”.

2020-2023 18 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 5.6

Fig 5.7
7. Enter 10 records in the “DATASHEET VIEW” and save the file.

2020-2023 19 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 5.8

2020-2023 20 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

1. Use text as data type.


2. Go to general, click on input Mask wizard.
3. Now in the dialogue box, click on "social security number" and press "Next".

Fig 6.1

4. In the "place character", select any character ("-" in this case); then press "next".

2020-2023 21 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 22 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 6.4
7. Now the input mask will display the format of emp sen.

Fig 6.5

2020-2023 23 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

FOR DOJ

1. Go to design view. In data type select “TEXT”.

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

2020-2023 24 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

4. In the "placeholder character", select any character ("-" in this case); then press
"next".

Fig 6.8
5. Click finish.

Fig 6.9

2020-2023 25 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

i. Insert 5 records using ‘new faculty’ tab in faculty template.


ii. Faculty Name should be in ascending order.
iii. Department should be in descending order.
iv. Generate report for. All faculty category and Faculty by department category.

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

2. Save the faculty database by name “faculty”.

2020-2023 26 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 7.2

3. The following view will appear on creating a new faculty database.

Fig 7.3

4. For department; there is a drop down menu which has numerous departments which can be
selected.

2020-2023 27 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 7.4

5. Enter 5 records directly in the table.

Fig 7.5

6. Insert a records using “new faculty” tab in faculty template. Fill the details and click on “save
and new”

2020-2023 28 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 7.6

7. Similarly enter 5 records using the “new faculty” tab.

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.

2020-2023 29 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 30 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 31 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 7.12

13. The following view will be displayed showing report for “Faculty by department”.

Fig 7.13

2020-2023 32 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

1. Add at least 10 records in the table.

Fig.8.1

2. Select the field you want to add primary key.

2020-2023 33 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.8.2

3. Go to ‘Design’ option in Menu bar.


4. You will find Primary Key option, click on that.

Fig.8.3

5. Now your field got the primary key.

Fig.8.4

2020-2023 34 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

1. S_name should start with A and end with M.


2. S_course can have only BBA OR MBA as its values.
3. S_marks, it can be NULL or should be > 50.
4. S_dob should be less than the current date.
Enter at least 10 entries in the table.

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

2. Go to ‘Design’ option in Menu bar.


3. You will find Primary Key option, click on that.

2020-2023 35 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig.9.3

4. Now your field got the primary key.

Fig.9.4

1. S_name should start with A and end with M.


s
 Select the Field you want to modify. Field Properties will appear.

Fig.9.5

 Go to Validation Rule in Field Properties

 Write ‘Like “A*M”’ inside validation rule and save the table.

Fig.9.6

2020-2023 36 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

 Only names start with A and ends with M will be accept.

Fig.9.7

2. S_course can have only BBA OR MBA as its values.


s
 Select the Field you want to modify. Field Properties will appear.

Fig.9.8

 Go to Validation rule in Field Properties.


 Write “BBA” Or “MBA” inside validation rule box and save.

Fig.9.9

 Only BBA and MBA courses will be accept in table.

Fig.9.10

2020-2023 37 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

3. S_marks, it can be NULL or should be > 50.


s
 Select the Field you want to modify. Field Properties will appear.

Fig.9.11

 Go to Validation rule in Field Properties.


 Write “<=50 Or Is Null” inside validation rule box and save.

Fig.9.12
 Only marks between 0 and 50 will be accepted by table.

Fig.9.13

2020-2023 38 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO.-10

Ques. Write s to put password on the database and convert it into the required format.

s to put password on database and convert it into 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.

2020-2023 39 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

 Display the Acc no, Tranasction_Type in ascending order.


 Display the details of account where Acc no is 104.
 Display the details of account table where Acc no is 101 and name is niket.
 Display the Acc no, Acc type, account H_name and balance where balance is greater
than 10,000.

STEPS

1. Create a new database in MS ACCESS and save it as “NEW ACCOUNT”.

Fig 11.1
2. In the database “NEW ACCOUNT”, create a new table named “ACCOUNT”.

2020-2023 40 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 41 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 42 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 11.8

9. Now another dialogue box will appear, press “Next”.

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.

2020-2023 43 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 44 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

15. Now click on “RUN” button in the Design ribbon.

2020-2023 45 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

18. The query command will now appear as shown below.

2020-2023 46 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 47 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 48 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 49 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 50 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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:

1. Create a new database named as “QUERY”.

Fig 12.1

2020-2023 51 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

2. Save the table name as “STUDENT”.

Fig 12.2

3. Enter the field names and there corresponding data types.

Fig 12.3

4. Now go to datasheet view and enter the records.

2020-2023 52 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 20 .4

5. Now go to “CREATE” ribbon and click on “Query Design”.

Fig 12.5

6. A dialogue box will appear, now click on “Add”.

2020-2023 53 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 54 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 55 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 56 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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’.

2020-2023 57 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 58 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 59 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2. Save the table name as “STUDENT_MARKS”.

2020-2023 60 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 13.2

3. Enter the field names and there corresponding data types in the design view.

Fig 13.3

4. Now go to the datasheet view and enter 10 records.

Fig 13.4

5.Now go to “CREATE” ribbon and click on “Query Design”.

2020-2023 61 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 13.5
6. A dialogue box will appear, add the table “STUDENT_MARKS”.

Fig 13.6

7. Now right click on the query and press “SQL View”.

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”.

2020-2023 62 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 63 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 64 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 65 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 14.2

3. Now go to the datasheet view and enter the records in the table.

Fig 14.3

4. Now go to the “Design” ribbon and then click on “Query Design”.

Fig 14.4
5. Now a dialogue box will appear, “Add” the table EMPLOYEE.

2020-2023 66 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 67 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 68 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 69 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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).

2020-2023 70 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 71 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO.- 15
Ques. Create the following table CUSTOMER having the columns, data types.

Field Name Data Type

Customer_ID Number
Customer_Name Text
Designation Text
City Text
Country Text
Phone Number

Insert the data into table Customer. And apply the queries:

 Display customer details having designation Sales Representative.


 Retrieve customer who is living in Canada.
 Show details of the customer whose name is Anuradha.
 Show detail of the customer who lives in Sweden.
 Show detail of the customer who is Accountant.
 Count customers who live in America.

Steps:

1. Create a database in MS Access and then create a table named as


“CUSTOMER”.

Fig 15.1

2. Enter the field names and their respective data types in the design view as
mentioned in the question.

2020-2023 72 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 15.2

3. Now enter the records in the table in the datasheet view.

Fig 15.3

4. Go to the “Create” ribbon and then click on “Query Design”.

2020-2023 73 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 15.4

5. A dialogue box will appear, “Add” the “CUSTOMER” table .

Fig 15.5
6. Now right click on the “Query 1” tab and select “SQL View”.

Fig 15.6

7. Foe Query 1, “Display customer details having designation Sales


Representative”, write the query as shown below and then go to the “Design”
ribbon and click on “RUN”.

2020-2023 74 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 75 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 76 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

13. On running the query, the output will displayed

2020-2023 77 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

15. On running the query, the output will displayed

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”.

2020-2023 78 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 15.16

17. On running the query, the output will displayed

Fig 15.17

2020-2023 79 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

1. Create a database in MSAccess and then create a table named as “EMPLOYEE”.

Fig 16.1

2. Enter the field names and their corresponding data types in the design view.

Fig 16.2

2020-2023 80 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

3. Now go to the datasheet view and enter the records in the table.

Fig 16.3

4. Now go to the “Design” ribbon and then click on “Query Design”.

Fig 16.4
5. Now a dialogue box will appear, “Add” the table EMPLOYEE.

2020-2023 81 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 82 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 83 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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).

2020-2023 84 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 16.14

15. Now save the table and the record(s) will be deleted.

Fig 16.15

2020-2023 85 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -17


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 employee whose address is D-29, IITM-JANAKPURI.


 Display the name of the employees having salary between 10,000 and 30,000.
 Update the employee details, set salary increased by 10% having grade A.
 Display the name, designation, and salary of all the employees whose names contains
‘as’ as a substring.
 Delete the record of female employees.

Steps:

1 . Create a database in MS Access and then create a table named as “EMPLOYEE”.

Fig 17.1

2 . Enter the field names and the corresponding data types in the design view.

2020-2023 86 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 17.2

3 . Enter the records in the table in the data sheet view.

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”.

2020-2023 87 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

9. On running the query the following output will displays

2020-2023 88 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

11. The following dialogue box will appear.

Fig. 17.11

12. On running the query the following output will displays.

Fig. 17.12

2020-2023 89 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

14. On running the query the following output will displays.

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

2020-2023 90 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig. 17.16

17. On running the query the following output will displays.

Fig. 17.17

2020-2023 91 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -18


Ques . Define All Aggregate function with its work defined in SQL

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

2020-2023 92 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

2. SUM( [ALL|DISTINCT] expression )

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 )

2020-2023 93 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

 Display the Enrollment_no of fourth semester students.


 Display the list of students of batch ‘2017-2020’ and course_id is 17.
 Display the number of students in course_id 44.
 Update the semester by 6 those having percentage above 60%.
 Calculate the Sum, Avg of total marks column.
 Calculate the MAX, MIN percentage of student table.
 Delete the records of students having batch ‘2018-2021’.

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.

2020-2023 94 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 95 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 96 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 97 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 98 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 99 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

23. The following dialogue box will appear.

2020-2023 100 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig. 19.23

24. The table will display following output.

Fig. 19.24

2020-2023 101 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

Also create a table as PROJECTS with fields as:

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

2020-2023 102 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

2. Now create a new table named as “EMP_DETAILS”.

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

5. Now create another table named as “DEPT_DETAILS”, in the same database.

Fig 20.5

6. Now enter the field names and there corresponding data types in the design view.

2020-2023 103 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 20.6

7. Now enter the records in the table in the data sheet view.

Fig 20.7

8. Create another table named as “PROJECTS”, in the same database.

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.

2020-2023 104 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 20.10

11. Now right click on the table names and close all the tables.

Fig 20.11

12. Go to “Database Tools” ribbon and then select “Relationships” button.

Fig 20.12

13. A dialogue box will appear now, “Add” the tables “DEPT_DETAILS” and
“EMP_DETAILS” to create a relationship between them.

2020-2023 105 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 106 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 107 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 108 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 109 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -21


Ques. Create table course with following fields

 Course_id
 Course_name
 Duration

Execute the following queries after entering 10 records in the table.

 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

2020-2023 110 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

3. Now enter the records in the table in the datasheet view.

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.

2020-2023 111 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 112 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 113 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 114 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 115 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 116 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 117 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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;

2020-2023 118 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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;

2020-2023 119 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO.-23
Ques. Discuss All DML Commands with its syntax.

DML commands are as follows


 Select command
 Insert command
 Update command
 Delete command
1. INSERT
Insert command is used to insert data into a table.
The syntax for insert command is as follows −
Syntax
Insert into <table_name> (column list) values (column values);
For example, if we want to insert multiple rows to the Employee table, we can use the
following command −
Example
Insert into Employee(Emp_id, Emp_name) values (001, “ bhanu”);
Insert into Employee(Emp_id, Emp_name) values (002, “ hari”);
Insert into Employee(Emp_id, Emp_name) values (003, “ bob”);

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 −

2020-2023 120 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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;

2020-2023 121 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 122 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

3. Now go to the datasheet view and enter 10 records in the table.

Fig 24.3

4. Now create a new table names as “BBA_M2”.

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.

2020-2023 123 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 24.6

7. Now in the “Create” ribbon, click on “Query Design”.

Fig 24.7

8. Now a dialogue box will appear, add the table “BBA_M1” to perform the query.

2020-2023 124 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 125 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 24.10

11. Now go to the “Design” ribbon and then click on “RUN”.

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.

2020-2023 126 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 24.13

14. In the “Design” ribbon, click on “Make table” button.

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

16. A new table will be created as shown below.

2020-2023 127 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 128 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 129 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 130 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 24.24

25. Now the “A_GRADE_STUDENTS” table will be appended as shown below.

Fig 24.25

2020-2023 131 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO.-25
Ques. Create a table employee with the following fields:
 Emp_id
 Emp_name
 Dept_name
 Salary
 Address
 Dob

1. Find the employee ids of the employees having same salary.


2. Find the details of the employee working in the same dept.
3. Find employee id, emp-name of the employee having same dob.

STEPS

1. Create a database in MS Access and then create a table named as “EMPLOYEE”.

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.

2020-2023 132 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 133 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 134 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 135 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 136 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 137 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 138 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 139 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 140 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 141 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 142 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 143 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 27.3

4. Now create another table named as “DEPARTMENT” in the same database.

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.

2020-2023 144 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 27.6

#S TO CREATE FORMS FOR “EMPLOYEE” TABLE.

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

2020-2023 145 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

2. A dialogue box will appear.

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.

2020-2023 146 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 27.11

5. Another dialogue box will appear, click on “Next”.

Fig 27.12

6. Another dialogue box will appear, write the suitable title for your form and then click on
“Finish”.

2020-2023 147 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 27.13

7. The form will be created as shown below.

Fig 27.14

8. For editing the form, right click on the “VIEW” button and then select “Layout View”.

2020-2023 148 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 149 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 150 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 151 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 152 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 153 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 154 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 155 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 156 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 157 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 158 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 159 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 160 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 161 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 27.43
3. The form can be edited in the “Layout View” as shown below.

Fig 27.44

2020-2023 162 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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,

2020-2023 163 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 28.3

4. Now go to “Create” ribbon and then select “Form Design”.

Fig 28.4

5. The following window will appear.

Fig 28.5

6. In the “Design” ribbon, select “Add existing fields”.

2020-2023 164 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 165 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 166 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 167 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 168 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 28.15

15. To check whether it is working or not, go to “Form View” as shown below.

Fig 28.16

16. Now go to the design view and edit the form as shown below.

2020-2023 169 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 170 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 171 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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”.

2020-2023 172 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 28.23

23. The “Go To First Record” button will appear now.

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”.

2020-2023 173 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

27. The “Go To Last Record” button will appear now.

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”.

2020-2023 174 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 175 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

31. The “Go To Previous Record” button will appear now.

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

2020-2023 176 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

34. Another dialogue box will appear, give a suitable name to your button to save it and then
click on “Finish”.

Fig 28.35

35. The “Go To Next Record” button will appear now.

Fig 28.36

36. The form will look like shown below in the design view,

2020-2023 177 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 28.37

37. Now go to the “Form View”.

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

39. Example of a record.

2020-2023 178 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 28.40

2020-2023 179 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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:

 Student name, course name and marks.


 Provide a suitable title to the report which should be right aligned with a suitable logo
and date and time at the extreme right of the report.
 In the current report add another column as R_NO
 The report should be grouped according to the course name.
Create a report as ATTENDANCE_REPORT using reports in MS-ACCESS.

STEP :
1. Create a database named as RESULT_MANAGEMENT.

Fig 29.1

2. Name the table as Student_Details.

2020-2023 180 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 181 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

5. Enter 5 records in the table.

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.

2020-2023 182 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 183 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

2020-2023 184 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

15. Now, go to the Report View, the final output is as follows.

Fig 29.15

2020-2023 185 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -30


Ques. Create a database named as PAYROLL_MANAGEMENT with the following table
and the fields.

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:

 Emp_no, Employee Name, Department, Designation and Salary.


 Provide a suitable title to the report which should be right aligned with a suitable logo
and date and time at the extreme right of the report.
The report should be grouped according to the department.

STEP :

1. Create a database named as PAYROLL_MANAGEMENT.

Fig 30.1

2. Name the table as Employee.

2020-2023 186 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.”

2020-2023 187 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

Fig 30.4

5. Enter 5 records in the table.

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.

2020-2023 188 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 189 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 190 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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

2020-2023 191 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

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.

15. Now, go to the Report View, the final output is as follows.

Fig 30.14

PRACTICAL NO. -31

ER Diagram for E-commerce Website Who sells product online

SOLUTION.-

2020-2023 192 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

2020-2023 193 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -32

ER Diagram for University Management system.

SOLUTION.-

Fig.31.1

2020-2023 194 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -33

ER Diagram for Airlines Reservation system.

SOLUTION.-

Fig.33.1

2020-2023 195 B.Com (H) (M)


Yash kumar 05013788820 ISM Practical File

PRACTICAL NO. -34

ER Diagram for Library management system.

SOLUTION.-

2020-2023 196 B.Com (H) (M)

You might also like