You are on page 1of 39

A

PRATICAL FILE

ON

“DATABASE MANAGEMENT SYSTEM”

Submitted to: Dr. Aanad Submitted by: Dilpreet Kaur

Roll No. : 35496701716

Kamal Institute Of Higher Education and Advanced Technology

K-1 Extension, Mohan Garden,

New Delhi-110059

Batch (2016-2019)
PROJECT
ON
MICROSOFT
ACCESS
2007
INDEX
EXP NO. TOPIC PAGE NO. DATE SIGNATURE

1 Introduction 1-2
to Ms access

2 To create a 3-6
database

3 Inserting the 7-11


tables and
records

4 Data types 12-14

5 Primary key 15-18

6 Foreign key 19-23

7 Creating 24-30
forms

8 Creating 31-36
reports
EXPERIMENT
NO.1
INTRODUCTION TO MS
ACCESS

Page 1
INTRODUCTION

Microsoft access is a database software package. A database is an organised


collection of records. Telephone and address books are examples of paper
database. With access, to organise the students who attend a school, the
course they take, and the instructors who teach them. After you create an
access database, you can search it, manipulate it, and extract information from
it. This lesson introduces you to access windows and teaches you how to
create a database.

Getting Started with MS access the first screen:

Page 2
EXPERIMENT
NO.2
TO CREATE
A DATABASE

Page 3
CREATE A DATABASE
When you start access, the getting started with Microsoft access screen
appears. You can use this screen to create a database. Within a database, you
can do such things as enter data, create report, and retrieve data. You can
create a blank database or you can use one of the templates provided by enter
data, reports you can use to retrieve data, and more. You can modify the
forms, reports, and other objects to suit your needs.

Page 4
How do I open an existing database?

1. Click the office button. A menu appears.


2. Click open.
3. Locate the folder in which you stored database.
4. Click the database name.
5. Click open. Access opens the database.

Page 5
Page 6
EXPERIMENT
NO.3
Inserting the tables
And
Records

Page 7
Creating Microsoft access tables
Tables are the foundation of an access database, Access stores data in tables.
This lesson teaches you how to create tables, add fields to tables, assign data
types to fields, and set field properties.

Understanding tables

A table is asset of rows and columns. Each column is called a field. Within a
table, beach field must be given a name and no two fields can have the same
name. Each value in a field represents a single category of data. Each row in a
table called record.

To add fields to a table:


1. Right click the add new field column label. A menu appears.
2. Click rename column.
3. Type the field name.
4. Press enter. Access creates the field.
5. Type the next field name. Access creates the field. Continue until you
have created until you have created all of the fields in your table.

Page 8
Page 9
Name and save the table
After you create a table, we must name and save it.

To name and save a table:

1. Click the save button on the quick access toolbar. The save as dialog
box appears.
2. Type the name you want to give your table.
3. Click ok. Access names your table.

Page 10
The record is inserted in the table with the fields:
 Roll no
 Name
 Course
 Address
 Phone

Page 11
EXPERIMENT
NO.4
Data Types

Page 12
UNDERSTANDING THE DATA TYPES
In access we can use data types to specify the type of data each field can capture. A field
with a data type of text can store alphabetic characters and numbers. Generally speaking,
you cannot perform mathematical calculations by using a text field. For example, you can
use a text field to store a street address. Unless you do some manipulation, you cannot use
the numbers in the street address in mathematical calculations.

DATA TYPE USE NOTES


Text Alphanumeric data. Use for
text and for numbers that
are not used in mathematical
calculation. Use for names,
addresses, and other
relatively short pieces of
text. Can store up to 255
characters.
Memo Long text. Use for long
pieces of text, such as notes
and long descriptions. Can
store up to 64000
characters.
Number Numeric data. Use for If you are working with
numbers you want to use in currency, use the currency
mathematical calculations. type.
Date/time Use for dates and times.
Currency Use for currency. Prevents rounding during.
Auto number Unique sequential numbers
or random numbers
automatically inserted when
you create a record. Use to
create a primary key.
Yes/no Logical data. Use when only
one of two values is valid.
Yes/no, true/false,
Hyperlink Use to store hyperlinks.
Attachment Use to store attachments.
OLE object Use to attach an OLE object
such as a word document,
excel spread sheet, or power
point presentation.

Page 13
After you create the fields for a table, you can enter data by typing in each field. As you
type, access assigns a data type to each field based on your entry.

Sample entry Data type assigned


Shiva Text
http:/www.website.com Hyperlink
10000 Number, long integer
10,000 Number, long integer
10,000.99 Number, double
10000.99 Number, double
01/01/2009 Date/time
January1,2009 Date/time
12:10:33 Date/time
12:30am Date/time
16:50 Date/time
100.50 Number, double
25.00% Number, double
1.23E+02

