Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ism Practical File Nothing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 84

lOMoARcPSD|20475450

ISM Practical FILE - NOTHING

Bachelor of Business Administration (Indraprastha Institute of Information Technology,


Delhi)

Studocu is not sponsored or endorsed by any college or university


Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)
lOMoARcPSD|20475450

Practical File on

Information Systems Management Lab


(ISM-LAB)

Bachelor of Business Administration (BBA -212)

Guru Gobind Singh Indraprastha University, Delhi

Submitted To: Submitted By:


Ms. Ankita Gupta Enrolment No. :
(Assistant Professor-IT) Name:
Mr. Rajeev Pathak Class: Bca
(Assistant Professor-IT)

Institute of Information Technology & Management


New Delhi – 1100 58
Batch (2019-2022)

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

INDEX

S.No. Practical Date Sign

1. Define Data, Information, Database, DBMS and 28/01/22


RDBMS. Also describe Features of SQL.
2. Give steps to Open Microsoft Access. Write steps to 28/01/22
create a database. What are the various
elements/objects of a database? What are the various
ways to create tables in database?
3. Give the steps to create table in design view and 28/01/22
datasheet view. Also Give the steps to open an
existing database.
4. Explain Field Name, Data Types, Field Size with its 28/01/22
Description.
5. Various data types in Database. Create a student 28/01/22
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 data sheet view as
STUDENT_COURSE with the field name as
 ID
 COURSE CODE
 COURSE NAME.
Insert at least 5 records using the design view in MS
ACCESS.

6. Create an employee database with the following 04/02/22


fields as:
 Emp_code
 Emp_ssn
 Emp_name
 DOB
 Emp_design
 DOJ
 E_sal
 Years of experience.
For the above created database set the following field
properties:
a) Employee name should be in upper case with
field size equal to 10.
b) Set the default value of Emp_dept as
Manager.
c) Date of joining should be set to the current
date by default.
d) E_sal should be in dollars.

7. Create a database named EMPLOYEE with the 04/02/22


following fields as EMPLOYEE NAME,
2

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

EMPLOYEE CODE, EMPLOYEE DESIGNATION,


EMPLOYEE DEPARTMENT, DATE OF JOINING
and YEAR OF
EXPERIENCE. Delete any two records as well as
fields from the table to show the output.
8. Create a local template of “FACULTY”, insert 5 04/02/22
records and perform the following queries on faculty
template table:

a.Insert five records using “new faculty” tab in


faculty template.
b. Faculty name should be in ascending order.
c. Department should be in descending order
d. Generate report for: All faculty category and
faculty by department category.

9. Create a table as STUDENT_DETAILS with 11/02/22


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.
S_dob should be less than the current date. Enter at
least 10 entries in the table.
10. Create an EMPOYEE database with the 11/02/22
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.
11. Create a database named as STUDENT 11/02/22
DATABASE . With a table
STUDENT_DETAILS with the fields as:
 Stu_id
 St_name
 St_age
 St_dob
 St_roll
 St_course
 St_add
 St_contact
Add at least 10 records in the table. Answer the
3

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

following:
a) What is primary key? Make a field
stu_roll as the primary key in the table.
Also write down the steps for the same.
b) What is a composite key? In the table
student_details make stu_rollno and
stu_dob as a composite key. Also write
the steps for the same.

12. Write steps to put password on the 18/02/22


database and convert it into the required
format.

13. 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.
14. Explain in brief about the query object in 18/02/22
MS-ACCESS 2007. Write steps to
execute queries using the Query Wizard.
Create an ACCOUNT table with the
following fields:
 Acc_no
 Acc_type
 DO_opening
 Transaction_type
 Balance
 Account_H_name
 Transaction_ID
Enter 15 records in the table and perform
the following queries on it:
1. Display the Acc_no in ascending
order.
2. Display the details of where
Acc_no is 1114 and name
Deepanshu.
3. Display the Acc_no, Acc_type,
Account_H_name and blance is
less than 10,000.

15. Create a table named as STUDENT with 18/02/22


