Anda di halaman 1dari 26

DEPARTMENT OF TECHNICAL EDUCATION

GOVERNMENT OF ANDHRA PRADESH


Name of the Faculty : Usha Rani Jasti
Designation : Sr. Lecturer in CCP
Branch : D.C.C.P.
Institute : Government Polytechnic for Women,
: Kakinada, E.G. District.
Semester : 3rd Semester
Subject : Computer Packages
Subject Code : CCP – 305
Major Topic : Ms Access
Duration : 50 minutes
Sub Topic : Creating a Database and Table
Teaching Aids : PPT and visuals

CCP305.23 1
Objectives
On completion of this period, you would
be able to
 Create a database
 Create a Table and
 Set Primary Key

CCP305.23 2
Recap
Ms Access has 7 types of Components in each
database. They are
 Tables
 Queries
 Reports
 Forms
 Pages
 Macros
 Modules

Each component is useful for different purpose

CCP305.23 3
Starting Ms Access

Click on “Start”
button.

Select “Programs”
Option from “Start”
Menu

Select “Microsoft
Access” from
Programs Menu

CCP305.23
Fig:1 4
Ms Access window will be as follows

Figure:2 showing creating / opening of a database


CCP305.23 5
Creating a Database
A new database can be created using
 Blank Access database
 Access database Wizards, Pages and
Projects

CCP305.23 6
Creating a Database

Select “Blank Access


database”

Click on OK
button

Fig:3
CCP305.23 7
Creating a Database

 Enter the name


for the database

 Click on
“Create” button

CCP305.23 Fig:4 8
Creating a Database

The new
database will be
created
Database
window will be
displayed As
shown in fig:5

CCP305.23 Fig:5 9
Creating a Table

Select “Table”
Object

Select “Create
table in Design
View”

Click on “New”

Fig:6
CCP305.23 10
Creating a Table continue….

Select the
required Method

Click on OK

CCP305.23 Fig:7 11
Creating a Table Data sheet view

select Datasheet View


The window appears as
in figure

Fig:8
CCP305.23 12
Creating a Table in Design view

select the Design


View
The window will
appear as in the
figure

Figure:9 table creation window

CCP305.23 13
Creating a Table Design views contd..
Table Name Data types
Menu

Enter:
Field names
Data type
Description
Field properties

Fig:10
Field Properties Pane CCP305.23 14
Creating a Table Saving

Click on Save and


enter the name for
the table.

Click on OK
button

The created
table will be as in
figure:12
CCP305.23
Fig:11 15
Creating a Table contd…

Figure:12 showing the table name which is created

Salary Table CCP305.23 16


Primary Key necessity

 Table often contains values of different individual


records from the other records
 These fields are called key fields
 These are also called as “Primary Key fields”

CCP305.23 17
Definition of Primary Key

 Primary key is a field that contains no duplicate


values
 Field that contains a unique value for each record
in table
 This files is the key that identifies each record
 Which does not allow duplicate and null values

CCP305.23 18
Primary Key continued…

 It is must
 Relationship between tables in the database
 Numeric or Counter field
 For Fast accessing of records
 For sorting the records

CCP305.23 19
Setting or Changing the Primary Key

 Select ‘table’
name in data base
screen
 Click ‘Design’ to
go to design view

Fig:13

CCP305.23 20
Setting or Changing the Primary Key

Select the field


or fields for
primary key

Click Primary Key


on the Tool bar

Figure:13 showing setting of primary key


CCP305.23 21
Showing Primary Key Selection

Figure:14 selecting fields for primary key

CCP305.23 22
Summary continue:
Creating a Database
 New data base can be created in different
methods
 Fields name, files type, properties can be
defined
 Primary Key can be Set to a tables

CCP305.23 23
Quiz
1. Once primary key is set, if cannot be
changed .(true / false) false
2. Table can be created in ____.D
c) Data sheet view
d) Design views
e) Using Wizard
f) All of the above

CCP305.23 24
Assignment
1.Create a new Database and give name as “
Employee”.
2.Create the following Tables :
 Table 1- Table Name: Salary

Fields - Employee Code, Employee Name,


Basic Pay, Gross Salary, Net Salary. Set
Employee Code as the Primary Key
 Table 2- Table Name: Establishment

Fields – Employee Code, Employee Name,


Date of Joining, Qualification. Set Employee
Name as the Primary key

CCP305.23 25
Frequently asked Questions

1. Explain the procedure to create a database.


2. Explain the procedure to create a table.
3. What is a Primary Key.
4. Explain the procedure to set and to change the
Primary Key.

CCP305.23 26

Anda mungkin juga menyukai