Computer
Computer
20
Disadvantages of Using DBMS
R It is complex to understand.
R Some applications of DBMS are very slow.
R Itis expensive and oCCupies a large storage space ina hard disk.
HOwever, these disadvantages are very small as compared to the advantages of using DBMS.2 4 24
DATABASE OBJECTS
Asingle database file can contain one or more tables. A table is the
basic building block ofa
database. It contains data in the form of rows and columns and looks similar to a
spreadsheet.
Fields
MS ACCESS 2010
T
Skills
Microsoft Access 2010 is the most commonly Used genera-purposesuite.
DBMS MSon a
Windows-based Computer. It is a part of the Microsoft Office 2010 Access is also
21
called Relational Database Management System (RDMS) as it inks or relates clifferan
tables together to get a common output. MS Access allows individuals and
organisations to manage large amount of data and information. In MS small business
Acccess,
add, modify, or delete the data, generate a query about data. and also you can store
view the data. produce reports to
STARTING MS ACCESS
To start MS Access 2010, follow the steps shown in figure 2.1.
Cick on Microsoft
Office.
To create a newdatabase,
follow the steps shown in figure 2.2.
Avaabl Tumaabu,
Cick on Blank
under Avallabledatabase
Templates
Becent
9Cick on Create
Fig. 2.2 Steps to Create a
new database
22
This will open MS Access 2010 screen (Fig. 2.3).
Quick Access Toolbar Window controls
AB L2 ate ati
Na ab
t Nb eno
ece asas
Valkdation Ribbon
smalteg
Tbes (New)
Object name
Status
bar
Navigation
pane
View
Record shortcuts
numbers
Datasheet es
The Navigation pane contains alist of all MS Access 2010 database objects that are a part of
the database. It provides shortcuts to all objects created under that database.
MS ACcess has six main types of database objects--Tables, Queries, Forms, Reports, Macros,
and Modules. These objects can be created byclicking on coresponding options under the
Create tab.
Let's Review
Teacher's Notes: Once the student completes the activity, colour the stars based on
their response.
23
VIEWS OF A TABLE
1T
Skils
Recard l 1 of 1
ie ter Search
25
Affer entering al the records. the column titles or field Info Box
names also need to be changed, This is important The highlight colour may
because Field 1, Field 2, and so on do not specity what change if youselect a
type of data is stored in the table or the field. different MS Office theme
lo change the field name, follow the steps shown in
figure 2.9.
Click on the
Click on Field 1. Fields tab.
STabie Tools Da
File Home Create External Data Database Tools Fietds Table
OK Cancel
26
SAVING A TARLE
Save As
Table Name:
Students 3 Enter Students in the
Table Name box.
4 Click on OK, OK Cancel
b
Fig. 2.11 Steps to save a table
Solutlon:
1. Create a new database in MS Access. A new table is opened in Datasheet View.
2. Start entering the first record in the Click to Add Column. Do not enter anything in
the ID field.
3. Press the Tab key to move to next field.
4. Press Chrl and + together to add a new record. SkillsIT
5. Change the field names by following the steps mentioned in figure 2.9.
27
DATA TYPES IN MS ACCESS
Access 2010 alows to store different types of datain atable. These data types vary
accordinc
To the fields in a table. The various data types and their uses are explained in Table 22
Memo Numbers, alphabet, and Tostore lengthy text and numbers, such as
special characters notes and long descriptions: stores upto 65.536
characters
Number Nunbers To store numbers on which calcCulations has to
be done. except those involving money
(Use curency type)
Date/Time Dates and time To store date and time
Currency Numbers To store values involving money: curency sign is
automaficaly added to every entry in this field
AutoNumber Unique sequential numbers Tostore unique sequential or random numbers
automatically entered by that are automatically inserted when a record is
MS Access added
Yes/No Appears as check box Used when there are only two possible
answers-Yes or No; a checked box represents
Yes and an unchecked box
represents No
OLE Object An electronic object button To link some files/ documents with the
iscreated record;
fhis data type requires more space and is
nor
preferred much
Hyperlink Numbers, letters., and special To store
characters
websites or email addresses
Attachment An electronic object button
To attach some files/
is created documents with the recofo.
as compared to OLE obiects,
Skills
IT lesser space
attachments regui
Lookup Starts the Lookup wizard To add a
Wizard drop-down list to a field
28
Let's Review
Teacher's Notes: Once the student completes the activity, colour the stars based on
their response.
The Datasheet View automatically assigns the data type for a column based on the typed
entries. However, you can create atable with your own declaration of data types using the
Design View. Let Us design a table with the following fields and data types:
Field Name Date Type
Roll No Text
Name of the StuUdent Text
Date of Birth Date/Time
Marks obtained Number
Scholarship received Yes/No
Fee per month Cuency
E-mail Hyperlink
To create atable in Design View, follow the steps shown in figure 2.12.
3 The Design View
of table appears.
Oata ye Desorption
A Databasel
File Mone Create Externai Data Databace Toolt
Property
Cheet
ndese Ceste a t
eoat Fna/Oeiete Relabanjnip Obiect
Fute, Recorg atabsA tents Dependencies
B ACORss Gbiects
Field Name Data Tv
Tde AutoNumber Descriptian
Nane of she Student Text
Class &Section Text
Date of Birth Date/Time
Martial Arts Acity Text
Soor Text
Click on the
Gensnek Click on the Format
General tab. drop-down arrow, and
np ask
choose adata ype.
Detault Vabue
aaatisn Ruie
Skills
IT
a Number b Date/Time
table as 'Fee' by clicking on the Save button on the Lookup tab in the
Fleld Properties pane.
the Qulck Access Toolbar.
To enter data in the Fee table, follow the steps shown in figure 2.17.
A Click on the
Cate btema Data Databate Toalk Deion Design tab.
neetRowe
Delete Rawi
Any Pultee Test Nalidation Aopeity lndexes Cre
Click on the Vlew key Rules Ntodity lookup Sheet M
drop-down arow. Show tide
Databet Vie
Fe
Field Naime
Name of the Stuser Date of Brth Mark obtainedScholarship Fees per month Email
SkillsIT
True/False
Yes No
True
Yes
On/Off On Info Box
c Yes/No The Lookup fields have
an additional set of
Fig. 2.16 Data Type Format drop-down menuS
field properties which
5. After setting properties for all the fields, save the are located under
table as 'Fee' by clicking onthe Save button on the Lookup tab in the
Field Properties pane.
the Quick Access Toolbar.
To enter data in the Fee table, follow the steps shown infigure 2.17.
A Table Tocls 1 Click on the
File Home Create Externat Data Database Toais Design Design tab.
Insert Rows
Delete Rows
Click on the View Primary Builder Test Valioatton Modify Lodkups
Praperty Inderes Cre
Rules Sheet M
drop-down arow. Tools Show/Hide Fiel
Datasheet View 3 Fee
Field Name
5PivgtTable View Roll No
Select the
Name of the Student
Datasheet View. PiyotChart View Date of Birth
Marks obtained
Design View Scholarship received
Fees per month
Cnail
fe
Rol No - Name of the Studer Date of Birth Marks obtained - Scholarship Fees per month Email
SkillsIT
b
Fig. 2.17 Steps to enter data in Datasheet View
31
Date ot rtth
nin
ate er athMak obtated
tpe 218
uk N s N e ott eNtes Neholarship fees per month
Heal Ar 1000 00 Emat
a hacea utsena on
1000,00 haemal
khay i i g 3000.
1006.0000 dchacheaaat
dehotmatcom
a h Ar 2000.00 1ummereditfa
1000.00 aroraerahnsn
tig 218 Entered Data in atable in Datasheet View
PRIMARY KEY
A
Pimary Key field is defined as one in which allthe records have a different ertb
nique to every ecord.
For exomple, ih the Ree table, there can be more than one student with the some ro
having same cloass but Roll No is unique for every student. So, Roll No is the Primary Ke e
the table. To define a field as Primnary Key field. follow the steps shown in figure 2.18
kon the OCk nthe Vlew
op down omow, Click on Primary Key. 5 Click on the Deig
nsert Rows
Delete Rows
Pooety
D OCek on the Rol
View
Vievws
Piman uer Test Validation
Key Rules
Tootx
Modity tookups Sheef
Shoe
b
Fig. 2.19 Steps to define Primary Key
A Smal key V con wilappear on the left side of the Roll No field, The presence o
shows that the Roll No is the Primary Key field in the able.
32
INSERTIN GA NEW FIELD IN DESIGN VIEW
To add a new field in the Design View, follow the steps shown in figure 2.20.
Cick on the field before which Clck on the O Clck on
the new field is to be odded. Design tob. Insert Rows
CtsbareToskh
e TetVdation
Deteews
Bimany Poperty ndes Cest
Sheet Meci OAnew field is irserted. Erter
field name and dafa type.
AB Access 0bjects estent
eld Nene Deta Type
Tabls AutoN Atoltumber
Roll No Nunber
Fee Numbe
Name of the Student Text
Shutent Name of the Studet Tert
Class & Section Tert
Class & Section Terr
Queries Date of Birth Date/t
A1
Mome Crest Select the A confirmafion dialog
Cick on the View Datasheet View.
arop-down arrow. box appears as shown.
Primary Builder Test
Maroug Acoess
Toadd a field in Datasheet View of the table, followthe steps shown in figure 2.21.
33
DELETING A FIELD IN DESIGN VIEW
If you want to delete afield from atable in Design View, followthe steps
Sehogl Record Det
shown in figure 2.22
Datsbate Tools Deigr
CHEste
nert Bowt
Deiete Riers
P i y b e t let Vnetinn
Modity Lnokupt
roperty nderes Create Daa enametei
Sheet Macros 2Cick on Delete
Chck on
Pules
Tools Shoe de Rows.
record selector Al Access Objects Fas Student
of the row fo
Segrch Field Name Data Typ
be deleted. 10 AutoNumber
Talles
Roll No Number
feet
Group No Text
Student Narme of the Student Text
Queries Class & Section Text
seed Quty
Moving a field means to rearrange the order of fields. For example, you can make second
field as the fourth field or fifth field as the first field. To moveafield in the Design View, follow
the steps shown in figure 2.24.
Click on the field name to select the entire field
and release the mouse button. Again, click on Athick black line willappear as you move fhe
the field name of the selected field and without mouse to show desired location. Release the
releasing the mouse button, drag the mouse up mouse button to move the field to new place.
and down to move the selected field.
To edit a record in the Datasheet View, click on the cellyou want to edit. Using arow keys, move
the cursor to the place where you want to change data. Type the nevw data or modify the
existing data, and then press the Tab key. The cell entry willbe automaticaly saved to the table.
Let's Review
35
Ava's Practice Time Esperiential Learning
Rohan has created the following table in Datasheet View. He wants to shift the Date of Problem-Sehving Birth
Reld' next to the Sport field. Help him to perform the task.
Solution:
1. Select the field which is to be moved in the Datasheet View.
2. Without releasing the mouse button, rag the mouse towards B
right to keep the
the Sport field. field net to
3 Release the mouse button once satisfied with the position.
Roll No -Name orthe Student Class &Section - Date of Birth Martial Arts Activity.
1 Sudhanshu Saluija 7/27/200s Sport
z Hiral Arora 2/11/200Taeicwondo Basketball
3 Dwani Chachra 12/13/20osTaeiwondo Basketball
4 Lalshay Dihingra 2/18/200Carate Foctiba
S Sumiti Budhiraja 7/23/200 Karate Sikating
6 Grihansh Arora 2/28/2005udo Badminton
Boxing
Flashback
« Database is a collection of data aranged in an organised way.
« Database Management System (DBMS) refers to a program that s used to manage the
database.
« Miarosoft Access is the most commonly used DBMS.
« Microsoft Access con be used to store. add. modify, or delete data. generate query cbout
data. and also produce reports to view the data.
« A Primary Key fieldis defined as one in which al the reconds have a different enty. It is unique
to every record.
EXERCISES
36
Whoh view&he cefout vievw when a new toble is created?
osheet b Desion 6. None of these
8Whoh of the wgis Unigue o evey record in a toble?
Rele Nome b Pimory Key 6. Secondory Key
A h e blonks
Lhe st comnercialy successtul DBMS was caled
refers to an application program that is USed to manage
Logical Thinking
D
M
D T
S A
N G T A E
38