the following fields as:
 S_no
 Name
 City
 Age
 Marks
Execute the following queries after

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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.

16. Create a table named as STUDENT_MARKS 25/02/22


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.
17. Create a table Student with following fields 25/02/22
 Enrolment_no
 S_name
 Course_id
 Batch
 Semester
Execute the following queries after entering 10
records in the table.
 Display the list of Students in
batch ‘2017-2020’
 Display the Enrolment_no of
fourth semester students.
 Display the list of students of
batch ‘2019-2022’ and course_is
17.
 Display the number of students in
course_id 44.
18. Create the following table CUSTOMER having 04/03/22
the columns, data types.
Field Name Data Type
Customer_ID Number
Customer_Name Text
5

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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 Victoria.
 Show detail of the customer who lives in
Sweden.
 Count customers who live in Sweden.
 Count the customer having designation as
owner.
19. Create a table employee with the following fields: 04/03/22
Emp_id
Emp_name
Contact no.
Gender
Salary
Emp_grade
Designation
Address
Execute the following queries on the table created:
a. Display the details of the employees
b. Display the employee id of employee whose
name is supriya.
c. Display the name of the employee whose
contact no. is 98454863011.
d. Display the details of the employee whose
address is D-29, IITM, JANAKPURI.
e. Display the name of the employees whose
salary is greater than 10,000.
f. Update the employee details, set
EMP_GRADE equal to C whose salary is less
than 10000.
g. Delete the record of the employee whose
gender is male and designation is manager
h. Display the name, designation, and salary of
all the employees whose names begins with A.
i. Update the employee details; set designation to
assistant manger where designation is trainee.
20. Create a table EMPLOYEE either the following 11/03/2022
fields:
 Emp_id
 Emp_name
 Dept_name
 Salary
 Add
 Date of joining
Perform the following queries on it.
1. Display the dept_name and total salary of
6

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

employees department wise where salary is


greater than 40,000.
2. Delete the records of the employee whose
Emp_id is 101
3. Delete the record of the employees whose
Dept_name is HR and salary >10000
4. Delete the record of the employee whose
name begins with S or salary >10000
5. Update the record of the employees, set
Dept_name = IT where Dept_name is
PRODUCTION.
6. Update the record of the employee, set
salary to 15000 where Dept_name is IT.

21. Create a table employee with the following 11/03/2022


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.
22. Create a company database with the following 01/04/2022
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 both the fields.
Establish a relationship between the table
EMP- DETAILS AND DEPT_DETAILS AS
1:1, 1:M and M:1. Also enforce referential
integrity constraint on it and write down the
steps for the same.
23. 23 Create a table named as BBA_M1 with the 01/04/2022
following fields:
 E_no
 Student name
 Address
7

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 Phone no
 Grade
