MICROSOFT
EXCEL
Microsoft
Excel is a spreadsheet program. It is
used to organize, manipulate, and chart data and to perform calculations. It can be used to create business plans,
business forms, accounting worksheets and virtually any other document that
contains calculated numbers. Excel can
also be used for statistical analysis.
You might
have heard the terms “spreadsheet” and “Worksheet”. People generally use them
interchangeably. To remain consistent
with Microsoft and other publishers the term Worksheet refers to the row-and
column matrix sheet on which you work upon, and the term spreadsheet refers to
this type of computer application. In
addition, the term workbook will refer to the book of pages that is the
standard Excel document. The Workbook
can contains worksheets, chart sheets or macro modules.
Title Bar:
This bar
lists the name of the program and the title of the current document.
Menu Bar:
This bar
lists the headings for various drop-down menus.
Commands are grouped under each of theses headings in the drop-down
menus according to function.
Standard Toolbar :-
This
toolbars contains shortcuts to some of the most frequently used commands from
the menu bar.
Formatting Toolbars:
This toolbar
contains shortcuts to some of the most frequently used commands found under the
FORMAT menu item.
Formula Bar:
This bar
displays the location of the active cell and its contents, including any
formulas.
Formula bar
displays t vblocation of the active cell and the value or formula used in the
active cell. The active cell is the ell
with the dark border around it in the image of the Excel screen at the top of
this page. You may make any cell active
by clicking in it.
The value
window (the window next to the = sign) displays the contents of the active
cell. This could be a simple number like
4 than or something as complex as a formula like A4*B4/C4. you can edit the contents of the active cell
by clicking in the value window, deleting its currents and entering in a new
value.
Rows, Columns and Sheets
Spreadsheets
are made up of Columns Rows And their intersections are called cells.
The Excel
worksheet contains 65536 rows that extend down the worksheet, numbered 1
through 65536
The Excel
worksheet can contain as many as 256 sheets,
labeled Sheet 1 through Sheet 256.
Text
(labels)
Number data
(constants)
Formulas
(mathematical equations that do all the work)
In a
spreadsheet the COLUMN is define as the vertical spaces that us going up and
down the window Letters are used to designate each COLUMNS location.
In a spreadsheet the ROW us defined
as the horizontal space that is going across the window. Numbers are used to designate each ROW’s
location.
In a spreadsheet the CELL is defines
as the space where a specified row and column intersect. Each cell is assigned a name according to its
COLUMN letter and ROW number.
Column and Row Headings
The row containing letters that
stretch across the spreadsheet are the column headings. Column headings
represent the names of the columns. The
column containing
numbers that
stretch down the spreadsheet are the row headings.
Row headings represent the names of
the rows. You can select an entire
column or row by clicking on its headings.
To increase or decrease the width of a column or the height of a row,
place the cursor on the line that separates the column or row headings.
You can also
change the column width using the cursor,
1. Place the
cursor on the line between the B and C column headings. The cursor should look like the one displayed
here, with two arrows.
Active cell
The Active cell with the dark border around it. Cells are referred to by
their column/row coordinate(called the cell’s address). The cell that is active
in this image is cell A1. You can move around two different cells by using the
mouse, the arrow keys, the tab key (horizontally) or the enter key
(vertically).
Cursor
The
cursor appears as a white, block (plus) (+) sign as you move it around on the
spreadsheet. You can’t enter text when the cursor appears like this. Instead
you must first click in the cell where you wish to add or edit data.
Sheet
Next
to the horizontal scrool bar you will notice three tabs labeled Sheet 1, Sheet 2 and Sheet 3. When you
start Excel, the program opens to a blank spreadsheet called Book 1. Each book
contain multiple sheets. It is similar to a workbook that contains multiple
pages. When you save your book , you will be able to rename it to whatever you
like.
To
move from one sheet to the next with in a book, simply click on the tab of the
sheet that you wish to work.
Basic data
types
In a spreadsheet there are three
basic type of data that can be entered.
Labels –
(text with no numerical value)
Constants –
(just a number – constant value)
Formulas* -
(a mathematical equation used to calculate ) Formulas OR Functions MUST BEGIN
with an equal sign(=).
Operation
|
Symbol
|
Constant Data
|
Referenced Data
|
Answer
|
Multiplication
|
*
|
=5*6
|
= A1 * B3
|
30
|
Division
|
/
|
=8/4
|
= A3 / B2
|
2
|
Addision
|
+
|
=4+7
|
= B2 + A2
|
11
|
Subtraction
|
-
|
=8-3
|
= A3- B1
|
5
|
|
|
Data types
|
Examples
|
Descriptions
|
|||
|
A
|
B
|
LABEL
|
Name or
wage or Days
|
Anything
that is text
|
||
1
|
5
|
3
|
|||||
CONSTANT
|
5 or 3.75
or -7.4
|
Any number
|
|||||
2
|
7
|
4
|
|||||
FORMULA
|
=5+3 or =
8*5+3
|
Math
equation
|
|||||
3
|
8
|
6
|
Spreadsheets
have may Math functions built into them.
Of the most basic operations are the standard multiply, divide, add and
subtract. Thee operations follow the
order of operations (just like algebra).
For these
following examples let’s consider the following data:
A1 (column
A, row 1) = 5
A2 (column
A, row 2)= 7
A3 (column
A, row 3) = 8
B1 (column
B, row 1) = 3
B2 (Column
B, row 2) = 4
B3 (column
B, row 3) = 6
Selecting
cells in an equation is a very important concept of a spreadsheet. We need to know how t references the data in
other parts of the spreadsheet. When
entering your selection you may use the keyboard or the mouse.
We can select several cells together
if we can specify a starting cell and a stopping cell. This will select ALL the cells with this
specified BLOCK cells.
If the cells that we want to work
with are not together (non-contiguous cells) we can use the comma to separate
the cells or by holding down the control-key (command key on a machine) and
selecting cells or block of cells the comma will be inserted automatically to
separate these chunks of data.
SUM :
Probably the most popular function in any spreadsheet is the SUM function. The Sum function takes all of the values in
each of the specified cells and totals their values.
The syntax
is: =SUM 9first value, second value etc)
The Auto sum
Icon
The Auto Sum Icon on the Standards
toolbar automatically creates a SUM function.
In the first and second spots you
can enter any of the following (constant, cell, range of cells) blank cells
will return a value of zero to be added to the total. Text cells cannot be
added to a number and will produce an error.
|
A
|
1
|
25
|
2
|
50
|
3
|
75
|
4
|
TEST
|
5
|
|
|
||||
|
Average
The
average function finds the average of the specified data. (Simplifies
adding, all of the indicated cells together and dividing by the total number of
cells.) The syntax is an follows: = Average (first value, etc.)
Text fields
and blank entries are not included in the calculations of the Average Function.
Min: (This stands for minimum). This will return the smallest (min) value in
the selected range of cells.
Blank
entries are not included in the calculations of the Min Function.
Text entries
are not included in the calculations of the Min Function.
Count: This will return the
number of entries (actually counts each cell that contains number data) in the
selected range of cells.
Blank
entries are not counted. Text entries
are not counted.
CountA: This will return the
number of entries (actually counts each cell that contains number data OR text
data) in the selected range of cells.
Blank entries
are not counted.
Text entries
are counted.
IF : The IF
function will check the logical condition of a statement and return one value
if true and a different valued if false
The syntax
is =IF (condition, value-if-true, value-if-false)
Value
returned may be either a number or text.
If value returned is text, it must be in quotes.
A B
1. Price Over
a dollar?
2. $.95 No
3. $1.37 Yes
4. comparing
# returning
#
5. 14000 0,08</TD<tr>
6. 8453 0.05
Typed into
column B Compares Answer
=IF
(A2>1, “Yes”, “No”) is
(.95 > 1) No
=IF (A3>1,
“Yes”, “No”) is
(1.37 > 1) Yes
=IF (A5>10000,
.08, .05) is (14000
> 10000) .08
=IF (A6>10000,
.08, .05) is (8453
> 10000) .05
The PMT
function returns the periodic (in this case monthly) payment for an annuity (in
this case a loan). This is the PMT functions that was used for the are purchase
in the first examples. There are a few
things that we must know in order for this function to work. To calculate the loan we must know a
combination of the followings:
(rate)
interest rate per period
(nper)
number of payments until repaid
(pv) present
value of the money (for saving or investing)
(type) enter
0 or 1 to indicate when payments are due.
ie = PMT
(rate, nper, pv, fv, type)
Equation
goes into c7 =PMT(C4/12,C5,-C3)
C4 is the
yearly interest and since it’s compounded monthly we divide by 12
C5 is the
number of months (# of payments)
-C3 is the
amount of money we have (borrow – negative)
Note that the rate is per
period. If we have an annual interest rate
of 9.6% and we are calculating monthly payments, we must divide the annual
interest rate by 12 to calculate the monthly interest rate.
Excel has most of the math and trig
functions built into it. If you need to
use the SIN, COS , TAN functions, they can be
typed into any cell.
Filling Cells Automatically
You can use Microsoft Excel to
automatically fill cells with information that occur in a series. For examples, you can have word automatically
fill in times, the days of the week or months of the year, years and other
type’s o series.
Function Wizard
In Excel there is a help tool for
functions called the Function Wizard.
There are
two way to get the function wizard.. if
you look at the Standard Toolbar you can see the function wizard icon.
The other
way to get to the function wizard is to go
the Menu INSERT- down to FUNCTION.
Either way you get there, at this
point Excel will list all of the functions available. Upon choosing the function, Excel will prompt
you for the information it needs complete the function. Mini descriptions are available for each of
the cells. It is often necessary for you
to understand the functions in order to be able to figure out these
descriptions.
Fill Down
Often we have several cells that
need the same formula (in relationship) to the location it is to be typed
into. There is a shortcut that is called
Fill down. There are a number of ways to
perform this operation. One of the ways
is to select the cell that has the original formula hold the shift key down and
click on the last cell (in the series that needs the formula) under the edit
menu go down to fill and over to down.
Absolute positioning
Sometimes it is necessary to keep a
certain position that is not relative to the new cell location. This is possible by inserting a $ before the
Column letter or a $ before the Row number (or both). This is called Absolute Positioning.
Formatting Text
Spreadsheets an be pretty dry, so we
need some tools to dress them up a little.
We an use most of the tricks in our word processor to do the formatting
of text. We can use: bold face, italics,
underline, change the color, align (left, right, center), font size, font etc.
We need to select the cell (or group
of cells) that we wish to change the formatting and then go from the FORMAT
menu-down to CELLS- click on FONT. Here
is a picture of what you will see there.
Notice that you can choose to change the alignment as well as several
other options.
Inserting a column
We can insert a column into an
existing spreadsheet. What you must do
is to click on the column label (letter) and choose in Columns from the Insert
menu. This will insert a column
immediately left of the selected column.
Inserting a Row
we can also
insert rows. With the row label (number)
selected you must choose the Row from the Insert menu. Again this will insert a
row before the row you have selected.
Charts or
graphs
Numbers can
usually be represented quicker and to a
larger audience in a picture format.
Excel has a chart program built into its main program. The Chart Wizard
will sep you through question that will (basically) draw the chart from the
data that you have selected. There are
many types of charts. The two most widely used are the bat chart and the pie
chart.
The BAR
Chart is usually used to display a change (growth or decline) over a time
period. You can quickly compare the
numbers of two different bar charts to each other. The PIE chart is usually used to look at what
makes up a whole something.
MS OFFICE
PRINTED NOTE
MICROSOFT WORD
Microsoft Word, popular word processing
software, is part of a suite of application programs developed by
Microsoft. The basic Microsoft Office
package comes with Word, Excel (spreadsheet), and PowerPoint (presentation
software). The Office Pro package also
comes with a database program (Microsoft Access) and an organizer (Microsoft
Outlook). Because Microsoft manufactures
all of these programs, you can easily import information from any one program
into another.
THE TITLE BAR
Title bar is located at the very top
of the screen. On the Title bar,
Microsoft word displays the name of the document you are currently using. At the top of our screen, you can see
“Microsoft Word- Document1” or a similar name.
The Menu Bar: The Menu bar is
directly below the Title bar and it displays the menu. The menu begins with the word File and
continues with Edit, View, Insert, Format, Tools,
Table, Window, and Help.
You use the menu to give instructions to the software. Point with your mouse to the menu option and
click the left mouse button to open a drop down menu. You can use the up and down arrow keys to
move up and down the drop down menu. To
select an option, highlight the item on the drop-down menu and press
Enter. An ellipse after a menu item
signifies additional options; if you select that option, a dialog box will
appear.
TOOLBARS
The Standard
Toolbar
The
Formatting Toolbar
Toolbars
provide shortcuts to menu commands.
Toolbars are generally located just below the Menu bar.
THE RULER
The ruler is
generally found below the main toolbars.
The ruler is used to change the format of your document quickly.
DOCUMENT VIEW
With word, you can display your
document in one of four views: Normal ,
Outline, Page Layout or Online Layout.
1.
Normal View:
Normal view
is the most often used and shows such formatting as line spacing, font, point
size and italics. Multiple-column text
is displayed in one continuous column.
2.
Outline view
Outline view
displays the document in outline form.
Headings can be displayed without the text. A heading can be moved and the accompanying
text moved with it.
3.
Page Layout
view
The Print
Layout view shows the document as it will look when it is printed.
4.
Online
Layout view
The Online
Layout view optimizes the document for online viewing (viewing the document in
a browser.
TEXT AREA
Just below the ruler
there is a large area called the “text area”.
You type your document in the text area.
The blinking vertical line in the upper left corner of the text area is
the cursor. It marks the insertion point.
As you type, your work will show at the cursor location. The horizontal line next to the cursor marks
the end of the document.
HORIZONTAL AND VERTICAL SCROLL BARS
The horizontal and
vertical scroll bars. If turned on, enable you to move and down or across the
window simply by pressing the icons located on the scroll bars. The Horizontal scroll bar is located above
the Status bar. The vertical scroll bar
is loxated along the right side of the screen.
CREATING A NEW DOCUMENT
When
word is started am empty document windows is displayed. It will be called Document 1 until you save
it. <Ctrl+N>
Open File
To continue working on a
file you previously saved, you must open the file. To open the file:
1.
Click on
File.
2.
Highlight
Open. Press Enter.
3.
Make sure
the folder you save the file.
4.
The file is
named “Myfile.doc”. Click on Open.
5.
The file you
created appears.
Click on the
Bold icon on the toolbars for bold letters.
Click on the Underline icon on the toolbar. You will get an underlined letters. Click on the Italic icon on the toolbars for
italic letters.
Font Size
In Microsoft
Word, you can change the size of your font (text). For this select the line, word, paragraph or
the whole document and use the select font size in the Formatting Toolbar.
In Microsoft
Word, you can change the font (the “family” of type you use for your
text). For this select the line, word,
paragraph or the whole document and use the select font in the Formatting
Toolbar.
Cut and Paste
In Microsoft
Word, you can cut (delete) text from one are of the document and save that text
so it can be pasted elsewhere in the document.
When you cut text, it is stored on the Clipboard. Information stored on the Clipboard stays
there until new information is either cut or copied. Each time you execute Cut or Copy, you
replace the old information on the Clipboard with whatever you just cut or
copied. You can paste Clipboard
information as often as you like.
Click on the
Cut icon or use
Ctrl+X
Click on the
Copy iconor use Ctrl+C
Click on the
Paste icon or use Ctrl+V.
Undo & Redo
You can
quickly undo most commands you execute by using Undo. If you then change your mind, you can use
Redo.
Line spacing
Line spacing
sets the amount of space between lines within a paragraph. Single spacing is the default. The spacing for each line is set to
accommodate the largest font on that line.
If there are smaller fonts on the line, there will appear to be extra
space between lines where the smaller fonts are located. At 1.5lines, the Line Spacing is set to
one-and-half times the single-space amount.
For double-spaced lines, the line spacing is set to two times the
single-space amount.
Alignment
Microsoft
Word gives you a choice of several types of alignment. Left-justified text is aligned on the left
side. It is the default settings
Click on the
Align right icon the
paragraph should now be right aligned.
Click on the
Align Left icon the
paragraph should bow be left aligned
Click on the
Center icon the text
should now be centered
Click on the
Justify icon the
text should now be justified.
Bullets and Numbering
In Microsoft
Word, you can easily create bulleted or numbered lists of items. Several bulleting and numbering styles are
available.
Numbering
1.
Highlight the
list you typed.
2.
Click on the
Numbering icon on the Formatting toolbar.
3.
Your list
should now be numbered
Bullets
1.
Highlight
the list you typed
2.
Click on the
Bullets icon on the
Formatting toolbar.
3.
You list
should now be bulleted.
Creating a Table
To create a
four-column, five-row table:
1.
Click on
Table, which is located on the menu bar.
2.
Highlight
Insert Table on the drop-down menu.
3.
Press Enter.
4.
Type 4 in
the Number of Columns field.
5.
Type 5 in
the Number of Rows field.
6.
Select Auto
in the Column width field. Selecting Auto allows Microsoft Word to determine
the size of your column widths.
Alternatively, you can enter the column width you desire.
7.
Click on
OK. Your table should look like the one
show here, with four columns and five rows.
You can also
create a table by clicking on the Insert Table icon on the Standard toolbar.
1.
Click on the
Insert Table icon.
Note: The Insert Table icon does not display
on the toolbar if your cursor is collated on a table. If you cannot find the Insert table icon,
move your cursor outside of the table.
2.
Highlight
the number of rows and columns you need.
The maximum table size is a four-row by five-column table.
3.
Press Enter
(or Click) to create the table.
Spell Check
Word checks your spelling and
grammar as you type. Spelling errors
displays with a red wavy line under the word.
Grammar errors display with a green wavy line under the error.
Press F7 or
click on the Spelling icon on the
Standard Toolbar
Find and Replace
If you need to find a particular
word or piece of text. You can use the
Find command. If you want to search the
entire document. Simply execute the Find
command. If you want to limit your
search to a selected area, highlight that area and then execute the find
command.
Save File
Until a document is saved it only
exists in a temporary part of the computer called Memory. You must save your document if you want to
see it again after you close the program. Saving allows you to open the
document at a later time for editing or archiving purposes. And because computers can crash in the middle
of writing, it’s important to save regularly.
Save your
file by following these instructions:
<Ctrl +
S> or follow the below method.
1.
Click the
File
2.
Highlight
Save As. Press Enter.
3.
Specify the
correct folder in the Save in field.
4.
Name your
file by typing Myfile.doc in the file Name field.
5.
Click on
save.
Printing a Document
<Ctrl + P>
Print preview
Print
Preview is a quick way to view your whole document exactly how it is going to
be printed. Use the right hand scroll
bar to advance or move back through the pages.
Use the Toolbars buttons to change how you see the document. With your icon as a magnifying glass, you can
click anywhere on the document and zoom in for a closer look.
Mail Merge
The easiest
way to create a data source in Word is to use the Mail Merge command to start a
main document. After you’ve created the
data source, you can delete the blank main document. In a new document window, click Mail Merge
(Tool menu), click Create, and then click Form Letters. When word displays a message, click Active
Window. Then click Get Data and create a
data source.
Creating a
Form Letter
Create a new
mail-merge data source in Word
Create a
form letter:
1.
To use an
existing letter as a form letter, open a letter.
2.
To create a
new letter, click New on the File menu and then select a letter template.
3.
On the Tools
menu, click Mail Merge.
4.
Click
Create, click Form Letters, and then click Active Window.
5.
The active
document becomes the mail-merge main document.
Creating a
Data Source
1.
Click Get
Data.
2.
2. To create
a new list of names and addresses in Word, click Create Data Source, and then
set up the data records.
3.
To use an
existing list of names and addresses in a Word document or in a worksheet,
database or other list, click Open Data Source.
4.
In the Mail
Merge Helper dialog box, click Get data and then click Create Data Source.
5.
In the Field
names in header row box, review the data fields. Word will include in the data source all data
fields in the Field names in header row box unless you delete or change them.
6.
To delete a
field, click the field name in the field names in header row box, and then
click Remove Field name.
7.
To add a
field, type a new field name in the Field name box, and then click add Field
Name.
8.
To change
the order of the fields, click a field name in the Field names in header row
box, and then click one of the arrow buttons.
9.
When the
Field names in header row box contains all of the fields you need, click OK,
and then save the data source.
10. The Data Form dialogue box comes up
1.
when Word
displays a message, click Edit Data Source.
2.
In the Data
Form dialog box, type the information for each field, and then press
<ENTER>
3.
If no
information exists for a particular filed, press<ENTER> to skip the
field. Do not type spaces in the box.
4.
To start a
new record, click Add New.
5.
To return to
the main document after you’ve entered the information, click OK
Word will
ask you to save changed to the data source when you close the main
document. To save changes to the data
source before returning to the main document.
1.
Click View
Source
2.
Click Save
To return to
the main document.
1.
Click Mail
Merge Main Document on the Database toolbar
Opening an
Existing Data Source
1.
Click Get
Data.
2.
To opening a
file you have already created that contains the merge info (such as mailing
address names), click Open Data Source
The Open
Data Source dialogue box comes up. It is
similar to the Open dialogue box, but it presumes that you are looking for a
database type file, so the file type list is limited to database and
spreadsheet programs.
If the file is not an MS Word
document, change the Files of type” drop-down to the correct file type, or to
All Files to see everything.
If you choose an Excel that has
filtering turned on, you have the option to select only the portion of the
database that meets you filtering criteria.
Editing the
Main Document
1.
After you
designate the data source and Word displays a message, click Edit Main
Document.
2.
In the Main
document, type the text you want to appear in every form letter.
3.
Click where
you want to insert a name, address, or other information that changes in each
letter. On the Mail Merge toolbar, click
insert Merge Field, and then click the field name that you want.
4.
Select the
filed names, one at a time, to place them in your document.
5.
After you
insert all of the merge fields and complete the main document, click Mail Merge
Helper on the Mail merge toolbar
6.
Click merge.
7.
In the merge
to box, click Printer.
8.
To send the
form letter only to selected addresses, click Query Options and then specify
criteria for selecting the data records.
9.
Click Merge.
Help
If you more
information on executing a Microsoft Word commands, you can receive help at any
time by pressing F1 or by clicking on Help on the Menu bar.
MICROSOFT
EXCEL
Microsoft
Excel is a spreadsheet program. It is
used to organize, manipulate, and chart data and to perform calculations. It can be used to create business plans,
business forms, accounting worksheets and virtually any other document that
contains calculated numbers. Excel can
also be used for statistical analysis.
You might
have heard the terms “spreadsheet” and “Worksheet”. People generally use them
interchangeably. To remain consistent
with Microsoft and other publishers the term Worksheet refers to the row-and
column matrix sheet on which you work upon, and the term spreadsheet refers to
this type of computer application. In
addition, the term workbook will refer to the book of pages that is the
standard Excel document. The Workbook
can contains worksheets, chart sheets or macro modules.
Title Bar:
This bar
lists the name of the program and the title of the current document.
Menu Bar:
This bar
lists the headings for various drop-down menus.
Commands are grouped under each of theses headings in the drop-down
menus according to function.
Standard Toolbar :-
This
toolbars contains shortcuts to some of the most frequently used commands from
the menu bar.
Formatting Toolbars:
This toolbar
contains shortcuts to some of the most frequently used commands found under the
FORMAT menu item.
Formula Bar:
This bar
displays the location of the active cell and its contents, including any
formulas.
Formula bar
displays t vblocation of the active cell and the value or formula used in the
active cell. The active cell is the ell
with the dark border around it in the image of the Excel screen at the top of
this page. You may make any cell active
by clicking in it.
The value
window (the window next to the = sign) displays the contents of the active
cell. This could be a simple number like
4 than or something as complex as a formula like A4*B4/C4. you can edit the contents of the active cell
by clicking in the value window, deleting its currents and entering in a new
value.
Rows, Columns and Sheets
Spreadsheets
are made up of Columns Rows And their intersections are called cells.
The Excel
worksheet contains 65536 rows that extend down the worksheet, numbered 1
through 65536
The Excel
worksheet can contain as many as 256 sheets,
labeled Sheet 1 through Sheet 256.
Text
(labels)
Number data
(constants)
Formulas
(mathematical equations that do all the work)
In a
spreadsheet the COLUMN is define as the vertical spaces that us going up and
down the window Letters are used to designate each COLUMNS location.
In a spreadsheet the ROW us defined
as the horizontal space that is going across the window. Numbers are used to designate each ROW’s
location.
In a spreadsheet the CELL is defines
as the space where a specified row and column intersect. Each cell is assigned a name according to its
COLUMN letter and ROW number.
Column and Row Headings
The row containing letters that
stretch across the spreadsheet are the column headings. Column headings
represent the names of the columns. The
column containing
numbers that
stretch down the spreadsheet are the row headings.
Row headings represent the names of
the rows. You can select an entire
column or row by clicking on its headings.
To increase or decrease the width of a column or the height of a row,
place the cursor on the line that separates the column or row headings.
You can also
change the column width using the cursor,
1. Place the
cursor on the line between the B and C column headings. The cursor should look like the one displayed
here, with two arrows.
Active cell
The Active cell with the dark border around it. Cells are referred to by
their column/row coordinate(called the cell’s address). The cell that is active
in this image is cell A1. You can move around two different cells by using the
mouse, the arrow keys, the tab key (horizontally) or the enter key
(vertically).
Cursor
The
cursor appears as a white, block (plus) (+) sign as you move it around on the
spreadsheet. You can’t enter text when the cursor appears like this. Instead
you must first click in the cell where you wish to add or edit data.
Sheet
Next
to the horizontal scrool bar you will notice three tabs labeled Sheet 1, Sheet 2 and Sheet 3. When you
start Excel, the program opens to a blank spreadsheet called Book 1. Each book
contain multiple sheets. It is similar to a workbook that contains multiple
pages. When you save your book , you will be able to rename it to whatever you
like.
To
move from one sheet to the next with in a book, simply click on the tab of the
sheet that you wish to work.
Basic data
types
In a spreadsheet there are three
basic type of data that can be entered.
Labels –
(text with no numerical value)
Constants –
(just a number – constant value)
Formulas* -
(a mathematical equation used to calculate ) Formulas OR Functions MUST BEGIN
with an equal sign(=).
Operation
|
Symbol
|
Constant Data
|
Referenced Data
|
Answer
|
Multiplication
|
*
|
=5*6
|
= A1 * B3
|
30
|
Division
|
/
|
=8/4
|
= A3 / B2
|
2
|
Addision
|
+
|
=4+7
|
= B2 + A2
|
11
|
Subtraction
|
-
|
=8-3
|
= A3- B1
|
5
|
|
|
Data types
|
Examples
|
Descriptions
|
|||
|
A
|
B
|
LABEL
|
Name or
wage or Days
|
Anything
that is text
|
||
1
|
5
|
3
|
|||||
CONSTANT
|
5 or 3.75
or -7.4
|
Any number
|
|||||
2
|
7
|
4
|
|||||
FORMULA
|
=5+3 or =
8*5+3
|
Math
equation
|
|||||
3
|
8
|
6
|
Spreadsheets
have may Math functions built into them.
Of the most basic operations are the standard multiply, divide, add and
subtract. Thee operations follow the
order of operations (just like algebra).
For these
following examples let’s consider the following data:
A1 (column
A, row 1) = 5
A2 (column
A, row 2)= 7
A3 (column
A, row 3) = 8
B1 (column
B, row 1) = 3
B2 (Column
B, row 2) = 4
B3 (column
B, row 3) = 6
Selecting
cells in an equation is a very important concept of a spreadsheet. We need to know how t references the data in
other parts of the spreadsheet. When
entering your selection you may use the keyboard or the mouse.
We can select several cells together
if we can specify a starting cell and a stopping cell. This will select ALL the cells with this
specified BLOCK cells.
If the cells that we want to work
with are not together (non-contiguous cells) we can use the comma to separate
the cells or by holding down the control-key (command key on a machine) and
selecting cells or block of cells the comma will be inserted automatically to
separate these chunks of data.
SUM :
Probably the most popular function in any spreadsheet is the SUM function. The Sum function takes all of the values in
each of the specified cells and totals their values.
The syntax
is: =SUM 9first value, second value etc)
The Auto sum
Icon
The Auto Sum Icon on the Standards
toolbar automatically creates a SUM function.
In the first and second spots you
can enter any of the following (constant, cell, range of cells) blank cells
will return a value of zero to be added to the total. Text cells cannot be
added to a number and will produce an error.
|
A
|
1
|
25
|
2
|
50
|
3
|
75
|
4
|
TEST
|
5
|
|
|
||||
|
Average
The
average function finds the average of the specified data. (Simplifies
adding, all of the indicated cells together and dividing by the total number of
cells.) The syntax is an follows: = Average (first value, etc.)
Text fields
and blank entries are not included in the calculations of the Average Function.
Min: (This stands for minimum). This will return the smallest (min) value in
the selected range of cells.
Blank
entries are not included in the calculations of the Min Function.
Text entries
are not included in the calculations of the Min Function.
Count: This will return the
number of entries (actually counts each cell that contains number data) in the
selected range of cells.
Blank
entries are not counted. Text entries
are not counted.
CountA: This will return the
number of entries (actually counts each cell that contains number data OR text
data) in the selected range of cells.
Blank entries
are not counted.
Text entries
are counted.
IF : The IF
function will check the logical condition of a statement and return one value
if true and a different valued if false
The syntax
is =IF (condition, value-if-true, value-if-false)
Value
returned may be either a number or text.
If value returned is text, it must be in quotes.
A B
1. Price Over
a dollar?
2. $.95 No
3. $1.37 Yes
4. comparing
# returning
#
5. 14000 0,08</TD<tr>
6. 8453 0.05
Typed into
column B Compares Answer
=IF
(A2>1, “Yes”, “No”) is
(.95 > 1) No
=IF (A3>1,
“Yes”, “No”) is
(1.37 > 1) Yes
=IF (A5>10000,
.08, .05) is (14000
> 10000) .08
=IF (A6>10000,
.08, .05) is (8453
> 10000) .05
The PMT
function returns the periodic (in this case monthly) payment for an annuity (in
this case a loan). This is the PMT functions that was used for the are purchase
in the first examples. There are a few
things that we must know in order for this function to work. To calculate the loan we must know a
combination of the followings:
(rate)
interest rate per period
(nper)
number of payments until repaid
(pv) present
value of the money (for saving or investing)
(type) enter
0 or 1 to indicate when payments are due.
ie = PMT
(rate, nper, pv, fv, type)
Equation
goes into c7 =PMT(C4/12,C5,-C3)
C4 is the
yearly interest and since it’s compounded monthly we divide by 12
C5 is the
number of months (# of payments)
-C3 is the
amount of money we have (borrow – negative)
Note that the rate is per
period. If we have an annual interest rate
of 9.6% and we are calculating monthly payments, we must divide the annual
interest rate by 12 to calculate the monthly interest rate.
Excel has most of the math and trig
functions built into it. If you need to
use the SIN, COS , TAN functions, they can be
typed into any cell.
Filling Cells Automatically
You can use Microsoft Excel to
automatically fill cells with information that occur in a series. For examples, you can have word automatically
fill in times, the days of the week or months of the year, years and other
type’s o series.
Function Wizard
In Excel there is a help tool for
functions called the Function Wizard.
There are
two way to get the function wizard.. if
you look at the Standard Toolbar you can see the function wizard icon.
The other
way to get to the function wizard is to go
the Menu INSERT- down to FUNCTION.
Either way you get there, at this
point Excel will list all of the functions available. Upon choosing the function, Excel will prompt
you for the information it needs complete the function. Mini descriptions are available for each of
the cells. It is often necessary for you
to understand the functions in order to be able to figure out these
descriptions.
Fill Down
Often we have several cells that
need the same formula (in relationship) to the location it is to be typed
into. There is a shortcut that is called
Fill down. There are a number of ways to
perform this operation. One of the ways
is to select the cell that has the original formula hold the shift key down and
click on the last cell (in the series that needs the formula) under the edit
menu go down to fill and over to down.
Absolute positioning
Sometimes it is necessary to keep a
certain position that is not relative to the new cell location. This is possible by inserting a $ before the
Column letter or a $ before the Row number (or both). This is called Absolute Positioning.
Formatting Text
Spreadsheets an be pretty dry, so we
need some tools to dress them up a little.
We an use most of the tricks in our word processor to do the formatting
of text. We can use: bold face, italics,
underline, change the color, align (left, right, center), font size, font etc.
We need to select the cell (or group
of cells) that we wish to change the formatting and then go from the FORMAT
menu-down to CELLS- click on FONT. Here
is a picture of what you will see there.
Notice that you can choose to change the alignment as well as several
other options.
Inserting a column
We can insert a column into an
existing spreadsheet. What you must do
is to click on the column label (letter) and choose in Columns from the Insert
menu. This will insert a column
immediately left of the selected column.
Inserting a Row
we can also
insert rows. With the row label (number)
selected you must choose the Row from the Insert menu. Again this will insert a
row before the row you have selected.
Charts or
graphs
Numbers can
usually be represented quicker and to a
larger audience in a picture format.
Excel has a chart program built into its main program. The Chart Wizard
will sep you through question that will (basically) draw the chart from the
data that you have selected. There are
many types of charts. The two most widely used are the bat chart and the pie
chart.
The BAR
Chart is usually used to display a change (growth or decline) over a time
period. You can quickly compare the
numbers of two different bar charts to each other. The PIE chart is usually used to look at what
makes up a whole something.
MICROSOFT POWERPOINT
Power Point is a powerful tool for
communicating ideas and information. It is used for classroom lessons, sales
presentations, training sessions, and any situation in which information is
presented to groups of people. PowerPoint allows you to place your content into
a presentation, a series of computer generated “slides” which can then be
projected for an audience, printed and distributed as handouts, published on
the Internet or used in numerous other ways. PowerPoint is a complete
presentation graphics package, that you can add text, various types of images,
sound and even video clips to your presentation to help engage your audience.
Open
PowerPoint.
Begin a new
presentation by clicking BLANK PRESENTATION
Or
Click Open
an Existing Presentation.
When you open PowerPoint, The
PowerPoint dialog box opens, offering the option to create a new presentation
or open one that already exists.
If PowerPoint
is already open or this box does not appear, select- File>New from the menu
bar. To open a PowerPoint presentation that you have already started:
WHEN YOU BEGIN A NEW PRESENTATION
YOU WILL SEE THIS WINDOW:
Choose the layout of the new
slide. These layouts include bulleted
lists, graphs, and / or images. Click on
each thumbnail image and a description will be printed in the message box. Highlight the layout you want and click OK.
APPLYING A DESIGN TEMPLATE:
To add a design template or changing
the existing one, select Format> Apply Design Template from the menu
bar.\Select the template and click Apply.
FINDING THE TOOLBARS
The toolbars contain graphically
illustrated buttons that you click to perform specific tasks in a program.
STANDARD TOOLBAR
The Standard toolbar is located at
the top of the PowerPoint window, below the menu bar. It has buttons for common tasks such as
saving, printing, checking spelling and inserting charts and tables.
FORMATING TOOLBAR:
The Formatting toolbar is located
just below the standard toolbar. Most of
its buttons are for formatting text. Use
these buttons to change the font type or size, make text bold or italic, indent
text and insert bullets.
DRAWING TOOLBAR
The Drawing toolbar is located at
the bottom of the PowerPoint window. It
has tools for drawing shapes, adding lines and curves and inserting text boxes
and Word art. It also has buttons for
manipulating and formatting the objects you draw.
ADDING NEW TOOLBAR
- Click the view menu, and then point to
Toolbars
- In the submenu, click the check box next
to animation effects. An animation
effects toolbars appears in the PowerPoint window,
REMOVING A TOOLBAR
PowerPoint lets you remove toolbars
you don’t need. Try removing the
animation effects toolbar you just activated.
- Click the View menu, and then point to
Toolbar.
- In the submenu, click the check box next
to animation effects to deselect it.
- The check mark disappears and the
animation effects toolbar is removed from your PowerPoint window.
SCREEN LAYOUTS
PowerPoint gives you four screen
layouts for working on your presentation.
You can change the page layout by clicking the buttons just above the
formatting toolbar and the bottom of the page.
Normal View
is best for putting together text and pictures.
This screen is split into three
sections showing the presentation outline on the left, the side in the main
window and notes at the bottom.
Slide Sorter
View: A small image of each slide is
displayed in Slide Sorter View. Slides
can be moved around by dragging them.
Click Slide
Show View to view the full slide show.
Or (press F5)
ADDING TEXT
The Title Slide Layout contains text
boxes for a title and subtitle. Try
typing text into these boxes.
- Click in the Title text box. A thick gray border appears around the
text box indicating that it is selected.
- Type a title.
- Click the Subtitle text box and type a
subtitle.
Adding New
Text to a Slide
- Click INSERT>TEXT BOX or
- Click the textbox icon on the toolbar
“Draw” the
text box on the slide by holding down the left mouse button while you move the
mouse until the box is the size you want it.
SPELL CHECK
Correct the spelling in the
presentation by selecting Tools > Spelling from the menu bar
The spell
checker will prompt you to make corrections.
If the word is spelled correctly,
click Ignore or Ignore All if the same word appears several times during the
presentation.
If the word is spelled wrong,
highlight one of the Suggestions or type own revision in the Change to
box. Click Change.
When the
spell checker has finished you will see a window telling you that the spelling
check is complete. Click OK.
ADDING ANOTHER SLIDE
1.
Click the
New Slide button from the Standard toolbar>Insert> New slide.
WORKING WITH
COLOR SCHEMES & CHOOSING BACKGROUNDS
Select
Format > Slide Color Scheme from the menu bar.
Click one of
the preset color schemes in the Color schemes box.
To make
changes to the color scheme, click the Custom tab on the dialog box. Change the colors by selecting a color and
clicking the Change color button.
Highlight
one of the colors from the Text and Line Color window or select the Custom tab
to view more colors choices and click OK when finished.
When you
have finished, click Apply to all to apply the color scheme to all the slides
in the presentation or Apply to add the scheme only to the current slide.
BACKGROUNDS
To add background colors and pattern
to a slide.
Select Format> Background from
the menu bar. Select a color from the
drop-down menu below Background fill or choose More colors for a larger
selection.
GRADIENT
§
Select one
color and select the color from the Color 1 drop-down menu.
§
Choose two
colors and select those colors from the Color1 and Color2 drop-down menus.
§
Preset
provides a selection of color combinations
§
Select the
type of gradient from shading styles
Click one of
the four Variants of the styles chosen.
TEXTURES
From the Texture window, select a
background or click Other Texture to select an image from a file.
PATTERNS
Select a two-time pattern by
clicking one of the patterns and selecting the Foreground and Background
colors.
PICTURE
Click the
Select Picture button to choose a picture from a file
Click OK to
apply the changes made from the Fill effects windows\Click Apply to all to add
the changes to every slide or Apply to make changes only to the current slide.
You can add
clip arts pictures and auto shapes to your presentation.
SLIDE ANIMATION
Select Slide Show> Custom
Animation from the menu bar
Select the Object on the slide that
will be animated from the Check to animate slide objects list
Under the
Effects tab, select the animation type and direction from the drop-down menus
and select a sound if you wish.
SLIDE TRANSISTIONS
§
Select Slide
Show> Slide Transition from the menu bar
§
From the
Effect section, choose a transition from the drop-down and notice the preview
after the transition is selected. Select
a speed for the transition as well.
WHAT IS THE CONTOCONTENT WIZARD?
The Auto content wizard is a good
option for creating a presentation if you are a beginner. The Auto content Wizard offers suggestions
for templates to use and types of content to put in. This option is also goof if you are in hurry
and want to create a presentation quickly.
WORKING WITH THE AUTOCONTENT
WIZARD
The Auto
content wizard will guide you through some simple steps.
1)
Read the
information on the start screen, then click Next
2)
In the next
dialog box, select the type of presentation you want to give, and then click
Next to advance to the next dialog box.
3)
Continue
entering options until you reach the Finish step.
4)
Click Finish
The Auto
content Wizard will display your presentation in Outline View. The outline is made up of sample slides, each
of which has a suggestions for the type of information that should be entered
in the slide. You can customize the
information in the slides in their Outline View or Slide View.
INTRODUCTION
TO DATABASE SYSTEMS
A database system is an overall
collection of different database software components and databases consisting
of Database Application Programs, Front End components (belonging to client
systems), Database Management System and databases.
A database application program is special purpose
software designed and developed for solving the problems of a business firm by
users or possibly by third party software companies. Front End components are
general-purpose software capable of managing client-side operations of a
database system designed and implemented by either the database company or delivered as third party
software.For example, Developer 2000 is a Front-End component of Oracle
Database company while Visual Basic and Power Builder are third – party Front
End tools.Userscan manage and query data within the database by using database
application programs and front – end
The tools. job of DBMS is to
manage data stored in a database. A database is viewed as a collection of data that
logically belongs together from the user’s prespective and a database is simply
a series of bytes stored on a disk from the DBMS perspective. Whatever be the
perspective, a database system has to provide the folloing services or features
as the case may be,
v
A variety of
user interfaces
v
Physical
data independences
v
Logical data
independence
v
Query
optimization
v
Data
integrity
v
Concurrency
control
v
Backup and
recovery
v
Security and
Authorization
DATABASES : WHAT THEY ARE AND HOW THEY WORK
A database is a collection of
information related to a particular subject or purpose,such as tracking
customer orders or maintaining a music collection. If your database isn’t stored a computer, or
only parts of it are, your may be tracking information from a variety of sources that you have to
coordinate and organize yourself.
HOW MS
ACCESS CAN HELP YOU
Using Microsoft
Access, you can manage all your information from a single database fill. Within
the fill, divide your data into separate storage containers called tables;
view, add and update table data using online forms; find and retrieve
Just the data you wand using queries ;
and analyze or print data in a specific layout using reports.
STRING DATA
To store data,
create one table for each type of information you track. To bring the data from
multiple tables together in a query, for, or report, you define relationship
between the tables
DATA
RETRIEVAL
To find and
retrieval just the data that meets condition you specify, including data from tables,
create a query. A query can also update or delete multiple records at the same
time, and perform built- in or custom calculations on your data
DATA
MANIPULATION
To easily view, enter, and change
data directly in a table, create a form. When you open a from, Microsoft access
retrieves the data from one or more tables and display it on screen using the layout
you choose in the Form Wizard or using a layout that you created from scratch.
DATA ANALYSIS
To analyze your data or present it
in a certain way print, create a report. For example, you might print one
report that groups data and calculated totals, and another report with
different data formatted for printing mailing labels.
RELATIONAL
DATABASE CONCEPTS:
The notation of Relational Database
management Systems-RDBMS was first introduced by E.F Codd in his articles “A
Relational Model for Large Shared Data Banks” in 1970. in contrast to earlier network and
hierarchical database systems, RDBMS are based upon the relational data model,
which has a strong mathematical background, that is RDBMS are based upon
relational algebra, which is a collection of operations that are used to
manipulate relations.
The central concept of the
relational data model is the relation-that is, a table. Therefore, from the user’s point of view, a
relational database contains tables and nothing but tables. In a table there are one or more columns and
zero or more rows. At every row or column position in a table there is always
exactly on data value. Each table in a
database has a unique name that identifies its contents. The row or record in the table is called
tuple. The column or field is called
attributes.
A DBMS can be regarded as relational
only if it obeys a set of 12 rules formulated by Dr.E.F.Codd. the rules are:
1. The
information rule
All information should be
represented as data values in the rows or columns of a table.
2. The
guaranteed access rule
Every item of data must be logically
addressable by specifying a combination of table name, the primary key value
and the column name.
3. The
systematic treatment of null values
It is fundamental to the DBMS that
null values are supported in the representation of missing and inapplicable
information. This support for null
values must be consistent throughout the DBMS and independent of data
types. For example, a null value in a
CHAR field must mean same as null value in an INTEGER or DATE field.
4. The
database description rule
A description of the database is
held and maintained using the same logical structures used to define the data,
thus allowing authorized users to query such information in the same way and
using the same language as they would do for any other data in the database.
5. The
comprehensive sub-language rule
A relational
DBMS must support atleast one language,
a. Whose
statements can be expressed as character strings conforming to some well defined syntax.
b. Which is
comprehensive and supports all of the following
o
Data
Definition
o
Data
Manipulation
o
View
definition
o
Integrity
constraints\Authorization or data control
o
Transaction
boundaries (commit rollback)
6. The view
update rule
All views that can be updated in
theory can also be updated by the system.
It is possible to create views in all sorts of illogical ways and with
all sorts of virtual columns. It is not
possible to update through some of them.
For example, if you define a virtual column in a view as A * B where A and
B are columns in a base table, then you cannot perform an update on that
virtual column directly.
7. The
insert, update and delete rule
The capability of handling bas
relation, or in fact a delivered relation, as a single operand must hold good
for all retrieve, insert, update and delete activity. Retrieval of data can deal with a set of
rows. Other operations can also be deal
with a set of rows.
1.
The Physical
data independence rule
Application
programs and terminal activators remain logically impaired whenever any changes
are made in either storage representations or storage methods. For examples, if an index is built or
destroyed by the DBA on a table, any user should still retrieve the same data
from the table.
9. The
Logical data independence rule
Application programs and terminal
activities remain logically unimpaired whenever any information preserving
changes of any kind, that theoretically permitted, are made to the base tables.
10.
Integrity independence rule
Integrity constraints specific to be
particular relational database must be definable in the relational data
sub-language rule and stored in the database as data in tables.
The
following integrity rules should apply to every relational database
o
No component
of a primary key can have null values- this is the basic rule of entity
integrity.
o
For each
distinct foreign key value there must exist a primary key value in the same
domain-this rule ensure referential integrity.
11.
Distribution independence rule
A relational DBMS must have
distribution independence. This rule
states that applications running on a non-relational database must remain
logically unimpaired t that data should then become distributed.
12. Non
Subversion rule
If a relational system has a low
level language, that low level language cannot be used to subvert or bypass the
integrity rules and constraints expressed in the higher relational language.
Data
structure of an RDBMS showing the keys:
Table
|
|
|
|
|
|
|
|
|
|
|
Concatenated
Key
Foreign Key
Candidate Key
KEYS:
A key is a single attribute or
combination of two or more attributes of an entity set that is used to identify
one more instances of that set. In fig. The attribute ‘item number’ uniquely
identifies an instance of the entity set is termed as Primary Keys.
When a single attribute cannot
identify a row uniquely but a combination of attribute can uniquely identify a
row, then such combinations of attributes are termed as concatenated keys or
composite keys.
If we add additional attribute to a
primary key, the resulting combination would still uniquely identify an
instance of the entity, set, such augmented keys are called super keys. A primary key is therefore, a minimum super
key. For example in customer entity set,
customer name can also uniquely identify that particular customer apart from
customer. Here we have more than one
attribute that uniquely identify an instance of an entity set. These attributes are called candidate keys.
In such cases we must decide which of
the candidate keys will be used as primary key.
The remaining could be considered as Alternate keys.
A Secondary Key is an attribute or
combination of attributes that may not be a candidate key but that classifies
the entity set on a particular characteristic.
A case important is the entity set COSTOMER having the attribute
‘country’ which identifies by its value all instances of customers who belong
to country, so the country attribute is not a candidate key for the entity set
CUSTOMER, since it cannot uniquely identify an individual; customer. However the ‘country’ attribute does identify
all customers belonging to a given country.
An attribute
in one table whose values matches the primary key in some other table is called
a Foreign Key. For example, the ‘customer number’ in transaction table refers
to the values in ‘customer number’ column in customer table.
2. PLANNING
AND DESIGNING A DATABASE
Designing a database is a very
important phase in a database life cycle, which precedes all other phases except
the requirements collection and analysis.
If the database design in created merely intuitively and without any
plan, the resulting database will most likely not meet the user requirements
concerning performance. Another
consequence of a bad database design is superfluous data redundancy, which
itself has two disadvantages, the existence of data anomalies and the use of an
unnecessary amount of disk space.
Normalization theory is build around
the concept of normal forms.
Normalization reduces redundancy.
Redundancy is unnecessary repetition of data. It can cause problems with storage and
retrieval of data. During the process of
normalization, dependencies can be identified, which can cause problems during
deletion and updation. Normalization helps
in simplifying the structure of tables.
There are four levels of Normalization.
FIRST NORMAL FORM
For easier understanding of the
first normal form, consider an example.
One employee has different project codes. Hence the project code is said to be functionally
dependent on the attribute Ecode. Now
consider an un-normalized data that is represented in the following table.
Ecod
|
Dept
|
Projecode
|
Hours
|
101
342
987
|
Accounts
Admin
Sales
|
20
40
41
56
87
20
45
|
90
101
60
50
92
48
67
|
A relational
Model does not permit or support such un-normalize tables. The data table must
be present atleast in the first normal form, which appears as shown in the
table.
Ecod
|
Dept
|
Projecode
|
Hours
|
101
101
101
342
342
987
987
|
Accounts
Accounts
Accounts
Admin
Admin
Sales
Sales
|
20
40
41
56
87
20
45
|
90
101
60
50
92
48
67
|
Second
normal Form
In the previous normal dorms it was
noted hat there was redundancy of data, and hence the table was decomposed
without any loss of information. The
problems encountered here were:
| Insertion:
Employee details cannot be recorded until the employee is assigned a project.
| Updation:
The employee code and department is repeated.
Hence if an employee is transferred to another department, these changes
must be reflect everywhere. Any omission
will lead inconsistencies.
| Deletion:
If an employee completed his project, his record will be deleted and details
pertaining to that employee lost.
From the
table given below easier understanding in enabled.
Ecode
|
Dept
|
101
343
987
|
Accounts
Admin
Sales
|
Ecod
|
Projecode
|
Hours
|
101
101
101
343
343
987
987
|
20
40
41
56
87
20
45
|
90
101
60
50
92
48
67
|
It should be
noted that for a table to be in the second form it should also be in he first
normal form and every attribute in the record should functionally depend on the
primary key.
Third normal
Form
A table is said to be in the third
normal form if it in second normal form and every non-key attribute is
functionally dependent on just the primary key.
The primary key here is Ecode.
The attribute dept-code is dependent on dept. There is an indirect dependence on the
primary key, which has to be noticed. It
is illustrated in the following table.
Ecod
|
Dept
|
Dept-Code
|
101
303
400
500
600
777
|
Finance
Sales
Sales
Admin
Systems
Finance
|
909
906
906
908
901
909
|
Even here it
was noted hat there were problems during insertion, updation ad deletion. The relation is thus reduced as shown in the
following table.
Ecod
|
Dept
|
101
303
400
500
600
777
|
Finance
Sales
Sales
Admin
Systems
Finance
|
Dept
|
Dept-code
|
Systems
Sales
Admin
Finance
|
901
906
908
909
|
Each no-key
attribute is wholly dependent only on the primary key.
3. CREATING
A DATABASE
Collections of tables are called a
database. Suppose a company contains
employee and their department details.
To create a database on this data, as per normalization rules we need
two tables.
Emp Table
Dept. Table
So to create
a database the following steps are followed.
1.
Select new
from the File menu
2.
Select
Database and press OK
3.
Select the
folder, filename and click Create.
Now your
database has been successfully created
Other way you can create database
user database wizard. In which tou have
to select the type of database to want to create. The wizard will provide you the different
types of table in that particular Database.
You need to select just the table names you want to add into your
database. The following steps to be
followed to create a database using wizard.
1.
Select new
from File menu as above
2.
See the
following window. Select the Database Tab.
3.
Choose
inventory Control for example, click OK.
4.
Select the
folder and File name
5.
6.
Next
7.
8.
Select the
tables and check the fields you want to create. Click Next
9.
10.
Select the
style from the wizard
11.
select the
report style
12.
Enter the
title of the database to be created
13.
Click Finish
14.
Enter the
Company details
15.
Click the
Close Button
16.
The
following are the objects created by MS Access Database Wizard
17.
Use the
following window to use the database to view, add, delete records
4.
BUILDING AND
MODIFYING TABLES
TABLE
CREATION FOR STORING DATA
A table is a collection of data
about a specific topic, such as products or suppliers. Using a separate table for each topic means
that you store hat data only once, which your database more efficient, and
reduces data entry errors.
Employee and
Department Table.
DEPT Table
Dept No
|
Department
Name
|
10
20
30
40
|
Accounts
Finance
Research
Marketing
|
EMP Table
Emp No
|
Employee
Name
|
Job
|
Salary
|
Dept. No
|
101
102
103
104
105
|
Miller
Scott
Blake
Kin
Smith
|
Clerk
Analyst
Clerk
Manager
Manager
|
2000
3500
2200
5000
5500
|
20
20
10
20
10
|
Table
organize data into columns (called Fields) and rows (called Records)
Each field in the EMP table contains
the same type of information for every employee, such as Employee’s name.
Each record in the EMP able contains
all the information about one employee, such an Employee Name, Dept No, Salary
and so on.
Field
A common field relates two tables so
that Microsoft access can bring together the data from the two tables for
viewing, editing or printing
DEPT Table
Dept No
|
Department
Name
|
10
20
30
40
|
Accounts
Finance
Research
Marketing
|
In the
department table you enter a Department No, Department name and so on for each
department.
EMP Table
Emp No
|
Employee
Name
|
Job
|
Salary
|
Dept. No
|
101
102
103
104
105
|
Miller
Scott
Blake
Kin
Smith
|
Clerk
Analyst
Clerk
Manager
Manager
|
2000
3500
2200
5000
5500
|
20
20
10
20
10
|
Shaded
columns are the common field, which relates two tables.
In table design view you can create
an entire table from scratch, or add, delete or customize the fields in an
existing table
In table Datasheet view you can add,
edit, view or otherwise work with the data in a data in a table. You can also display reorder from tables that
are related to the current table by displaying sub datasheets with the main
datasheet. With some restrictions, you
can work with the data in sub datasheets in many of the same ways that you work
with data in the main datasheet.
CREATE A
TABLE FROM SCRATCH IN DESIGN VIEW
1.
If you haven’t
already done so, switch to the Database window.
You can press F11 to switch to the Database window from any other
window.
2.
Click Tables
under objects and then click New on the Database window toolbar
3.
Double click
Design View
4.
Define each
of the fields in your table.
To add a
field to a table in Design View
i.
Open the
table in design view
ii.
To insert
the field within the table click in the row below where you want to add the
field, and then click Insert Rows on the toolbar
iii.
To add the
field to the end of the table, click in the first blank row
iv.
Click in the
field Name column and type the name for the field, following MS Access object-naming
rules.
v.
In the Data
Type column, keep the default (Text) of click in the Data Type column, click
the arrow and select the data type you want.
vi.
In the Description
column, type a description of the information this field will contain. This description is displayed on the status
bar when adding data to the field and is included in the Object Definition of
the table. The description is optional.
vii.
If you want,
set field properties for the field in the bottom part of the window. If this is a linked table, you can’t add a
new field in the current database. If
the linked table is MS Access table, you must open its source database to add a
field. If the linked table is form
another application, you must open the source file with that application to add
a field.
5.
Define a
primary key field before saving your table.
To set or
change the primary key
i.
Open a table
in Design view
ii.
Select the
field or fields you want to define as the primary key
To select
one field, click the row selector for the desired field.
To select
multiple fields hold down the CTRL key and then click the row selector for each
field.
Notes:
§
You can
specify a primary key for a field that already contains data, but MS Access generates
a message when you save the table if it
finds duplicate values of Null values in the field. If you encounter this message, you have three
choices: use a Find Duplicates query to locate records with duplicate values of
Null values and then edit the field to remove them; choose a different field;
or add an Auto number field and set it as the primary key
§
In a
multiple-filed primary key, field order may be important to you. The fields in a multiple-fields primary key
are sorted according to their order in table Design view. If you want a different order, first specify
the fields for Primary key as described in the preceding procedure, and then
click Indexes on the toolbar to display the Indexes window and reorder the
field names for the index named Primary Key.
§
You don’t
have to define a primary key, but it’s usually a good idea. If you don’t define a primary key, MS Access
asks if you want it to create one for you when you save the table.
6.
When you are
ready to save your table, click Save on the toolbar, and then type a name for
the table following MS Access object-naming rules.
OPEN A TABLE
i.
In the
Database window, click Tables under Objects
ii.
Click the
name of the table you want to open
iii.
To open the
table in Design view, click Design on the Database window toolbar
To open the
table in Datasheet view, click open on the Database window toolbar
To open table in design view, go to
the database window, click Tables under objects, select the table, and then
click the Design button on the database window toolbar. If the table is already open you can switch
between Datasheet and Design view.
Click thus
button to change to the view indicated by the button graphic.
If you want to track additional data
in a table, add more fields. If an existing field name isn’t descriptive
enough, you can rename the field.
Add a field
to a table by entering the field name and data type in the upper portion o
Design view.
Rename the
field by changing its name in the Field Name column.
Setting a field’s data type defines
what kind of values that you can enter into a field. For example, you can’t enter text into a
currency field, by choosing an appropriate data type, you can ensure that data
is entered in the correct form for sorting, performing calculations and other
operations.
Field properties are a set of
characteristics that provide additional control over how a field works. For example, depending on your Regional
Settings in Windows Control Pane, setting the Format property to Currency data
type automatically adds commas, a dollar sign and two decimal places
($1,234.50)
|
You can use
a unique tag called a primary key, to identify each record in your table. Just as a license plate number identifies a
car, the primary key uniquely identifies a record.
A table’s primary key is used to
refer to a table’s records in other tables.
For example the ProductID from the products table is used to refer to
product information so that it can be viewed or printed with order information
form the order and order details tables.
ADD NEW DATA
IN DATASHEET
·
Open a
Datasheet
·
Click New
Record on the toolbar
·
Type the
data you want, and then press TAB go to the next field.
·
At the end
of the record, Press TAB to go to the next record
EDIT THE
DATA IN A FIELD IN DATASHEET OR FORM VIEW
1.
Open a
Datasheet, or form in Form view
2.
To edit data
within a field, click in the field you want to edit
To replace
the entire value, move the pointer to the leftmost part of the field until it
changes into the plus pointer, and then click.
3.
Type the
text you want to insert
Notes
| If you
make a typing mistake Press BACKSPACE key.
Choose a primary your changes in the current filed, press ESC. If you want to cancel your changes in the
entire record, press ESC again before you move out of the field.
| When you
move to another record, Microsoft Access saves your changes
Resize rows
in Data sheet view.
1)
Open a table
in datasheet view
Position the
pointer between two record selectors at the left side of the datasheet, as
shown in the following illustration.
2)
Drag the edge
of the row until the row is the desired height
CHANGE THE
COLUMN WIDTH IN T ATABLE
·
Rest the
pointer on the column boundary you want to move until it becomes, and then drag the boundary until the column is the
width you want.
Notes:
§
To change a
column width to a specific measurement, click a cell in the column. On the
Table menu, click Table Properties and then click the Column tab, Choose
the options you want.
§
To make the
columns in a table automatically fit the contents, click a table, point to Auto
fit on the Table menu, and then click Auto fit to Contents.
§
To display
column width measurements, click a cell and then hold down ALT as you drag the
markers on the ruler.
CHANGING THE
ORDER OF COLUMNS
You can use the Column Order
property to specify the order of the columns in Datasheet view.
Note:
The Column order property applied to
all fields in Datasheet view and to form controls when the form is in Datasheet
view.
SETTING
You can set this property by
selecting a column in datasheet view and dragging it to a new position.
SET OR
CHANGE THE PRIMARY KEY
1.
Open a table
in Design view
2.
Select the
field or fields you want to define as the primary key.
To select
one field, click the row selector for the desired field
To select
multiple fields, hold down the CTRL key and then click the row selector for
each field.
3.
Click
Primary Key on the toolbar
5. DEFINING
RELATIONSHIP
WHY DEFINE
RELATIONSHIP?
After you’ve set up different tables
for each subject in your Microsoft Access Database, you need a way of telling
Microsoft Access how to bring that information back together again. The first step in this process is to define
relationship between your tables. After
you’ve done that, you can create queries, forms and reports to display
information from several tables at once.
For examples, this form includes information from five tables.
HOW DO
RELATIONSHIP WORK?
In the previous example, the fields
in five tables must be coordinated so that they show information about the same
order. This coordination is accomplished
with relationships between tables. A
relationship works by matching data in key fields-usually a field with the same
name in both tables. In most access
these matching fields are the primary key from one table, which provides a
unique identifier for each record, and a foreign key in the other table. For example, employees can be associated with
orders they’re responsible for by creating a relationship between he Employees table and
the Orders table using the EmployeeID fields.
A ONE-TOMANY
RELATIONSHIP
A one-to-many relationship is the
most common type of relationship. In a
one-to-many relationship a record in Table A can have many matching records in
Table B, but a record in Table B has only one matching record in Table A.
A MANY
–TO-MANY RELATIONSHIP
In a many-to-many relationship, a
record in Table A can have many matching records in Table B, and a record in
Table B can have many matching records in Table A. this type of relationship is only possible by
defining a third table (called a junction table) whose primary key consists of
two fields- the foreign keys from both Tables A and B. A many-to-many relationship is really two
0ne-to-many relationships with a third table.
For example, the Orders table and the Products table have a many-to-many
relationship that’s defined by creating two one-to-many relationships to the
Order Details table.
A ONE-TO-ONE
RELATIONSHIP
In a one-to-one relationship, each
record in Table A can have only one matching record in Table B and each record
in Table B can have only one matching record in Table A. This type of relationship is not common,
because most information related in this way would be in one table. You might use a one-to-one relationship to
divide a table with many fields, to isolate part of a table for security
reasons, or to store information that applied only to a subset of the main
table. For example, you might want to
create a table to track employees participating in a fundraising soccer game.
DEFINING
RELATIONSHIPS
You define a relationship by adding
the tables that you want to relate to the relationships window, and then
dragging the key field from one table and dropping it on the key field in the
other table.
The kind of relationship that
Microsoft Access creates depends on how the related fields are defined.
§
A
one-to-many relationship is created if only one of the related fields is a
primary key or has a unique index.
§
A one-to-one
relationship is created if both of the related fields are primary keys or have
unique indexes.
§
A
many-to-many relationship is really two one-to-many relationships with a third
table whose primary key consists of two fields- the foreign keys from the two
other tables.
DEFINE
RELATIONSHIPS BETWEEN TABLES
1.
Close any
tables you have open. You can’t create
or modify relationships between open tables.\
2.
If you
haven’t already done so, switch to the Database window. You can press F11 to switch to the Database
window from any other window.
3.
Click
Relationships on the toolbar.
4.
If you
database doesn’t have any relationships defined the Show table dialog box will
automatically be displayed. If you need
to add the tables you want to related and the Show Table dialog box isn’t
displayed, click Show Table on the toolbar.
If the tables you want to relate are already displayed, skip to step 6
5.
Double-click
the names of the tables you want to relate, and then close the Show Table
dialog box.
6.
Drag the
field that you want to relate from one table to the related field in the other
table.
To drag
multiple fields, press the CTRL key and click each field before dragging them.
In most
cases, you drag the primary key field (which is displayed in bold text) from
one table to a similar field (often with the same name) called the foreign key
in the other table. The related fields
don’t have to have the same names, but they must have the same data type (with
two exceptions) and contain the same kind of information. In addition, when the matching fields are
Number fields, they must have the same Field Size property setting. The two exceptions to matching data types are
that you can math an Auto Number field with a Number field whose Field Size
property is set to Long integer, and you can match an Auto number filed with a
number field if both fields have their Field Size property set to Replication
ID.
7.
The Edit
Relationships dialog box is displayed.
Check the field names displayed in the two columns to ensure they are
correct. You can change them if
necessary.
Set the
relationship option if necessary. For
information about a specific item in the Relationship dialog box, click the
question mark button, and then click item.
8.
Click the
Create button to create the relationship
9.
Repeat steps
5 through 8 for each pair of tables you want to relate.
When you
close the Relationship window, Microsoft Access asks if you want to save the
layout. Whether you save the layout or
not, the relationships you create are saved in the database.
EDIT AN
EXISTING RELATIONSHIP
1.
Close any
tables you have open. You can’t create
or modify relationships between open tables.\
2.
If you
haven’t already done so, switch to the Database window. You can press F11 to switch to the Database
window from any other window.
3.
Click
Relationships on the toolbar.
4.
If the
tables whose relationship you want to edit aren’t displayed, click show Table
on the toolbar and double-lick each table you want to add.
5.
Double-click
the relationship line for the relationship you want to edit.
6.
Set the
relationship options. For information
about a specific item in the Relationship dialog box, click the question mark
button, and then click the item.
DELETE A
RELATIONSHIP
1.
Close any
tables you have open. You can’t delete
relationships between open tables
2.
If you
haven’t already done so, switch to the Database window. You can press F11 to switch to the Database
window from any other window.
3.
Click
Relationships on the toolbar.
4.
If the
tables whose relationships you want to delete aren’t displayed, click Show
Table on the toolbar and double-click each table you want to add. Then click Close.
5.
Click the
relationship line for the relationship you want to delete (the line will turn
bold when it’s selected) and then press the DELETE key.
WHAT IS
REFERENTIAL INTEGRITY?
Referential integrity is a system of
rules that Microsoft Access uses to ensure that relationships between records
in related tables are valid and that you don’t accidentally delete or change
related data. You can set referential
integrity when all of the following conditions are met:
§
The matching
field from the primary table is a primary key or has unique index.
§
The related
fields have the same data type. There
are two exceptions. An Auto number field
can be related to a Number field with a Field Size property setting of Long
integer, and an Auto number field with a Field size property setting of
Replication ID can be related to a Number field with a Field Size property
setting of Replication ID.
§
Both tables
belong to the same Microsoft Access database,
if the tables are linked tables, they must be table in Microsoft Access
format, and you must open the database in which they are stored to set
referential integrity. Referential
integrity can’t be enforced for linked tables from databases in other formats.
When
referential integrity is enforced, you must observe the following rules:
§
You can’t
enter a value in the foreign key field of the related table that doesn’t exist
in the primary key of the primary table.
However you can enter a Null value in the foreign key, specifying that
the records are unrelated. For example,
you can’t have an order that is assigned to a customer that doesn’t exist, but
you can have an order that is assigned to no one by entering a Null value in
the CustomerID field.
§
You can’t
delete a record from a primary table if matching records exist in a related
table. For example, you can’t delete an
employee record from the Employees table if there are orders assigned to the
employee in the Orders table.
§
You can’t
change a primary key value in the primary table, if that record has related
records. For example, you can’t change
an employee’s ID in the Employees table if that there are orders assigned to
that employee in the Orders table.
If you want
Microsoft Access to enforce these rules for a relationship, select the Enforce
Referential Integrity check box when you create the relationship. If referential integrity is enforced and you
break one of the rules with related tables, Microsoft Access displays a message
and doesn’t allow the change.
You can override the restrictions
against deleting or changing related records and still preserve referential
integrity by setting the Cascade Update Related Fields and Cascade Delete
Related Records check boxes. When the
Cascade Update Related Fields check box is set, changing a primary key value on
the primary table automatically updates the matching value in all related
records. When the Cascade Delete Related
Records check box is set, deleting a record in the primary table deletes any
related records in the related table.
CASCADING
UPDATES OR CASCADING DELETES
For relationships in which referential
integrity is enforced, you can specify whether you want Microsoft Access to
automatically cascade update and cascade deleted records. If you set these options delete and update operations
that would normally be prevented by referential integrity rules are
allowed. When you delete records or
change primary key values in a primary table, Microsoft Access makes necessary
changes to related tables to preserve referential integrity.
If you select the Cascade Update
Related Fields check box when defining a relationship anytime you change the
primary key of a record in the primary table, Microsoft Access automatically
updates the primary key to the new value in all related records. For example, if you change a customer’s ID in
the Customers table, the customer ID field in the Orders table is automatically
updated for every one of that customer’s orders so that the relationships isn’t
broken. Microsoft Access cascades
updates without displaying any message.
Note if the
primary key in the primary table is an Auto Number field, setting the Cascade Update Related Fields check box
will have no effect, because you can’t change the value in an Autonumber field.
If you select the Cascade Delete
Related Records check box when defining a relationship, any time you delete
records in the primary table, Microsoft access automatically deletes related
records in the related table. For example, if you delete a customer records
from the customer table, all the customer’s orders are automatically deleted from
the orders table (this includes records in the order details table related to
the orders records). When you delete records from a form or datasheet with the
C D R R check box selected, Microsoft access warns you that related records may
also be deleted. However, when you delete records using a delete query, Microsoft
Access automatically deletes the records in related tables without displaying a
warning.
QUERYING A
DATABASE
Queries:
What they are and how they work
You use queries to view, change and
analyze data in different ways. You can also use them as the source of records
for forms, reports, and data access pages.
Creating a
query (Design View)
1.
From the
Objects, Select Queries.
2.
Double click
on Create Query in Design View.
3.
Show Table Dialogue
Box appears.
4.
Select any
one the table to query and click Add and then close.
5.
Now select
Query dialog box appears.
6.
Lick an
additional table or query if desired and then select the field you want to use
from it. Repeat this step until you have all the fields you need.
7.
Follow the
directions in the wizard dialog box. In the last dialog box, you can choose
either to run the query or to see the query’s structure in Design View.
If the resulting
query isn’t exactly what you want, you can rerun the wizard or change the query
in Design View.
CREATING A
QUERY WITH A WIZARD
The Simple Select Query Wizard
creates queries that retrieve data from the fields you specify in one or more
tables or queries. If you want, the
wizard can also sum, count and average values for groups of records or all
records, and it can calculate the minimum or maximum value in field. You can’t limit the records it retrieves by
setting criteria, however.
1.
In the
Database window, click Queries under Objects and then click New on the Database
window toolbar
2.
In the New
Query dialog box, click Simple Query Wizard
3.
Click OK
4.
Click the
name of the table or query you want to base your Query on, and then select the
fields whose data you want to retrieve.
5.
Click an
additional table or query if desired, and then select the fields you want to
use from it. Repeat this step until you
have all the fields you need.
6.
Follow the
directions in the wizard dialog boxes.
In the last dialog box you can choose either to run the equerry or to see
the query’s structure in Design view.
If the
resulting query isn’t exactly what you want, you can rerun the wizard or change
the query in Design view.
CHOOSE THE
TABLE TO QUERY
1.
Open a query
in design view
2.
On the
toolbar, click Show Table
3.
In the Show
Table dialog box, click the tab that lists the objects whose data you want to
work with. If the table you need is in
another database or application, first link the table to the active database.
4.
Click the
name of the object you want to add to the query. To select additional objects one at a time
hold down CTRL while you click each object name. To select a block of objects, click the first
name in the block, hold down SHIFT, and then click the last name in the block.
5.
Click ADD,
and then click Close.
ADD FIELDSS
TO QUERY
In a query you add only those fields
whose data you want to view, set criteria on, group by, update or sort. In an advanced filter, you add only the
fields you want to use for sorting or specifying criteria and Microsoft Access
will automatically display all the fields in the filtered results
1.
Open a query
in Design view, or open a form or datasheet and display the Advanced Filter /
Sort window.
2.
In a query
make sure the field list for the table or query containing the filed you want
to add appears in the top portion of the window. You can add a table or query if the field
list you need isn’t in the query.
In the
Advanced Filter/Sort window, Microsoft Access displays the field list for the
underlying table, query or SQL statement automatically. You can’t add more tables or queries to this
window.
3.
Select one
or more fields from the fields list and drag them to the column in the grid.
ENTERING THE
QUERY CRITERIA
1)
Open a query
in Design view
2)
Click the
first Criteria cell for the field you want to set criteria for.
3)
Enter the
criteria expression by typing it or by using the Expression Builder. To display the Expression Builder,
right-click in the criteria cell and then click Build.
If your
query includes linked tables, the values you specify in criteria on fields from
the linked tables are case-sensitive-they must math the case of the values in
the underlying table.
When you view a sub datasheet in a
query, the Advanced Filter/Sort window contains the record source only for the
selected sub datasheet. To filter on
fields contained in the main datasheet or in a different sub datasheet, close
the Advanced Filter/Sort window, select the main datasheet or the sub datasheet
on which you want to set filter criteria, and then reopen the Advanced
Filter/Sort window.
4)
To enter
another expression in the same field or in another field, move to the
appropriate Criteria cell and enter the expression.
7. DIFFERENT
KINDS OF QUERIES
The Types of
Queries:
§
Cross Tab
§
Update
§
Delete
§
Append
§
Make Table
CROSS TAB
A Cross Tab query displays
summarized values(sum, count and average) from one field in a table and groups
them by one set of facts listed down the left side of the data sheet and
another set of facts listed across the top of the datasheet.
Cross Tab queries calculate a sum,
average, count or other type of total for data that is grouped by two types of
information-one down the left side of the datasheet and another across the top.
You create a cross tab query with a
wizard or from scratch in the query design grid. In the design grid, you specify with field’s
values will become column headings, which field’s values will become row
headings, and which fields values to sum, average, count or otherwise
calculate.
UPDATE QUERY
Make global changes to a group of
records in one or more tables. For
example you can raise prizes by 10percent for all diary products, or you can
raise salaries by 5percent for the people within a certain job category. With an update query, you can change data in
existing tables.
Change
records as a group using an update query:
a.
Create a
query, selecting the tables or queries that include the records you want to
update and the fields you want to use for setting criteria.
b.
In query
design view, click the arrow next to Query Type on the toolbar, ad then click
Update Query.
c.
Drag from
the filed list to the query design grid the fields you want to update or you
want to specify criteria for.
d.
In the
Criteria cell, specify the criteria if necessary
e.
In the
update to cell for the records that will be updated, click view on the
toolbar. This list won’t show the new
values. To return to query Design view,
click view on the toolbar again. Make any
changes you want in Design view
f.
Click Run on
the toolbar to update the records
Note: To
stop a query after you star it, press CTRL+BREAK
DELETE QUERY
It deletes a group of records from
one or more tables. For example you
could use a delete query to remove products that are discontinued or for which
there are no orders. With delete
queries, you always delete entire records, not just selected fields within
records.
About
deleting a group of records with a query:
You can use a single delete query to
delete records from a single table, from multiple tables in one-to-one
relationship, or from multiple tables in a one-to-many relationship, if
cascading deletes are enabled. However,
if you need to include the ‘Many” table along with the “one” table, in order to
add criteria, you must run the query twice, since a query can not delete
records from the primary table and the related tables at the same time.
You can distinguish a one-to-many
relationship in query design view by looking at the joins between tables. If one end of a join is marked with the
infinity symbol;, it is one-to-many relationship. If both ends are marked with a 1, it’s a
one-to-one relationship.
Delete
records by using a query that includes only the “one” table in a one-to-many
relationship:
When you run a delete query on the
“one” table in a one-to-many relationship, and you’ve enabled cascading deletes
for this relationship, Microsoft Access also deletes related records from the
“man” side.
Drag the
field that you want to relate from one table to the related field in the other
table
a.
Create a new
query that contains the “one” table from which you want to delete records
b.
In query
design view click the arrow next to Query type on the toll bar and then click
Delete Query.
c.
Drag the
asterisk (*) from the field list for the table to the query design grid
d.
To specify
criteria for deleting records, drag to the design grid the fields on which you
want to set criteria.
Where
appears in the Delete cell under this field as shown in the following
illustration.
e.
In the
criteria cell for the fields that you have dragged to the grid type the
criteria
f.
To preview
the records that will be deleted, click View on the toolbar. To return to query design view click View on
the toolbar again. Make any changes you
want in Design view.
g.
Click Run on
the toolbar to delete the records.
Note: To stop a query after you start it press CTRL+
BREAK.
APPEND QUERY
It add a group of records from one or more tables to
the end of one or more tables. For
example, suppose that you acquire some new customers and a database containing
a table of information on those customers.
To avoid typing, all this information in, you’d like to append it to
your customer’s table. Append queries
are also helpful for.
§
Appending
fields based on criteria. For example
you might want to append only the names and addresses of customers with
outstanding orders.
§
Appending
records when some of the fields in one table don’t exist in the other
table. For example, in the North wind
sample database, the customers table has 11 fields. Suppose that you want to append records from
another table that has fields that match 9 of the 11 fields in the customers
table. An append query will append the
data in the matching fields and ignore the others.
APPEND
RECORDS FROM ONE TABLE TO ANOTHER TABLE USING AN APPEND QUERY
1.
Create a
query hat contains the table whose records you want to append to another table
2.
In Query
Design view, click the arrow next to Query Type on the toolbar, and then click
Append. The Append dialog box appears.
3.
In the Table
Name box, enter the name of the table you ant to append records to.
4.
Click
Current Database if the table is in the currently open database. Or click Another Database and type the name
of the database where are table is stored.
Type the path if necessary. You
can also enter a path a a Microsoft FoxPro, Paradox or Dbase database, or a
connection string to an SQL database
5.
Click OK
6.
Drag from
the fields list to the query design grid the fields you want to append and any
fields you want to use for setting criteria.
Also. You may or may not want to add the primary key filed if it has an Auto
number data type.
If all the fields in both tables have the same
names, you can just drag the asterisk (*) to the query design grid. However, if
you’re working in a database replica, you’ will need to add all the fields
instead.
7. If the fields you’ve selected have the same
name in both tables, Microsoft
Access automatically
fills the matching name in the Append To
row.
If the fields in the
two tables don’t have the same name, in the Append To
row, enter the names of
the fields in the table you’re appending to.
8. In the Criteria cell for the fields that you
have dragged to the grid, type the
Criteria on which
additions will be made.
9 To preview the records that the query
will Append, click View on the
toolbar. To
return to query Design view, click view
on the toolbar
again. Make
any changes you want in Design view.
10.
Click Run on
the toolbar to add the records.
To stop a
query after you start it, pres CTRL+BREAK.
5. Make table Query
It creates a new table from
all or part of the data in one or more tables. Make table queries are helpful
for:
§
Creating a
table to export to other Microsoft Access databases. For example, you
might want to create a table that contains several fields from your
Employees table, and then export that table to a database used by your
personnel department.
§
Creating
data access pages that display data from a specified point in time. For example, suppose you want to display a
data access page on 15-may-96 that displays the first quarter’s sales totals
based on the data that was in the underlying tables as of 9:00 Am on
1-Apr-96. a data access page based on a
query or SQL statement extracts the most up to date data from the tables (the
data as on 15-may-96), rather than the records as a specific date and
time. To preserver the data exactly as
it was at 9:00AM on 1-Apr-96, create a make-table query at that point in time
to retrieve the records you need and store them in a new table. Then use this table, rather than a query, as
the basis for the data access page.
§
Making a
backup copy of a table
§
Creating a
history table that contains old records.
For example, you could create a table that stores all your old orders
before deleting them from your current Orders table.
§
Improving
performance of forms, reports and data access pages based on multiple-table
queries of SQL statements. For example,
suppose you want to print multiple reports that are based on a five table query
that includes totals. You may be able to
speed things up by first creating a make-table query that includes totals. You may be able to speed things up by first
creating a make-table query that retrieves the records you need and stores them
in one table. Then you can base the
reports on this table or specify the table in an SQL, statement as the record
source for a form, report, or data access page, so you don’t have to return the
query for each report. However, the data
in the table is frozen at the time you run the make-table query.
CREATE A NEW
TABLEFROM THE RESULTS OF A QUERY WITH AMAKE-TABLE QUERY
1)
Create a
query, selecting the tables or queries that contain the records you want to put
in the new table.
2)
In the query
Design view, click the arrow next to Query Type on the toolbar, and then click
Make Table. The Make Table dialog box
appears.
3)
In the Table
Name box, enter the name of the table you want to create of replace.
4)
Click
Current Database to put the new table in the currently open database. Or click another Database and type the name
of the database you want to put the new table in. type the path if necessary.
5)
Click OK
6)
Drag from
the filed list to the query design grid the fields you want in the new table
7)
In the
Criteria cell for the fields that you’ve dragged to the grid, type the criteria.
8)
To preview
the new table before you create it, click View on the toolbar. To return to query Design view and make
changes or run the query click View on the toolbar.
9)
To create
the new table, click Run on the toolbar
10)
To stop a
query after you start it, press CTRL+BREAK
The data in
the new table you create does not inherit the field properties or the primary
key setting from the original table.
8. BUILDING AND MODIFYING FORMS
We can use Forms for a variety of
purposes, i.e. to generate data-entry form to enter data into the table, to create
a custom dialog box to accept user input and then carryout an action based on
that input. We can say that Forms are
used for user interaction.
You create link between the form and
its record source by using graphical objects called controls. The most common type of control used to
display and enter data is a text box.
CREATING A
FORM
Create a form by using Auto form,
you select one record source and either columnar, tabular or datasheet layout:
auto Form creates a form that uses all the fields from the record source you
selected and all the fields and records in the underlying table or query. If the record source you select has related
tables or queries, the form will also include all the files and records from
those record sources.
1.
In the
Database window, click Forms under Objects
2.
Click the
New button on the Database window toolbar
·
Auto Form:
Columnar: Each field appears on a
separate line with a label to its left.
·
Auto Form:
Tabular: The fields in each record appear on one line, with the labels
displayed once at the top of the form
·
Auto Form:
Datasheet: The fields in each record
appear in row-and-column format, with one record in each row and one field in
each column. The field names appear at
the top of each column.
3.
In the New
Form dialog box, click one of the following wizards:
4.
Click the
table or query that contains the data you want to base your form on.
5.
Click OK
Microsoft
Access applies the last auto format you used to the form. If you haven’t created a form with a wizard
before or haven’t used the Auto format command on the Format Menu, it uses
standard auto format.
Create a form with a wizard: The wizard asks you detailed questions about
the record sources, field’s layout, and format you want and creates a form
based on your answers.
1.
In the
database window, click Forms under Objects
2.
Click the
New button on the Database window toolbar
3.
In the New
Form dialog box, click the wizard that you want to use. A description of the wizard appears in the
left side of the dialog box.
4.
Click the
name of the table or other record source that includes the data you want to
base your form on.
5.
Click OK
If you have
clicked Form Wizard, Chart Wizard, or Pivot Table wizard in step 3, follow the
directions in the wizard dialog boxes.
If you clicked Auto form: Columnar, Auto form: Tabular or Auto form:
Datasheet, Microsoft Access automatically creates your form.
USE THE
CONTROL TOOLBOX TO ADD THE CONTROLS
Controls are objects on a form,
report or data access page that display data perform actions or are used for
decoration. For example, you can use a
text box on a form, report or data access page to display data a command button
on a form to open another form or report, or a line or rectangle to separate
and group controls to make them more readable.
Microsoft Access includes the
following types of controls which are all accessible through the toolbox in
form Design view, report design view, or data access page design view, text
box, label, option group, option button, check box, list box, command button,
image control, line, rectangle and ActiveX, custom controls. Forms and reports have these additional
controls: toggle button, combo box, bound object frame,, unbound object frame,
sub form / sub report and page break. Data
access pages also include the drop-down list box, hyperlinks, scrolling text
and the Pivot Table list, spreadsheet and chart components.
Controls can be bound, unbound or
calculated. A bound control is tied to a
field an underlying table or query. You
use bound controls to display, enter and update values from fields in your
database. An unbound control doesn’t
have a data source. You can use unbound
controls to display information, lines, rectangles and pictures. The following illustration shows examples of
bound, unbound and calculated controls.
MODYFY
FORMAT PROPERTIES OF CONTROLS
Format properties of controls
include Format style, size, color caption etc.
to change the format properties of a control
·
Add control
into the form from the control tool box
·
Right Click
on the control. Select properties
·
From
the Format tab change the properties.
FORM
SECTIONS
You can increase the effectiveness
of a form by adding one or more section.
All forms have a details section, but a form can also include form
header, page header, page footer ad form footer sections.
CREATE A
CALCULATED CONTROL ON A FORM
a.
Open a form
in Design view
b.
Click the
tool in the toolbox for the type of control you want to use as the calculated
control.
Note: A text
box is the most common type of control to use to display a calculated value,
but you can use any control that has a Control Source property.
c.
On the form
or report, click where you want to place the control
d.
Do one of
the following:
If the
control is a text box, you can type the expression directly in the text box.
e.
For any
control, make sure the control is selected, click Properties on the toolbar to
display the control’s property sheet, and type the expression in the Control
Source property box. To use the
Expression Builder to create the expression in a Microsoft Access database
(.mdb), click the Build button next to the Control Source property box