0 ratings0% found this document useful (0 votes) 64 views13 pagesBusiness Application Software
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
BUSINESS APPLICATION SOFTWARE-II
UNIT-IV
How to create Table in MS Access?
1. Open Microsoft Access.
2. Click CREATE from the Ribbon Menu
3. Click Table
WE S- O- D © Spacettips: Dotabase- C\UsersVAdministr FORM LAYOUT
B fn Form Wizard =f
G SO Re Seo
Application I] Table JTable SharePoint Query Query Form Form Blank ? Rey
Pans Deign tates Wand Desgn Design Form C2 MoreFoxms =
Templates Taber nee rer
Those two steps create a blank table,
Once you've created your table, you will need to add fields (these will contain the data). You
will also need to specify the type of data that the fields will contain (eg, text, number, date, ete).
You can also add extra rules about the type of data that can be entered into each field (eg, that
phone numbers should be entered this way, dates should be entered that way, ete), as well as other
properties for each field.
How to Add Fields in MS Access Table?
You can add new fields in several ways.
You can click on the Click to Add text and assign a data type for the new field (Access requires that
you assign each field a data type).
Tae
%
®
1 tape
= Access requires that you assign each field a data
type,
You can also add new fields simply by adding data directly into the cell underneath
the Click to Add text. Access will name each field “Field!”, “Field2”, ete. You should
rename these to something more meaningful (see Renaming Fields below),Access will also assign each field a data type, based on what you enter. This may
or may not be correct, so you should always check the data type of each field
Another way of adding a new field is to right-click on another field header, and
select Insert Field from the contextual dropdown menu, You can see this menu in the
screenshot for Renaming Fields (below).
You can also add fields in Design view.
How to Rename Fields in Ms Access Table?
To rename a field, right click on the field name and select Rename Field.
Base Se spe
WEEE ct coms semanas ach a
M10 12 GF Sein Ye Sawacann se]
[All Access Obje
Right clicking on a field name brings up a contextual menu, From here you can
rename the field, delete the field, insert a new field and more.
How to Save Database in MS Access?
1. Open the table that has the fields or fields that you want to save as a template.
2. Select the field or fields that you want to save for reuse,
3. On the Fields tab, in the Add & Delete group, click More Fields, and then click Save
Selection as New Data Type.
4, Inthe Create New Data Type from
ields dialog box
5. Click OK to save your data type template.ENTERING DATA IN ACCESS TABLE:
With our sales table created we can begin to enter our gathered sales data.
. Arecord is simply one entry in a table.
= You enter data into a table from left-to-right and you can only enter one
record per row.
To begin entering records, double-click the table you want to add records to.
. Double-click the table tbl_Sales
os
(Access 2000 file
Soper Deon Stew XK Aa
Ctyects |i] Create table n Dest
2 teties | GE create table by usr
7 Que || al
ceiuntas
7
SB roms
This brings up the Table Window and
u can see that o1 i
data, yet. you ur table contains no
CESS
1 Spe pel of 4
Bob's five sales are as follows (note: Bob is currently the only employee")
Sneaker - $40 eae
Sneaker - $60
Slipper - $5
Heel - $12
Dress - $150
Enter the information for Bob's first sale as follows:
Employee: Bob
Product: Sneaker
Price: $40
SaleNumber: 1like:
. Enter the remaining four sales so that your table looks
CIS
SaleNumber |
Pere
1
ie
ro
Dre
0]
MODIFYING DATA INTO AN ACCESS TABLE:
To edit data within a field, click in the field that you want to edit, and then
type the data.
. To replace the entire value,
the field until the pointer changes i
data.
Rete COLUMNs:
: In Interactive Reporting Studio, usin
click a column name, and select Properties
. Topic Item Properties is displayed.
Change the column name, ani
Store Id.
ss Repeat steps 1-2 to change the other column names.
For example, change Outlet to Store and Outlet Type to Store Type.
The display names of the columns are renamed,
Optional: Alternatively, to achieve an e
move the mouse pointer to the leftmost part of
into the plus pointer, and then click. Type the
UNIT-IV
\g the topic in the content area, right-
S.
id click OK. For example, change Outlet Id to
quivalent end result of changing the
display names, perform these actions:
= Drag a topic, for example Orders, onto the Interactive Reporting Studio
content area.
Rename the display names of the renamed columns and
. For example, a data model is created that can replace an
that uses only the Pew Customers topic. The edited topic now
matching the original topic and is a valid replacement.
the topic.
jother data model
exposes names
SAVE DATABASE:
To reuse a database or a database object, you use the Save
Open the database or database object.
On the File tab, click Save As.
the following steps: :
To cmea database in a different format, click Save Database As.
To gave a database object in a different format, click Save Object As
cope RELATIONSHIPS BETWEEN THE TABLES:
1. Close all tables and forms. (Right-click on the tab of any Obj
ect. Amenu
appears. Click Close All.)
Edit with WPS Office
As dialog:
tr epoeshins
2 Activate the Database Tools tab. ide group. The Relationship
3. Click the Relationships button in the Show/'
window appears
4 If anything appears in the relationships window, click the Clear Layout
button in the Tools group. you ae prompted, click Yes.
5. Click the Show Table button in the Relationships group. The Show Table
dialog box appears.
6. Activate the Tables tab if your relationshi;
ips will
the Queries tab if your relationships will be based on dateens scl Des, activate
tab if your relationships will be based on both oF activate the both
7. Double-click each table or query you want to use to build a relatio: hi
Nship. The
tables appear in the Relationships window.
8. Click the Close button to close the Show Table dialog box.
Student 1!
Fest Name
tast Name ‘Amount Due
Payment Amount
street Acaress
table's primary key over the related table's foreign k
Drag the Primary table's pr 2 table's box, the cursor changes 16 ny
9.
it L
After you drag the primary the cure
ow. Make sure the aro She votdigi ep THE dt Relationships Dialggbox appears.
Edit Relationships
nba Belated Teble/Query
overt (gente)
student!O— [=] Student 10
Cascade Qelete Related Records
| ah@ Oe tye: one-to-many |
10. Click the Enforce Referential Integrity checkbox.
11. Click Create. Access creates a one-to-many relationship between the tables.
Beas
vf Student 1D.
First Name
Payment ID
Student ID
Amount Due
LastName |
Street Address | _ Payment Amount
12. Click the Save button on the Quick Access toolbar to save the relationship941 Relationship in Access Database
This section describes how to define relationships in a Microsoft Access
database. It includes the following topics:
© What Are Relationship?
© Types of Relationship.
9.2.5 Creating Relationship
In Access, you store data in multiple tables and then use relationships to
join the tables. After you have created relationships, you can use data
from all of the related tables in a query, form, or report. A primary key is
a field or combination of fields that uniquely identify each record in a
table. A foreign key is a field in one table that must refer the primary key
in another table. You use primary keys and foreign keys to join tables
together. In other words, you use primary keys and foreign keys to create
relationships.
There are three valid types of relationships between tables:
© One-to-one relationship.
* One to many relationshi
‘* Many to many relationship.
ane
Suppose you have table A and table B. In one-to-one relationship, each
record in Table A can have only one matching record in Table ana
cach record in Table B can have only one matching record in Table &
This type of relationships is rare because if there is a one-one,
relationship, the data is usually stored in a single table. A one-tsoe
relationship is created if both ofthe related columns are primary keys or
have unique constraints. However, one-to-one relationship can ccowe
when you want to store the information in @ separate table for security
reasons, when tables have a large number of fields, or for other reasons
The following figure illustrates one-to-one relationship.
[Eustomeridjeustomer-name Jeky | [account-no. [balance]
200]
[Rani
Karim
[coor
ove example one customer should have only one sccount
ean aos ach account no ean be associated only with one eustomer-
id.pe Many Relationship
Kone-to-many relationship is the most
When tables have a one-to-m;
value is called the Primary tal
called the related table. Refe:
the relationship between two
the primary table that would
‘any relationship. the table with the one
ble and the table with the many values is
rential integrity ensures that the validity of
tables remains intact. It Prohibits changes to
invalidate an entry in the related table.
For example, one customer can have two account numbers. The
following figure illustrated the ‘one to many relationship.
M: jany Relationship
iene Bie relationship, a record in Table A
records in Table B, and a record in Table B can have many
sane records in Table A. This type of relationship is only possible
by defining third table called a junction table whose primary tags
Sonsists of two fields — the foreign keys from both Tables A and B A
many-to-many relationship is really two one-to-many relationships wie
a third table
can have manyThe following figure illustrated the many to many relationships. In this
example one customer can have one or many accounts and one account-
‘ho can have one or many customer.
[coor Rahim [Dhaka
[002 Karim Patna
003 Salam Dhaka
[coos Rafig [Comite
[00s (Qader Syihet
CREATING AN ACCESS FORM:
The form wizard is actually very useful and should save you a bunch of time!
» The
Let's create a simple data input form for the new employee!
.
1, Navigate to the Forms section in Access
> oreG08 : Database (Access 2000 file format)
2, Double-click "Create form by using wizard”
3. We want all of the fields from tbl_Sales to be included in this form, so first select
tbl_Sales from the drop down box "Tables/Queries”
need
Wey L mmaeng
sees
ae
‘Avedable Fekis
a . ||
selected field at a time, but we want all the
4, The single right arrow will add one
fields. The Saran to odd every field from a given table or query is to click the double
arrow button. Do that and click Next.
Edit with WPS Office5. Choose a Columnar layout and press Next
6. Choose any style and press Next (we chose "Sumi Painting")
7. Change the form's title to frm_EmployeeEntry and click Finish
What ttle do you want }
8. Open up your form and check it out!
Greate form by using wizard
SE frm _Employeetntry
sa
Record: 10 ITT > Inara of 5
Entering Data Using Access Forms:
© Open up frm_Employeetntry (easy!
* At the bottom of the form is a set of arrows to navigate through the records. To
Get to the end of the existing records and begin entering data you need to click the arrow
with an asterisk (*).
desl
* Clicking that button will bring you to the first blank record, which would be the
sixth in our case. You would th all the data for that record and click the right
Edit with WPS Officeee ee ee ee
ered,
arrow to advance to the next blank record. After all the new records have been ent
close the form and pat yourself on the back.
+ When you enter data into this form it will automatically add it to our existing
tbl_Sales because we specified that table when we created our form. With this form the
new employee will be able to enter data into Bob's existing Access table without ever
knowing a thing about tables!