Page 14
EXPERIMENT
NO.5
Primary key

Page 15
Primary key
A primary key is a candidate key which shows three properties:

 Uniqueness
 Irreducibility
 Not null
E.g. in student table:
Roll no (primary key) Name Class

Roll no is an attribute to whom we assign the primary key because it shows the
property of uniqueness.
It is not possible that two students have the same roll no i.e. why it is unique and not
null because every student have their own roll no.

For designing the primary key:

 Firstly click on the table and select the design view.


 The screen will appear.
 Select the field in which we want to apply primary key.

 Click on button
 The primary key will apply.

Page 16
THE PRIMARY KEY INSERTED IN ROLL NO FIELD

Page 17
PRIMARY KEY CANNOT CONTAIN DUPLICATE VALUES

PRIMARY KEY DOES NOT CONTAIN NULL VALUES

Page 18
EXPERIMENT
NO.6
Foreign key

Page 19
Foreign key
Foreign Keys are the attributes of a table, which refers to the primary key of
some another table.

Foreign Keys permit only those values, which appears in the primary key of the
table to which it refers or may be null. Foreign keys are used to link together
two or more different tables which have some form of relationship with each
other.

For EXAMPLE, consider a database with two tables:

A TABLE 1 that includes all students’ data and RECORD table that includes all
student information. Suppose we require the name, address, marks and
subject of the student. We need to join both the table in order to get the
record of the table. Roll no of first table is Primary key and also the foreign key
of another table.

Page 20
Creating foreign key
You can use a query to view a subset of your data or to answer questions
about your data. A query can be based on tables or on other queries. To create
a query, you open the tables or queries on which you are going to base your
query in design view, and then use the options in design view to create your
query. You then click the run button to display the results. You can save
queries for later use.

To open tables in design view:

Page 21
1.Activate the create tab.
2.click the query design button in the other group. The show tables
dialog box appears
3.Activate the tables tab if you want to base your query on
tables,activate the queries tab if you want base your queryb on queries
or activates the both tab if you want to base query on both tables and
queries.
4. click to choose table or query on which you want to base your query.
5.click add. The table appears in the window.
a.click to choose the next table or query on which you want to base your
query.
b.continue clicking tables or queries until you have all the tables and
queries you plan to use.
6.click close. Access changes to query design view.

 Now drag the the attribute ROLL NO oftable1 towarde table 3


 As soon as you leave the cursor, a dialog box open as EDIT
RELATIONSHIP.
 Click on ENFORCE REFERENTIAL INTEGRITY and then click on
CREATE

Page 22
A dialog box opens which says that the database engine could not lock
table 3 as it is already in use by other person or process.

It shows one to one relantionship.

Page 23
EXPERIMENT
NO.7
Creating forms

Page 24
Creating forms
 We can create forms by clicking on more forms in create tab.
 Then click on form wizard.

 Select all the fields.


 Click on next.

Page 25
 Choose the layout

1. Columnar
2. Tabular
3. Datasheet
4. Justified
 Choose the style.
 Name it and click on finish.

Page 26
Page 27
Selection

We can select thatform according to given condition. For e.g. if we want that
form whose id is less then equals to 12 then for that we use selections from
home tab.

Page 28
It will show the record which is less than equal to 12.

Page 29
This shows that we have 6 records which are less than equal to ID 12.

 We can add new record with the help of in home tab.


 We can also delete the record with the help of in home
tab.
 We can also save the record with the help of in home tab.
 We can find the record with the help of replace in home
tab.

It will highlight the record which we want to find.

Page 30
EXPERIMENT
NO.8
Creating
Reports

Page 31
REPORT
A report is an effective way to present your data in a printed format. You can
display or print the information in the way you want to have it.

Reports organize and summarize data for viewing online or for printing. A
detail report displays all of the selected records. You can include summary data
such as totals, counts, and percentages in a detail report.

A summary report does not list the selected records but instead summarizes
the data and presents totals, counts, percentages, or other summary data only.
Access has several report generation tools that you can use to create both
detail and summary reports quickly.

Page 32
CREATING REPORTS
 Click on create
 Click on report wizard on quick access
toolbar.

 A dialog box opens. Select the fields you want in your appear from
available fields. Then click on NEXT.

Page 33
 Select the sort order you want for your detail records ascending or
descending. Click NEXT.

 Select the type of layout you want. Click NEXT.

Page 34
 Select the style you want to select. Click on NEXT.

 Select the title for your report.

Page35
The report is created.

Page36

You might also like