3.5 Perancangan Basis Data Fisikal
3.5.2 Merancang Representasi Fisik
3.5.2.3 Memperkirakan Kebutuhan Disk Space
Langkah ini bertujuan untuk mengestimasi jumlah kapasitas disk yang akan dibutuhkan oleh database. Perkiraan kapasitas penyimpanan untuk setiap tabel adalah sebagai berikut :
1. Input
Tabel 3. 30 Perkiraan Disk Input
Field Tipe Data Ukuran (Byte)
EmployeeID Char 6 CustomerID Char 5
InputDate Date 10
Kapasitas dari tabel Input adalah 11 bytes
168
Dalam satu tahun pertumbuhan tabel Input adalah 11*2=22 bytes Dalam lima tahun pertumbuhan tabel Input adalah 22*5=110 bytes Data awal pada tabel adalah 550 bytes
Total = 550+110 = 660 bytes
2. Customer
Tabel 3. 31 Perkiraan Disk Customer
Field Tipe Data Ukuran (Byte)
CustomerID Char 5 CustomerName Varchar 50 CustomerAdd Varchar 100 CustomerTaxNo Char 16 CustomerPhone Varchar 20 CustomerFax Varchar 20 CustomerCP Varchar 50 CustomerPass Varchar 20 DestinationAdd Varchar 100 Kapasitas dari tabel Customer adalah 381 bytes
Diperkirakan dalam 1 tahun terjadi 2 penambahan pelanggan baru Dalam satu tahun pertumbuhan tabel Customer adalah 381*2=762 bytes Dalam lima tahun pertumbuhan tabel Customer adalah 762*5=3810 bytes Data awal pada tabel adalah 19050 bytes
169 3. Delivery
Tabel 3. 32 Perkiraan Disk Delivery
Field Tipe Data Ukuran (Byte)
DeliveryID Varchar 20
DeliveryDate Date 10
WarehouseID Char 4
VehicleID Varchar 9
Kapasitas dari tabel Delivery adalah 43 bytes
Diperkirakan dalam 1 minggu terjadi 20 pembuatan surat jalan baru
Dalam satu tahun pertumbuhan tabel Delivery adalah 43*52*20=44720 bytes Dalam lima tahun pertumbuhan tabel Delivery adalah 44720*5=223600 bytes Data awal pada tabel adalah 0 bytes
Total = 0+223600= 223600 bytes
4. DetailMessage
Tabel 3. 33 Perkiraan Disk DetailMessage
Field Tipe Data Ukuran (Byte)
MessageID Char 8
Comment Varchar 200
CommentPost Varchar 50
CommentTime Date 10
Kapasitas dari tabel DetailMessage adalah 268 bytes
170
Dalam satu tahun pertumbuhan tabel DetailMessage adalah 268*365*100= 9782000 bytes
Dalam lima tahun pertumbuhan tabel DetailMessage adalah 9782000*5= 48910000 bytes
Data awal pada tabel adalah 0 bytes Total = 0+48910000= 48910000 bytes
5. DetailTransaction
Tabel 3. 34 Perkiraan Disk DetailTransaction
Field Tipe Data Ukuran (Byte)
DocumentNo Char 5 ProductID Char 10
Qty Int 11
DetailDate DateTime 10
Kapasitas dari tabel DetailTransaction adalah 36 bytes
Diperkirakan dalam 1 minggu terjadi 50 penambahan detail transaksi baru
Dalam satu tahun pertumbuhan tabel DetailTransaction adalah 36*52*50=93600 bytes
Dalam lima tahun pertumbuhan tabel DetailTransaction adalah 93600*5=468000 bytes
Data awal pada tabel adalah 0 bytes Total = 0+468000= 468000 bytes
171 6. Employee
Tabel 3. 35 Perkiraan Disk Employee
Field Tipe Data Ukuran (Byte)
EmployeeID Char 6 EmployeeName Varchar 50 EmployeeAdd Varchar 100 EmployeePhone Varchar 20 EmployeePass Varchar 20 PositionID Char 4
Kapasitas dari tabel Employee adalah 200 bytes
Diperkirakan dalam 6 bulan terjadi 10 penambahan karyawan baru
Dalam satu tahun pertumbuhan tabel Employee adalah 200*2*10=4000 bytes Dalam lima tahun pertumbuhan tabel Employee adalah 4000*5=20000 bytes Data awal pada tabel adalah 3000 bytes
Total = 3000+20000= 23000 bytes
7. Message
Tabel 3. 36 Perkiraan Disk Message
Field Tipe Data Ukuran (Byte)
MessageID Char 8
Topic Varchar 100
MessageTime DateTime 10
172
CustomerID Char 5 EmployeeID Char 6 Kapasitas dari tabel Message adalah 179 bytes
Diperkirakan dalam 1 hari terjadi 20 penambahan pesan baru
Dalam satu tahun pertumbuhan tabel Message adalah 179*365*20 = 1306700 bytes
Dalam lima tahun pertumbuhan tabel Message adalah 1306700*5 = 6533500 bytes
Data awal pada tabel adalah 0 bytes Total = 0+6533500= 6533500 bytes
8. Position
Tabel 3. 37 Perkiraan Disk Position
Field Tipe Data Ukuran (Byte)
PositionID Char 4
Position Varchar 30 Kapasitas dari tabel Position adalah 34 bytes
Diperkirakan tidak akan terjadi penambahan jabatan baru Dalam satu tahun pertumbuhan tabel Position adalah 0 bytes Dalam lima tahun pertumbuhan tabel Position adalah 0 bytes Data awal pada tabel adalah 238 bytes
173 9. Product
Tabel 3. 38 Perkiraan Disk Product
Field Tipe Data Ukuran (Byte)
ProductID Char 10 ProductName Varchar 50 ProductPrice Int 11 ProductTypeID Char 2 ProductSize Varchar 20 ProductImage Varchar 30
Kapasitas dari tabel Product adalah 123 bytes
Diperkirakan dalam 1 tahun terjadi 2 penambahan produk baru
Dalam satu tahun pertumbuhan tabel Product adalah 123*2=246 bytes Dalam lima tahun pertumbuhan tabel Product adalah 246*5=1230 bytes Data awal pada tabel adalah 3690 bytes
Total = 3690+1230=4920 bytes
10. ProductType
Tabel 3. 39 Perkiraan Disk ProductType
Field Tipe Data Ukuran (Byte)
ProductTypeID Char 2
ProductType Varchar 20 Kapasitas dari tabel ProductType adalah 22 bytes
174
Dalam satu tahun pertumbuhan tabel ProductType adalah 22 bytes
Dalam lima tahun pertumbuhan tabel ProductType adalah 22*5=110 bytes Data awal pada tabel adalah 66 bytes
Total = 66+110=176 bytes
11. Transaction
Tabel 3. 40 Perkiraan Disk Transaction
Field Tipe Data Ukuran (Byte)
DocumentNo Char 5 CustomerID Char 5 PurchaseOrderID Varchar 30 TransactionDate Date 10 MaturityDate Date 10 SalesConfirmDate Date 10 DeliveryID Varchar 20 EmployeeID Char 6 Status TinyInt 1 TransferNo Varchar 20 DeliveryStatus TinyInt 1 PaymentStatus TinyInt 1 Kapasitas dari tabel Transaction adalah 119 bytes
Diperkirakan dalam 1 minggu terjadi 20 penambahan transaksi baru
175 bytes
Dalam lima tahun pertumbuhan tabel Transaction adalah 123760*5=618800 bytes
Data awal pada tabel adalah 0 bytes Total = 0+618800=618800 bytes
12. PurchaseOrder
Tabel 3. 41 Perkiraan Disk PurchaseOrder
Field Tipe Data Ukuran (Byte)
PurchaseOrderID Varchar 30
EmployeeID Char 6 CustomerID Char 5 Kapasitas dari tabel PurchaseOrder adalah 41 bytes
Diperkirakan dalam 1 minggu terjadi 20 penambahan purchase order baru Dalam satu tahun pertumbuhan tabel PurchaseOrder adalah 41*52*20=42640 bytes
Dalam lima tahun pertumbuhan tabel PurchaseOrder adalah 42640*5=213200 bytes
Data awal pada tabel adalah 0 bytes Total = 0+213200=213200 bytes
176 13. Vehicle
Tabel 3. 42 Perkiraan Disk Vehicle
Field Tipe Data Ukuran (Byte)
VehicleID Varchar 9
WarehouseID Char 4
VehicleName Varchar 50 Kapasitas dari tabel Vehicle adalah 63 bytes
Diperkirakan dalam 1 tahun terjadi 2 penambahan kendaraan baru Dalam satu tahun pertumbuhan tabel Vehicle adalah 63*2=126 bytes Dalam lima tahun pertumbuhan tabel Vehicle adalah 126*5=630 bytes Data awal pada tabel adalah 315 bytes
Total = 315+630=945 bytes
14. Warehouse
Tabel 3. 43 Perkiraan Disk Warehouse
Field Tipe Data Ukuran (Byte)
WarehouseID Char 4 WarehouseName Varchar 50 WarehouseAdd Varchar 100 WarehousePhone Varchar 20 WarehouseFax Varchar 20 WarehousePass Varchar 20 VerPass Varchar 30
177
Diperkirakan dalam 5 tahun terjadi 2 penambahan gudang baru
Dalam lima tahun pertumbuhan tabel Warehouse adalah 244*2=488 bytes Data awal pada tabel adalah 244 bytes
Total = 244+488=732 bytes
15. Request
Tabel 3. 44 Perkiraan Disk Request
Field Tipe Data Ukuran (Byte)
RequestID Char 4 RequestDate Date 10
WarehouseID Char 4
Kapasitas dari tabel Request adalah 18 bytes
Diperkirakan dalam 1 minggu terjadi 1 pembuatan surat permintaan baru Dalam satu tahun pertumbuhan tabel Request adalah 18*52=936 bytes Dalam lima tahun pertumbuhan tabel Request adalah 936*5=4680 bytes Data awal pada tabel adalah 0 bytes
Total = 0+4680=4680 bytes
16. RequestDetail
Tabel 3. 45 Perkiraan Disk RequestDetail
Field Tipe Data Ukuran (Byte)
RequestID Char 4 ProductID Char 10
178 Kapasitas dari tabel RequestDetail adalah 25 bytes
Diperkirakan dalam 1 minggu terjadi 2 penambahan RequestDetail
Dalam satu tahun pertumbuhan tabel RequestDetail adalah 25*52*2=2600 bytes
Dalam lima tahun pertumbuhan tabel RequestDetail adalah 2600*5=13000 bytes
Data awal pada tabel adalah 0 bytes Total = 0+13000=13000 bytes
Total keseluruhan kebutuhan disk space : Tabel 3. 46 Total Keseluruhan Disk Space
Tabel Ukuran disk space
Input 660 bytes Customer 22860 bytes Delivery 223600 bytes DetailMessage 48910000 bytes DetailTransaction 468000 bytes Employee 23000 bytes Message 6533500 bytes Position 238 bytes Product 4920 bytes ProductType 176 bytes Transaction 618800 bytes
179 PurchaseOrder 213200 bytes Vehicle 945 bytes Warehouse 732 bytes Request 4680 bytes RequestDetail 13000 bytes
Total 57038311 bytes atau 54,4 MB