Now create another table named as BBA_M2
with the same fields. Add at least 10 records to the
table BBA_M1 (with first 10 enrollment no’s and
BBA_M2 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 BBA_M1
 Append the A grade holders from
BBA_M2 to the newly created table in the
above query.

24. 24 Create two tables EMPLOYEE and DEPARTMENT 22/04/22


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.

25. 25 Create a table named STUDENT_DETAILS 22/04/22


with the following fields:
 R_no
 Name
 Course name
 Attendance
 Dob
 Address
Course will have values either ISM or FMI. 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
Also add a label student form to it.
26. Create 2 tables as EMPLOYEE and DEPARTMENT 08.04.22
with the following table structure. Employee should
have the following fields:
 F_name
 L_name
 E_id
8

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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

27. Create an ER Diagram for Student Management 08.04.22


System.
28. Create an ER Diagram for Airlines Reservation 08.04.22
system.
29. Create an ER Diagram for Employee Management 08.04.22
System.
30. Create an ER Diagram for Library Management 08.04.22
System.

PRACTICAL NO.-1

Define Data, Information, Database, DBMS and RDBMS. Also describe Features of
SQL.

Data: Computer data is information processed or stored by a computer. This information


may be in the form of text documents, images, audio clips, software programs, or other types

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

of data. Computer data may be processed by the computer's CPU and is stored
in files and folders on the computer's hard disk.
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
Database: A database is an organized collection of structured information, or data, typically
stored electronically in a computer system. A database is usually controlled by a database
management system (DBMS). Together, the data and the DBMS, along with the applications
that are associated with them, are referred to as a database system, often shortened to just
database.
DBMS: Database Management System (DBMS) is a software for storing and retrieving
users’ data while considering appropriate security measures. It consists of a group of
programs which manipulate the database. The DBMS accepts the request for data from an
application and instructs the operating system to provide the specific data. In large systems, a
DBMS helps users and other third-party software to store and retrieve data.

RDBMS: RDBMS is an acronym for Relational Database Management System and is a type
of database management system that stores data in a structured format
using rows and columns, making it easy to locate and access data in relation to another piece
of data in the database. While a relational database describes the type of database, a RDBMS
refers to the database software itself. It executes the queries on the data including adding,
updating, and searching for values. It can also provide a visual representation of data.

SQL

SQL is a language to operate databases; it includes database creation, deletion, fetching


rows, modifying rows, etc. SQL is an ANSI (American National Standards Institute)
standard language, but there are many different versions of the SQL language.

SQL FEATURES

o SQL is easy to learn.


o SQL is used to access data from relational database management systems.
o SQL can execute queries against the database.
o SQL is used to describe the data.
o SQL is used to define the data in the database and manipulate it when needed.
o SQL is used to create and drop the database and table.
o SQL is used to create a view, stored procedure, function in a database.
o SQL allows users to set permissions on tables, procedures, and views.
10

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-2

Give steps to Open Microsoft Access. Write steps to create a database. What are the
various elements/objects of a database? What are the various ways to create tables
in database?

SOLUTION:

11

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

To open the MS Access-

1. Go to search option and type “Access”.


2. An option list will appear. Select the Microsoft Office Access option.

3. Access will open, give the name to the database and select “create” option.
4. Now you can enter data.

Three ways to create Access 2007/2010 database:


 Way 1: Create Access database with templates
 Way 2: Create a blank Access database with “Blank database” or “Blank Web
database” command
 Way 3: Import existing data into Microsoft Access and save as Access database

12

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-3

Give the steps to create table in design view and datasheet view. Also Give the steps to
open an existing database.

Solution: -

To create the table in design view-


1. Save the table, by right click on “Table1” and selecting save option

2. Right click again and select the “design view” option.

3. Fill in the Field Name and choose the appropriate Data Type.

4. After entering the Fields, right click and select “Datasheet view” option.

5. The table has been created, now enter the data.

13

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

To open the existing database-


1. Go to Office button and select “Open” option.

2. A box will appear, select the file or type the name of the database and click
‘Open’.
3. Your existing file will open.

14

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-4

Explain Field Name, Data Types, Field Size with its Description.

Field Name
A field in Microsoft Access is a piece of information related to a single person or thing. Related fields are
grouped together to form a record. In a database, where information regarding a company's employee
information is stored, a record would be the information related to a single employee.
Data Type
A field's data type determines what kind of data it can store. MS Access supports different types of data,
each with a specific purpose. The data type determines the kind of the values that users can store in any
given field. Each field can store data consisting of only a single data type.

15

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Field Size
For number fields, the field size determines exactly how much disk space Access uses for each value of
the field. For text fields, the field size determines the maximum amount of disk space that Access allows for
each value of the field.
Description
You can use the Description property to provide information about objects contained in the Database
window as well as about individual table or query fields. For individual table or query fields, enter the field
description in the upper portion of table Design view or in the Field Properties property sheet in the Query
window. The maximum length is 255 characters

PRACTICAL NO.-5

Various data types in Database. Create a student database with a table


STUDENT_DETAILS containing the field name as
ID
FIRST NAME
LAST NAME
AGE
16

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

ADDRESS
Insert 5 records using the design view in MS- ACCESS.

Solution:-

Steps

1. Save the table and go to design view.

2. Enter the field name with appropriate data type.

3. Save the table and go to datasheet view.


4. Now enter the required data.

Create another table using data sheet view as STUDENT_COURSE with the field
name as
ID
COURSE CODE
COURSE NAME.
Insert at least 5 records using the design view in MS ACCESS.
Solution:-

17

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Steps

1. Save the table as “STUDENT_COURSE”

2. Double click on the field name to enter the field.

3. Now enter the required data in table.

18

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-6

Create an employee database with the following fields as:


 Emp_code
 Emp_ssn
 Emp_name
 DOB
 Emp_design
 DOJ
 E_sal
 Years of experience.

For the above created database set the following field properties:
a. Employee name should be in upper case with field size equal to 10.
Steps
1. Select the Field you want to modify. Field Properties will appear.

2. Go to Field size and enter 10 to set number of characters.


3. Further go to Input Mask and write ‘>’ to change all characters into uppercase
and save the table.

19

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

b. Set the default value of Emp_dept as Manager.


Steps
1. Select the Field you want to modify. Field Properties will appear.

2. Go to Default value in Field Properties.


3. Write ‘Manager’ and enter tab button and save the table.

c. Date of joining should be set to the current date by default.


Steps
1. Select the Field you want to modify. Field Properties will appear.

2. Go to Default value in Field Properties.

20

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Write the ‘=Date()’ function to set the default date as current date.
4. Save the table.

d. E_sal should be in euros.


Steps
1. Select the Field you want to modify. Field Properties will appear.

2. Go to Format option in Field Properties and list down the option.


3. Select the ‘Euro’ option and save the table.
4. Now your currency is saved default in Euros.

21

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-7

Create a database named EMPLOYEE with the following fields as


EMPLOYEENAME, EMPLOYEE CODE, EMPLOYEE DESIGNATION,
EMPLOYEE DEPARTMENT, DATE OF JOINING and YEAR OF EXPERIENCE.
Delete any two records as well as fields from the table to show the output.

Solution:-

Steps

1. Save the table as ‘EMPLOYEE’ and go to design view.


22

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

2. Enter the Field Names and save the table.

3. Go to datasheet view and fill in the required details.

Delete the 2 records

There are 2 ways to delete the records in the table

1. By Design View

Steps

1. Go to Design view option.


2. Select the Field you want to delete.

23

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Go to ‘Design’ option in the Menu Bar and click on Delete Row option.

2. By Datasheet view

Steps

1. Select the column you want to delete in Datasheet view.

2. Right click the mouse button.


3. Select the option of ‘Delete column’.

24

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-8

Create a local template of “FACULTY”, insert 5 records and perform the following
queries on faculty template table:

Steps
1. Open MS Office Access and go to Local Templates.

2. Choose the Faculty Template and create the table.

25

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

a. Insert five records using “new faculty” tab in faculty template.

Steps
1. Go to Design view and enter Field Names.
2. Go to datasheet view and click on ‘New Faculty’ in Menu Bar. A box will appear.

3. Fill in the details to make entries and save the table.

26

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

b. Faculty name should be in ascending order.

Steps
1. Select the column you want to modify.
2. Right click on mouse button, a list will appear.
3. Select ‘Sort A to Z’ option for ascending order.

c. Department should be in descending order

27

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Steps
1. Select the column you want to modify.
2. Right click on mouse button, a list will appear.
3. Select ‘Sort Z to A’ option for descending order.

d. Generate report for: All faculty category and faculty by department category.

Steps
1. Go to ‘Reports’ option in the Menu bar.
2. Select the list-down option.
3. Select the “All Faculty” option to make report on all faculty.
28

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Steps
1. Go to ‘Reports’ option in the Menu bar.
2. Select the list-down option.
3. Select the “Faculty by Department” option to make report on all faculty.

PRACTICAL NO.-9

Create a table as STUDENT_DETAILS with the following fields


 S_id
 S_name
 S_course
 S_marks
 S_dob
S_dob should be less than the current date. Enter at least 10 entries in the table.
29

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Make S_id as the primary key and apply the following validations:
Steps
1. Select the field you want to add primary key.

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


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

4. Now your field got the primary key.

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


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

30

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 Go to Validation Rule in Field Properties.


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

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

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


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

 Go to Validation rule in Field Properties.


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

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

31

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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


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

 Go to Validation rule in Field Properties.


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

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

PRACTICAL NO.- 10

Create an EMPOYEE database with the following fields as:


 Emp_code
 Emp_ssn
32

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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

Solution:

Steps

1. Save the table as “EMPLOYEE”, then go to Design view and set Field names.
2. Select the Field you want to modify. Field Properties will appear.

3. Go to ‘Input Mask’ and click on the three dots inside Input Mask. A box will appear.

33

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

4. Select the ‘Short Date’ option and click Next, then finish the process.

5. Now save the table and enter the data in Datasheet view.
6. Inputs will display as in the same format as you chose in setting Input Mask.
7. Repeat the same process with another Field.

34

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL N0.- 11

Create a database named as STUDENT DATABASE. With a table


STUDENT_DETAILS with the fields as:
 Stu_id
 St_name
 St_age
 St_dob
 St_roll
35

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 St_course
 St_add
 St_contact
Add at least 10 records in the table.

A. What is primary key? Make a field stu_roll as the primary key in the table. Also
write down the steps for the same.
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.
Steps
 Select the field you want to add primary key.

 Go to ‘Design’ option in Menu bar.


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

 Now your field got the primary key.

36

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

B. What is a composite key? In the table student details make stu_rollno and stu_dob
as a composite key. Also write the steps for the same.
A composite key is made by the combination of two or more columns in a table that can
be used to uniquely identify each row in the table when the columns are combined
uniqueness of a row is guaranteed, but when it is taken individually it does not guarantee
uniqueness, or it can also be understood as a primary key made by the combination of
two or more attributes to uniquely identify every row in a table.

Steps
 Select the fields you want to add the composite key.

 Go to ‘Design’ option in Menu bar.


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

 Now your field got the primary key.

37

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

38

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-12

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

Steps

1. Go to office button and open the file.

2. Select the file, then click on list down and select ‘Open Exclusive’ option.

3. Go to Database Tools in the Menu Bar.


4. Click on ‘Encrypt with Password’ option. A dialogue box will appear.

39

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

5. Write down the password you want to set under password and verify and click OK to
set the password.

6. Now whenever you will open the file, you have to enter the password first.

To remove the password

Steps

1. Go to Database Tools and click on ‘Decrypt Database’ option.

2. A dialogue box will appear, you have to write the password you have already set and
click OK.
40

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Now, your password is removed.

41

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.-13

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.

Solution

Steps

1. Select the Field you want to apply input mask. Field Properties will appear.

2. Go to Input Mask in Field Properties and click on three dots. A dialogue box will
appear.

42

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Select the format you want to set and click NEXT.

4. You can see the format in which your data will appear, click NEXT and then FINISH.

5. Your Input Mask is set.


6. Repeat the process with EMP_DOB also.

43

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

PRACTICAL NO.- 14

Explain in brief about the query object in MS-ACCESS 2007. Write steps to
execute queries using the Query Wizard. Create an ACCOUNT table with
the following fields:
 Acc_no
 Acc_type
 DO_opening
 Transaction_type
 Balance
 Account_H_name
 Transaction_ID
Enter 15 records in the table and perform the following queries on it:

Display the Acc_no in ascending order.

44

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Steps
1. Go to Create tab in Menu Bar and select ‘Query Wizard’.

2. A dialogue box will appear, select ‘simple query wizard’ and click OK.

3. We only need ‘ACC_NO’ so we will drag it and click NEXT.

45

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

4. Further, select ‘Modify the query design’ and click FINISH.

5. A new Field Properties will appear.


6. Select the Field as ACC_NO, list down in Sort By option and select ascending
option and run the changes.

46

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Display the details of where Acc_no is 92682794 and name Nandita.

Steps
1. Go to Query Wizard option in Create tab.

2. Drag all Fields.

47

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. In Field Properties, go to ACC_NO and type the number of account in criteria


section.
4. Now, go to ACC_HNAME and type the name of the holder and run it.

Display the Acc_no, Acc_type, Account_H_name and balance are less than
10,000.

Steps
1. Go to Query Wizard option in Create Tab.
48

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

2. Drag the ACC_NO, ACC_TYPE, ACC_HNAME and BALANCE and click


NEXT.

3. Type the ‘<10000’ in criteria section in Balance Field and run it.

PRACTICAL NO.- 15

Create a table named as STUDENT with the following fields as:


 S_no
 Name
 City
 Age
 Marks
Execute the following queries after entering 10 records in the table.

49

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 Display all the details of the given table

Steps
1. Go to Query Wizard in the Create Tab.

2. A dialogue box will appear, select ‘simple query wizard’ and click
OK.

50

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Drag all Fields and click NEXT.

4. Click FINISH to display the final result.

 Display the names in alphabetical order.

Steps
1. Go to Query Wizard option in Create Tab.
51

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

3. Drag Name and Marks Fields and click NEXT.

4. Click FINISH to modify the changes.

52

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

5. Go to Field Properties, list down the Sort section under Name head,
select Ascending order and run it.

 Display the name along with the marks where marks are greater than
60

Steps
1. Go to Query Wizard option in Create Tab.

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

53

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Drag Name and Marks Fields and click NEXT.

4. Click FINISH to modify the changes.

5. Field Properties will appear, select the Marks column and go to criteria.
6. Write ‘>60’ to show marks greater than 60 and run it.

54

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 Display the name of students whose name starts with letter ‘A’.

Steps
1. Go to Create Wizard option in Create Tab.

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

3. Drag the Name Field and click NEXT.

4. Finish to modify the query design.

55

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

5. Go under Name head and write “Like ‘A*’” in Criteria Section to


display names starting with A.

 Display the details of students who live in ‘Delhi’.

Steps
1. Go to Create Wizard option in Create Tab.

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

56

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Drag all Fields, click NEXT and then Finish to modify the table.

4. Go to Field Properties, write ‘Delhi’ in Criteria under City head and run
it.

 Display the details of students who are older than 10 years.

Steps
1. Go to Create Wizard option in Create Tab.

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

57

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Drag all Fields, click NEXT and then Finish to modify the table.

4. Go to Field Properties, write ‘>10’ in Criteria under Age head and run it.

Practical-16

Create a table named as STUDENT_MARKS with the following fields as:


 S_no
58

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 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

Steps
1. Go to Create Wizard option in Create Tab.

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

3. Drag all Fields, click NEXT and then Finish to modify the table.

59

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

4. Go to Field Properties, write ‘<70’ in Criteria under Marks head, ‘Like


“L*A” in Name head and run it.

 Display the name and S_no of those students who have scored marks
equal to 95

Steps

1. Go to Create Wizard option in Create Tab.

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

60

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

3. Drag all Fields, click NEXT and then Finish to modify the table.

4. Go to Field Properties, write ‘>10’ in Criteria under Age head and run it.

 Display the names and marks of all those students who have scored marks
between 75 and 90.

Steps

1. Go to Create Wizard option in Create Tab.

61

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

2. A dialogue box will appear, select ‘Simple Query Wizard’ and click
NEXT.

3. Drag all Fields, click NEXT and then Finish to modify the table.

4. Go to Field Properties, write ‘between 75 and 90’ in Criteria under


Marks head and run it.

62

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practical-17

Create a table Student with following fields


 Enrolment_no
 S_name
 Course_id
 Batch
 Semester

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


 Display the list of Students in batch ‘2017-2020’

 Display the Enrolment_no of fourth semester students.

 Display the list of students of batch ‘2019-2022’ and


course_is 17.
63

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 Display the number of students in course_id 44.

Practical-18
64

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Create the following table CUSTOMER having the columns, data types.
Field Name Data Type
Customer_ID Number
Customer_Name Text
Designation Text
City Text
CountryText
Phone Number

Insert the data into table Customer. And apply the queries:
 Display customer details having designation Sales Representative.

 Show details of the customer whose name is Victoria.

 Show detail of the customer who lives in Sweden.

 Count the customer having designation as Owner.

Practical-19

65

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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:


a. Display the details of the employees

b. Display the employee id of employee whose name is supriya.

c. Display the name of the employee whose contact no. is 98454863011.

66

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

d. Display the details of the employee whose address is D-29, IITM, JANAKPURI.

e. Display the name of the employees whose salary is greater than 10,000.

f. Update the employee details, set EMP_GRADE equal to C whose salary is less
than 10000.

g. Delete the record of the employee whose gender is male and designation is
manager.

h. Display the name, designation, and salary of all the employees whose names
begins with A.

67

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

i. Update the employee details; set designation to assistant manger where


designation is trainee.

Practical-20
Create a table EMPLOYEE either the following fields:
 Emp_id
 Emp_name
 Dept_name
 Salary
 Add
68

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 Date of joining

Perform the following queries on it.


1. Display the dept_name and total salary of employees department wise
where salary is greater than 40,000.

2. Delete the records of the employee whose Emp_id is 101

3. Delete the record of the employees whose Dept_name is HR and salary


>10000

4. Delete the record of the employee whose name begins with S or salary
>10000
69

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

5. Update the record of the employees, set Dept_name = IT where Dept_name


is PRODUCTION.

6. Update the record of the employee, set salary to 15000 where Dept_name is
IT.

Practical-21

Create a table employee with the following fields:


 Emp_id
 Emp_name
 Dept_name
 Salary
 Address
 Dob

70

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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

SQL

2. Find the details of the employee working in the same dept.

3. Find employee id, emp-name of the employee having same dob

Practical-22

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:
71

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 DEPT_ID
 DEPT_NAME
 DEPT_LOCATION
Also create a table as PROJECTS with fields as:
 P_ID
 P_NAME
Designate primary key in both the fields. Establish a relationship between the
table EMP- DETAILS AND DEPT_DETAILS AS 1:1, 1:M and M:1. Also
enforce referential integrity constraint on it and write down the steps for the
same.

Steps
 Go to database tools in the Menu bar.

 Select Relationship option

72

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 A dialogue box will appear, select all tables and click Add.

 Go to Edit Relation option

 A dialogue box will appear, click on create new and list down the tables you
want.

73

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

One-to-One Relationship

One-to-Many Relationship

74

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practial-23

Create a table named as BBA_E1 with the following fields:


 E_no
 Student name
 Address
 Phone no
 Grade
Now create another table named as BBA_E2 with the same fields. Add at least 10
records to the table BBA_E1 (with first 10 enrollment no’s and BBA_E2 with next
10 e_no) and then perform the following queries on it.

E1

E2

75

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

1. Create a make table query which contains the A grade students from
BBA_E1.

2. Append the A grade holders from BBA_E2 to the newly created table in the
above query.

76

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practical-24
Create two tables 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
 In the “Create” ribbon, in the forms group, click on “More Forms”
option and then select “FORM WIZARD”.

77

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

 A dialogue box will appear.

 Transfer all the “Available fields” to the “Selected fields” column and
then click on “Next”.

 Another dialogue box will appear, select “Tabular” for the form to
appear in tabular form. And then click on Next.

78

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

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

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

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

79

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practical-27

Create an ER Diagram for Student Management System.

Roll No Name Grade Cid CName Duration

Enroll
Student Course

Has

Password
User id

Login

80

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practical-28
Create an ER Diagram for Airlines Reservation system.

Flight Distance()

From To

Country Airport Code

Coordinates
Location

81

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practical-29

Create an ER Diagram for Employee Management System.


Name Description

Email
Has Department

Phone Employee

Has Role
Name

Has

Name Description

Username

Login

Password

82

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Practical-30
Create an ER Diagram for Library Management System.

User id Password
Book id

Book Name

Login Book Author

Has

Member Name
Member id Borrow

Member

83

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)

You might also like