Thursday, August 21, 2008

Database

Good database design ensures that your database is easy to maintain. You store data in tables and each table contains data about only one subject, such as customers. Therefore, you update a particular piece of data, such as an address, in just one place and that change automatically appears throughout the database.
A well-designed database usually contains different types of queries that show the information you need. A query might show a subset of data, such as all customers in London, or combinations of data from different tables, such as order information combined with customer information.
This query retrieves the order ID, company name, city, and required date information for customers in London whose orders were required in April.
The results you want from your database —- the forms and data access pages you want to use, and the reports you want to print —- don't necessarily provide clues about how you should structure the tables in your database, because you often base forms, reports, and data access pages on queries instead of tables.
Before you use Microsoft Access to actually build tables, queries, forms, and other objects, it's a good idea to sketch out and rework your design on paper first. You can also examine well-designed databases similar to the one you are designing, or you can open the Northwind sample database and then open the Relationships window to examine its design.
Follow these basic steps when designing your database.
Follow these basic steps when designing your database.
Determine the purpose of your database
The first step in designing a database is to determine its purpose and how it's to be used:
· Talk to people who will use the database. Brainstorm about the questions you and they would like the database to answer.
· Sketch out the reports you'd like the database to produce.
· Gather the forms you currently use to record your data.
As you determine the purpose of your database, a list of information you want from the database will begin to emerge. From that, you can determine what facts you need to store in the database and what subject each fact belongs to. These facts correspond to the fields (columns) in your database, and the subjects that those facts belong to correspond to the tables.
Determine the fields you need in the database
Each field is a fact about a particular subject. For example, you might need to store the following facts about your customers: company name, address, city, state, and phone number. You need to create a separate field for each of these facts. When determining which fields you need, keep these design principles in mind:
Include all of the information you will need.
Store information in the smallest logical parts. For example, employee names are often split into two fields, FirstName and LastName, so that it's easy to sort data by LastName.
· Don't create fields for data that consists of lists of multiple items. For example, in a Suppliers table, if you create a Products field that contains a comma-separated list of each product you receive from the supplier, it will be more difficult to find only the suppliers that provide a particular product.
Don't include derived or calculated data (data that is the result of an expression). For example, if you have a UnitPrice field and a Quantity field, don't create an additional field that multiplies the values in these two fields.
Don't create fields that are similar to each other. For example, in a Suppliers table, if you create the fields Product1, Product2, and Product3, it will be more difficult to find all suppliers who provide a particular product. Also, you will have to change the design of your database if a supplier provides more than three products. You need only one field for products if you put that field in the Products table instead of in the Suppliers table.
Determine the tables you need in the database
Each table should contain information about one subject. Your list of fields will provide clues to the tables you need. For example, if you have a HireDate field, its subject is an employee, so it belongs in the Employees table. You might have a table for Customers, a table for Products, and a table for Orders.
Determine which table each field belongs to
When you decide which table each field belongs to, keep these design principles in mind:
· Add the field to only one table.
Don't add the field to a table if it will result in the same information appearing in multiple records in that table. If you determine that a field in a table will contain a lot of duplicate information, that field is probably in the wrong table.
For example, if you put the field containing the address of a customer in the Orders table, that information will probably be repeated in more than one record, because the customer will probably place more than one order. However, if you put the address field in the Customers table, it will appear only once. In this respect, a table in a Microsoft Access database differs from a table in a flat file database such as a spreadsheet.
When each piece of information is stored only once, you update it in one place. This is more efficient, and it also eliminates the possibility of duplicate entries that contain different information.
Identify the field or fields with unique values in each record
In order for Microsoft Access to connect information stored in separate tables — for example, to connect a customer with all the customer's orders — each table in your database must include a field or set of fields that uniquely identifies each individual record in the table. Such a field or set of fields is called a primary key.

21 comments:

Dipo said...

dari: dimas probo XI sbi 0009

PAk bagus blognya,aq diajari pak.......

Kok ndak masuk kelas?????

layoutnya sama ma pak BAmbang D.S

Tanks Pak.

Dipo said...

pak, ni yohana. hahaha.
kompi ku ga isa buat kirim comment.
huhuuuuu...
duh,kok mlh jadi ky ngomen tmn ya.
ya es, pak.
blog nya bagus! maknyuss tnn.
inggris e ya jos nhoo.
sep2..^^
kpn2 ajari aku buat blog yaaa. ga bisa2 trs.
huh. see yaaa.. gud luck dee!

bellinda kuu said...

pak, ajari buat blog yaa!!

laper nii

nadya said...

Commentnya buat tugas???

Blognya ca'em kog

