View
217
Download
0
Category
Preview:
Citation preview
8/2/2019 Develop a Database Project
1/38
8/2/2019 Develop a Database Project
2/38
DATABASE APPLICATION SOFTWARE
8/2/2019 Develop a Database Project
3/38
Learning Outcomes
At the end of the lesson, you should be able to
1. Identify project requirement
2. Design database table
3. Create a database
4. Create two tables that include the primary key in
each table
5. Build a relationship between two table (query)
6. Enter data into the table content
7. Create a form that related to the table content
8/2/2019 Develop a Database Project
4/38
8/2/2019 Develop a Database Project
5/38
Develop a database project
Figure 1: Opening Microsoft Access
8/2/2019 Develop a Database Project
6/38
8/2/2019 Develop a Database Project
7/38
SITUATION A:
You want to create a database of your friends telephone
numbers. Majority of your friends have more than onetelephone numbers. The data that you will store in yourdatabase are Friend ID, Name, Address, Phone Numbersand Date of Birth. You want to create a database of your
friends telephone numbers. Majority of your friends havemore than one telephone numbers. The data that you willstore in your database are Friend ID, Name, Address,Phone Numbers and Date of Birth.
8/2/2019 Develop a Database Project
8/38
1. Project title Phone Book Database
Objective(s) To create a database of friend telephone numbers
2. Table 1 Table 2Table name FRIEND_INFO PHONE_INFO
Field names FriendID, Name, Address,
Date of BirthFriendID,Name,
Phone_Num1,
Phone_Num2
Primary key FriendID FriendID
The
relationship
between both
tables.
3. Name of forms FRIEND_INFO, PHONE_INFO
FRIEND_INFO PHONE_INFO
FriendID
Name
Address
Date of Birth
FriendID
Name
Address
Date of Birth
8/2/2019 Develop a Database Project
9/38
How To Create Database
8/2/2019 Develop a Database Project
10/38
8/2/2019 Develop a Database Project
11/38
Key in the field names related to your tables.
Field Names
8/2/2019 Develop a Database Project
12/38
Primary keyFriend ID
8/2/2019 Develop a Database Project
13/38
Click File and select Save as, then name your table FRIEND_INFOand click OK Button
8/2/2019 Develop a Database Project
14/38
To create the second table PHONE_NUM,
Field names for table PHONE_NUM
8/2/2019 Develop a Database Project
15/38
Build the relationship
between two table (query)
8/2/2019 Develop a Database Project
16/38
Click Tools and select Relationships
Relationship table
8/2/2019 Develop a Database Project
17/38
Click Show Table icon.Select FRIEND_INFO table.Click Add button
8/2/2019 Develop a Database Project
18/38
Select PHONE_NUM tableClick Add button.Then click Close button.
H S h R l i hi
8/2/2019 Develop a Database Project
19/38
How to Setup the Relationship
1. Click Relationships
2. Edit Relationships.
3. SelectFRIEND_INFO table.
4. Tick Enforcereferential Integrity.
5. click Create button.
8/2/2019 Develop a Database Project
20/38
The result after relationship has been created
Relationship between FRIEND_INFO and PHONE_NUM(Join type: One-to-Many)
8/2/2019 Develop a Database Project
21/38
How to enter data
into the table
8/2/2019 Develop a Database Project
22/38
8/2/2019 Develop a Database Project
23/38
Fill all the data given below into the FRIEND_INFO table.After entering all the data, click File and then Close.
Data for table FRIEND_INFO
8/2/2019 Develop a Database Project
24/38
Click the Tables tab and double click PHONE_NUM
8/2/2019 Develop a Database Project
25/38
Next, fill all the data given below intothe PHONE_NUM table.
After entering all the data,click File and then Close.
Data for table PHONE_NUM
8/2/2019 Develop a Database Project
26/38
How to create a FORM thatrelated to the table content
8/2/2019 Develop a Database Project
27/38
Click the Queries tab.Select Create query by using wizard
8/2/2019 Develop a Database Project
28/38
Choose FRIEND_INFO table, move all fields in the Available Fieldssection by using this icon Into the selected fields section. Thenclick Next
8/2/2019 Develop a Database Project
29/38
Choose PHONE_NUM table, then move Phone Numbers field in the
Available Fields section into the Selected Fields section using this icon click Next
8/2/2019 Develop a Database Project
30/38
Type MY PHONEBOOK for your query title. Then click Finish
Naming query
8/2/2019 Develop a Database Project
31/38
Click PERSONAL PHONEBOOK and click Open button
Opening PERSONAL PHONEBOOK database
8/2/2019 Develop a Database Project
32/38
Choose any layout given and then click Next.
8/2/2019 Develop a Database Project
33/38
Choose any style given and click Next.
8/2/2019 Develop a Database Project
34/38
Type PERSONAL PHONEBOOK for your form title. Then click Finish.
Naming the form
8/2/2019 Develop a Database Project
35/38
Data is displayed in form
8/2/2019 Develop a Database Project
36/38
8/2/2019 Develop a Database Project
37/38
Activity 1
textnumber Date / Timecurrency
2
8/2/2019 Develop a Database Project
38/38
Activity 2
Recommended