Professional Documents
Culture Documents
CHAPTER l]
Creating and Using Tables -~
Microsoft Ace ess is· t he most popular and powerful Relational Database Management system (RDBMS) · 1t .IS a ,
.
. and manrpulate
. It has a graphical user interface (GUI) and .,s used to organise
part of the MS Office suite. ninte
aIarg ir,
of data eff · I . .. evo1 UrtJ;
icient y. It organises data in the form of tables and provides the facility to create relationship b
. ~~
using common fields. the~
• It provides the facility to break large information into small parts, so that it becomes easily accessible.
• Data redundancy is reduced, which in turn minimises data inconsistency. Data redundancy occurs wh
. en data ,
duplicated at multiple locations.
• It increases the efficiency, speed, and flexibility for searching and accessing information.
• Access facilitates the sharing of data. Different users can use the same database to extract data accordingtothe1,
needs.
■ fl DATABASE OBJECTS
There are four main objects in any database - Tables, Queries, Forms, and Reports. These objects are discussedai
follows:
TABLES
Tables store the complete data in a structured manner, in the form of rows and columns. Every table has afinite
Elements of a Table
Fields: All the columns in a table are called Fields. For example, the field ID in the Employee table will store the /Ds'ol
, .. arnina
=t ◄ w, 44
I t f -J
oata
Fig. 111 : Employee Table
auERIES
f
As the name suggeS t s, queries are used to a_sk questions frnm the database to retrieve records data based on certain
criteria. They are also used to perform actions, such as insert, delete, update, etc., on the data depending upon the
. •ia specified by the user.
enter
roRMS { ..
Aform has an attractive interface that accepts data from the user and inserts it in the corresponding table or query.
You can also use these forms to update any record in the table or query.
REPORTS
Reports are used to display the selected data in a printable format. These ·are used for decision-making and analysing
Learning
Computers with Kl• PS 211
File Tab I Quick Access Tille Bar
hl AB 12 rn ""lo., &Tin.,
y
Group
p
tN•w
Documonts
[ Tab
Navtgallon
Pane
Work Area
Navigation Buttons J
Status Bar
HCh
■ II CREATING DATABASE
To create a database in MS Access, follow the given steps:
♦ Open Microsoft Access. You will get the Backstage View of Access.
0- -- 41
... ......
~
.....I! 2
ill.,..._•a•
4lo.i1111un,.,..
1)1LMt1~-- - ......
OltlCIIC.T~H
......
-·- •-o
l,bt~~
-·... -
.,,
..
, a.,, , ..,..,
►
□••
♦ Click on the Blank database option under the Available Templates category. The Blank Database option facilitatei
you to create a database from the scratch. This is a good option if you have very specific design requirernen~
or existing data that you need to accommodate. The Blank database task pane appears on the rig . ht 51·de tha-
prompts you to create a file.
♦- If required, you can change the location of the file by clicking on the Browse button next to the File Name text boi
Click on the create button. This will create the database with an empty table named Tablel.
Learning
Computers with
KIP
·S
f.ATING TABLES
-you IIKflcR
ow t hat tables are the basic building blocks of a database D t . st
. no wizard to create the table in MS A · a a is ored . in it by using tables. Unlike Ubreoff,ce
• aase,
there 15
. . . d
ccess.
.
"'",,n create tables
. in an ex1st1ng atabase by any of th e f ollow,ng
. methods
r
oesign view
l)Slflg
. oatasheet View
v us1ng
iNG TABLES IN DESIGN VIEW
c.PfAr
" th• esign VieW, you can create a table from scratch by det·'"'.ng t he field
.
arne Dand field types. To create the table ' click on the Table Oes1gn
• option
.
STables O
0nt group of the Create tab. A table will be created and pene d ·in
Fig. 11 .5: Selecting Table Design Option
th•heoesign VieW as shown in Figure 11.6. In this view, the Object window
1
consists of two panes . The first pane is called the Field Entrv pane and the
• Figure 11.6.
In the oescription column, you can type a description for each field. The description text is displayed on the Status
• Select the save button present on the Quick Access Toolbar. - o " T
Sb,,dcf\U: o,t.l:I ISC 'AcC.U J 20J7l Micros
[)CWIIJlvft
oau Type
Number
TeJrt
s_Nam• Teal
0•"~ r-,tu,nber
I
McU5"6!' Number
Tut1an_fee
Object Window
I.......
~;t:;7,1:tlOOI ~,
t tlf"AIPHlfl
put th~•
•l"'on
Lol"llll111CIIC'
Off• uh ~• "' 1
otdlllO~filu ,
>1,,Jdf'Ot1T u 1
11:tqJ •td
l
Field Properties
c ._n ~
Pane
J a J •°' ..,,
~---
;:,:;,~,,
,e."1tJ' 9"
P •'1 lfP
Fig . 11 .6: Adding fields in the Design View
' The Save As dialog box appears. rype the required name and click on OK.
Learning
Computers with
K"lPS <2~
l J'>
- ~ ~-- -- ---
~ not enter the data while cre . . n View. To add data in the
ating a table in the Desig table, switch to th
-- -- ~ , - -- _ e Dat~
CREATING TABLES IN DA ..
--- ,~
TASHEET VIEW
In the Datasheet View, yo
u can en ter , ed it, or h d t of the cre ate d tab les .
~
· up date t e a a Th is view d0
design the table struc
ture from scratch. . h t View follow es not
To wo rk in the Da tas ee the giv en ste ps ·
' ·
a11l\t.
♦ Select a table that you have cre ·ri
ate d in the De sign Vie w. Atable appears. Enter
way that you enter in a sp the data in the tab1 .
readsheet. Or e inth
+ Cli ck on the Cr ea t
te tab and select the Table option in
the Tables group.
+ Atable appears tha
t has an empty row and the
cursor is placed in the firs t em pty cell in the Click t
+ Access automatical OAdd
•
ly creates the first field cal
• led ID. By de fault, this field is designated as the
which contains an en try tha tabl , _ ~
t wil l un iqu ely ide ntify the record. es Pr1111ar
1
+ The data type of the
• ID field is set to AutoNum
ber which means
' tha t Ac ces s will aut om atically ent
number in this field for eac
h new record . er asequ
+ Start typing to enter data
by selecting the empty fiel
d below the Click to Ad d
then press the Tab key to colum n. Type "Ra ma _
move to the next field. n Mal1f•
• The value '1' appears in the
ID field. The name of the
second col um n has be en ch
label has been moved to an ged to Fieldl and Cl' k
the third column. IC lo~
-+ You can change the name
of Fieldl by double-clicking
on it and typing the field nam
change the name of the res e in its place. Likewise
t of the fields. yo, I
An asterisk(*) sign in the
Record Selector (locate - - -- - -
d on the left side of the
a new record. Once you first row) indicates that the
enter a record, the ast row is ready to rec~...
erisk(*) sign cha nges to a pencil sig n and
on it to save the record indicates to save the reco
before moving on to the
next. Clicking on rd Oici
value in a new table. the pen cil sign is nec ess ary onl
y when you enter thefirit
♦ Enter the other information in the table in the similar manner.
Th us, the table gets created as you entertheda
u
Iii .,.
0 X • Studct! .C~ t~t: ..!!'
tn :'•1 4a-
~
s--
fk'l
l!UltlO
,_
JM, f
'*-
"!JI
M ltl• f ti f ~u tdl
II t Ofl
0 --
Fig. 11.7 Entering -
Data In Datasheet Vie
w Fig . 11 .3 Ent erin g Dat
a afte r Changing the
Field Narne
is add ed to the tabl e in th -n -.. ___ -,e d
e w colu mn e ~ View Access automat1ca11y sets each ftllltrs .,_ . type
ri a ri custom h ' D -.,.
Whe d ta that you ente r. If you wan t to •set eda taty peo t a field, then you need to open the table the 81
he a Sta
on t clicking on the Design View button on the tus bar. Make chan1es In the Da ta~ column arid save the table
tJiefl bY
,,,.
•Number
ly used data type s in MS Acc ess:
c0rrirT10'1
1, II o~ IMll VI, w, 11, ~ (, '"' II 1,1 ti II y1111 J tll\ 11) I I., ''" prirrl,11 /~'I ltH· wl, (;II d ,,,.Id 11111 b h1ehl1g
I I~ I 1I I I lm111v K~v I I 1H II 11111,, "' • IRII Ltl, I JI I IP.I 11 I 11, k f HI tt,, f I1 Id ,Hid ,,,•ll'r I thr Primary KPy option fr
111 I 1, I JI f, I
, I ti, (Hltn 11y ~• V, 111d11 1t, ,t l,1 ,t • 111,ill ~' y ·,11111,ol in 111, 111 Id (,1 lertor r..olumn
01 f Ulfllltloll
110 c.,ccl
~ ~ ASSESSMENT TIME
A orr t option.
c. Reports
c. Memo
IJ. Nu111ti11r
"· OI I
FiiiirilriPS ~
UNIT - III: Database Management System
I CHAPTEfi l2
Performing Operations on Tables ~
Tables are the easiest way to store, organise, and present a large amount of information. They are the building blo{,·
of a database. All the data is stored in a database by using tables. A well-designed table helps the users to retrieved·
-.ia
from a database easily.
In the previous chapter, you learnt how to create tables using Table Design and Datasheet View. In this chapter, you wi
learn about the various operations that are performed on tables.
◄ Open the database in which the table exists. For example, the Students database.
• Select the Student_info table in the Navigation pane. Double-click on it to open it. The pointer will appear in the
first cell of the table.
• Start typing in the cell and press the Tab key to go to the next field. Add as many records as you want. This is the
most common way to enter data in a table .
.::J ~tudonl_lnfo
S_ID •t NamE
_, Class . Stream . Crty • Mobile_Nur • Cf,ck t o Add •
1 Poonam X Arts Delhi 9876786545
2 Anu X Science Delhi 1!762287687
3 Neha X Science Pune 9985672343
4 Sabnam X Aru Delhi 8234763510
5 D,nest, X Arts Delhi 8776876614
6 Rahul X Science Pune 9215369856
7 Anam,ka X Aru Pune 6274439815
8 Tanu X Sc1enrei Nolda 8283856643
9 r.,saar X Scrence l\01da 3656284021
10 Arhan X Sc,ence No1da 6234119956
.. ~ ewJ
Use the navigation keys to move up, down, left or right in a table. To insert a new record, press the down arrow key
from your keyboard . This will move the cursor to the next record in the Datasheet View.
---------
II EDITING RECORDS IN TABLE
Sometimes, you need to modify the records. You can easily do so in MS Access. To edit a record in a table, follow th e
given steps:
i Open the table and click on the record you want to edit.
-+ Make changes in the records and click on the Save button 8 to save the changes.
Learning K. 218
Computers with fPS