yey...

ajarin...

kok Bapak ga masuk terus?

nanti ujiannya gmana???

bellinda kuu said...

heheheee...

aku nggumun bisa kirim komen di blog,

hihihihiiiiiii...

luweeee

aisah said...

dari: aisah ayu n.p. XI SBI/02

WAH...CIP TUENAN PAK BLOG NYA...

AJARI PAK,BIar tAmBaH CaNgGIH,,HEHEHEH

KnP G mSuK PaK,,??

NasK SBI miss lOWh..

yuyun said...

dari : yunita

pak, blognya bagus. saya diajari cara buat blog juga donk =D

pak, katanya suruh baca blognya. tadi sudah saya baca tapi tidak tau artinya, hehe

sekian comment dari saya ^^

Andrey Arshavin said...

from : m. fidhzariyan XI IA ISS / 16

uhm, not too bad for the amateur.
=P

don't forget to visit me at fidhzariyan16.blogspot.com. maybe I can learn some blogging tips from u, sir. bcoz, I get some trouble with the layout and make a tree for my database..

*get well soon sir ! xP

mbumbul said...

dari karana XI sbi 13

pak...
blogna bgus n no comment...

caraneksiy lay out py pak???

Ola said...

pakk. . . .

Kok yoo ndadak pake basa inggris. . .

Aku kan jadi gag mudng artinya. . .


Klo suru buka blog gini kan qt jadi pengen punya blog juga. . .


PEENNGEEENN BGTTT. . . .

Selama ini cuma bisa utek2 frenster. . Ndeso sekali.

Untuk itu dibutuhkan seorang guru komputer yang berbudi besar, berjiwa pahlawan, menumpas penjajah, dan mengusir penyerang. . .


Merdeka!!!

Cupi said...

dari:Cupi

Pak,,,,aku pikir boggnya dah bagus and lucu..ya kurang di tambahi tampilan gambar bergerak yang menarik aja...oc...

salam,
Cupi_OCT.

farid said...

pak blog nya bgs tp kok ngak ada fotonya? malu ya pak?

q ngak tau tugasnya suruh apa?

pak jng lupa ajari blognya ya!

rafika/XI/SBI said...

hm....

mau ngmg apa ya....

bingung aku pak....

pokoknya bagus dh....

Bingung.....

bikin blog bayar gak pak????

hehehehehe.....

Thx

pamzativa said...

paak brataaa. . . . uda tak bacasmuanya.a.a.a.
walau gk ngerti apa maksutnya yang di karenakan banyak vokeb yang sy tak mengerti . . . . .

dan uda tak buat kommennt mkan. . . . walaupun kommentnya gk bermutu sama sekaliiii . . ..

dan ada satu halll. . . . ajarin bwt blog domz . . . . . . .

Dafi23 said...

pak.. kok ga ngisi pelajaran?

inggrise kok ya kerrenz pak??hehe..

kapan2 kita diajari buat blog ya pak..

tengkyu pak.. c u.. ^ ^

pamzativa said...

hii pak .

*arras pake punya pampambokephobibisul .

blognya bagus .
ajarin ya pak !

*)sukses terus pokoknya^^

bief_ve said...

pakkkk suszzzahhhh bkin komen d blog....

ajarii all about blog yua pakkk!!!!!

tp blog nyah uda baguz kq pakk,,cm layoutnya kurang menarikkk....

jd pengen punya blog...

makaciiee pakk...

monggo...

nuriell said...

Nurilla.19.XI-SBI

sip pak udah bca tapi gag mudeng artine . .
kalo cuma baca bs tapi gag mudeng ..
haha
besok kalo masuk ajari wae masalah database msti kita lasung mudeng . .
Kenapa og bapak gag masuk?

Astri Indra said...

Dari astri indra mustika

pak kenapa tadi gag masuk?
apakah mencret lagi?
pak udah dibaca tapi gag tau artine . .

wak_de said...

pak
saya dari rumah niee
wak_de pak
pak
berhubung tulisannya banyak banget
males baca pak
lgs komen aje ye
seipp

mindexplotion said...

setelah membaca,menimbang,memikir,melihat,memandang,memeriksa,dan seterusnya

klo boleh saya tarik catatan kecil
database bisa dikatakan sebagai suatu kumpulan dari data yang tersimpan dan diatur atau diorganisasikan sehingga data tersebut bisa diambil atau dicari dengan mudah dan efisien. Sebagai contoh sederhana dari database adalah buku telepon yang sering kita lihat.

thx yu

mindexplosion=rosit(24)


Blogspot Template by Isnaini Dot Com Powered by Blogger and Local Jobs