You are on page 1of 47

Pengantar Komputer

Program Studi Diploma III Kebendaharaan Negara


Semester I Tahun 2018

PKNSTAN – BPPK – Kementerian Keuangan ©2017 1


Microsoft Access
Tabel & Relasi

2
3
Mengenal Ms Access

• Ms Access  Relational DBMS yang dibuat oleh Microsoft


• Menggabungkan database engine (Access Jet Database Engine),
antarmuka database dan tools pengembangan aplikasi.
• Mendukung Visual Basic for Applications (VBA)
• File format ACCDB (Access 2007 earlier) and MDB (Access 2003
earlier) formats
• Ms Access cocok digunakan untuk membuat aplikasi skala kecil,
misal point of sales (POS/kasir), & inventory.
4
Ms Access Limitation
• Max file database size ~ 2GB
• Max object in database = 32,768
• Max concurent access = 255
• Max table name length = 64 char
• Max field name length = 64 char
• Max field count in a table = 255

Reference: https://support.office.com/en-
us/article/Access-2016-specifications-
0cf3c66f-9cf2-4e32-9568-98c1025bb47c
5
Welcome Screen Ms Access
6
Create Database Baru
7
Create Database Baru
8
Create Table: Select Data Type
9
Data Type / Properties
Type of Data Description Size
Text or combinations of text and numbers, including numbers Up to 255 characters.
Short Text that do not require calculating (e.g. phone numbers).

Long Text Lengthy text or combinations of text and numbers. Up to 63, 999 characters.
Numeric data used in mathematical calculations. 1, 2, 4, or 8 bytes (16 bytes if
Number set to Replication ID).

Date/Time Date and time values for the years 100 through 9999. 8 bytes
Currency values and numeric data used in mathematical 8 bytes
Currency calculations involving data with one to four decimal places.

A unique sequential (incremented by 1) number or random 4 bytes (16 bytes if set to


AutoNumber number assigned by Microsoft Access whenever a new record Replication ID).
is added to a table.
Yes and No values and fields that contain only one of two 1 bit.
Yes/No values (Yes/No, True/False, or On/Off).
10
Data Type (Cont)
Data Types Description Size
Files, such as digital photos. Multiple files can be attached per Up to about 2 GB.
Attachment record. This data type is not available in earlier versions of
Access.
OLE objects can store pictures, audio, video, or other BLOBs Up to about 2 GB.
OLE objects (Binary Large Objects)
Text or combinations of text and numbers stored as text and Up to 8,192 (each part of a
Hyperlink used as a hyperlink address. Hyperlink data type can
contain up to 2048 characters).
A simple lookup field uses the contents of another table or a Dependent on the data type of
Lookup Wizard value list to validate the contents of a single value per row. A the lookup field.
complex lookup field allows you to store multiple values of the
same data type in each row.
You can create an expression
You can create an expression that uses data from one or more that uses data from one or
Calculated fields. You can designate different result data types from the more fields. You can designate
expression. different result data types from
the expression.
11
Create Table: Next To Other Field
12
Create Table: Save Table Name
13
Modify Structure Table
14
Import Data From File
15
Import Data From File
16
Import Data From File
17
Import Data From File
18
Import Data From File
19
Import Data From File
20
Import Data From File
21
Import Data From File
22
Latihan 1
23
Latihan 1 (lanjutan)
24
Latihan 1 (lanjutan)
25
Insert, Update, Delete Table Data
26
Lookup Wizard 1
27
Lookup Wizard 2
28
Hasil Lookup Wizard
29
Sorting
30
Sorting (lanjutan)
31
Opsi Sorting
32
Quick Filter
33
Filter by Selection
34
Filter by Condition
35
Custom Filter
36
Clear All Filter
37
Primary Key
38
Primary Key (lanjutan)
39
40
Show Table di Relationship
41
Buat Relasi
Jenis relationships
• 1. One to One, yaitu satu record data pada suatu table
dihubungkan hanya dengan satu record data pada table lainnya.
• 2. One to Many, yaitu satu record data pada suatu table
dihubungkan dengan lebih dari satu record data pada table
lainnya.
• 3. Many to Many, yaitu lebih dari satu record data pada suatu table
dihubungkan dengan lebih dari satu record data pada table
lainnya.
• Kita tidak bisa menghubungkan field dengan data type text
dengan field dengan data type number, jadi harus memiliki data
type yang sama
• Disarankan agar checkbox Enforce Referential Integrity selalu
diberi tanda Cheklist
relationships
 Enforce Referential Integrity, pilihan ini digunakan untuk
memastikan bahwa foreign key pada suatu table terdapat juga
pada primary key didalam table lainnya.
 Cascade Update Related Fields, pilihan ini digunakan untuk
mengupdate secara otomatis foreign key pada suatu table jika
primary key didalam table lainnya berubah. Pilihan ini akan aktif
jika Enforce Referential Integrity telah dipilih.
 Cascade Delete Related Record, pilihan ini digunakan untuk
menghapus foreign key pada suatu table jika primary key didalam
table lainnya dihapus. Pilihan ini akan aktif jika Enforce Referential
Integrity telah dipilih.
45
Latihan 2
46
Latihan 2 (lanjutan)
Terima Kasih

47

You might also like