Database Programming: Description of Tables and Fields

Verified

Added on  2023/06/15

|7
|877
|208
AI Summary
This report provides a detailed description of the tables and fields in Desklib's database for the course ICT320. It includes information on data types, field names, and reasons for their selection.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
ICT320
Database Programming
Task 2
Student ID-
Student Name-
1 | P a g e

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Report
Data type Description
Customer Table
Field Datatype Reason
CustomerID (PK) INT(4) Integer of maximum
length 9999
Lastname VARCHAR(20) Variable length of 20
characters
Firstname VARCHAR(15) Variable length of 15
characters
Address VARCHAR(30) Variable length of 30
characters
Postcode CHAR(4) Fixed length of 4 digits
State ENUM Fixed data
CreditCard CHAR(16) Fixed length of 16 digits
Phone CHAR(10) Fixed length of 10 digits
MemberDate Date
Accessory Table
Field Datatype Reason
AccessoryID (PK) INT(2) Integer of maximum
length 99
Description VARCHAR(30) Variable length of 30
characters
Cost Decimal(5,2) Number of maximum
length 999.99
Qty INT(3) Integer of maximum
length 999
2 | P a g e
Document Page
Insurance Table
Field Datatype Reason
InsuranceID (PK) CHAR(1) Fixed length of 1
character
InsuranceType VARCHAR(15) Variable length of 15
characters
Price Decimal(5,2) Number of maximum
length 999.99
Penalty Table
Field Datatype Reason
PenaltyType (PK) VARCHAR(10) Variable length of 10
characters
MinDay INT(3) Integer of maximum
length 999
MaxDay INT(3) Integer of maximum
length 999
Cost Decimal(5,2) Number of maximum
length 999.99
VehicleType Table
Field Datatype Reason
VehicleTypeID (PK) INT(1) Number of maximum
length 9
VehicleType VARCHAR(15) Variable length of 15
characters
Charge Decimal(4,2) Number of maximum
length 99.99
FuelType Table
3 | P a g e
Document Page
Field Datatype Reason
FuelTypeID (PK) INT(1) Number of maximum
length 9
FuelType VARCHAR(15) Variable length of 15
characters
CurrentCost Decimal(5,2) Number of maximum
length 999.99
Discount Table
Field Datatype Reason
DiscountType
(PK)
CHAR(3) Fixed length of 3 letters
MinDay INT(3) Integer of maximum
length 999
MaxDay INT(3) Integer of maximum
length 999
Percent Decimal(2,2) Number of maximum
length .99
PayType Table
Field Datatype Reason
Payment_ID (PK) INT(1) Integer of maximum
length 1
Pay_Type VARCHAR(15) Variable length of 15
characters
Vehicle Table
Field Datatype Reason
Rego (PK) CHAR(6) Fixed length of 6
characters
Description VARCHAR(60) Variable length of 60
characters
Make VARCHAR(15) Variable length of 15
characters
Model VARCHAR(15) Variable length of 15
characters
Year CHAR(4) Fixed length of 4 digits
Value INT(6) Integer of maximum
length 999999
EngineCapacity Decimal(2,1) Number of maximum
4 | P a g e

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
length 9.9
FuelTank INT(3) Integer of maximum
length 999
Odometer INT(6) Integer of maximum
length 999999
PurchaseDate Date
NextUpdate Date
VehicleTypeID (FK) INT(1) Integer of maximum
length 9
FuelTypeID (FK) INT(1) Integer of maximum
length 9
Rental Table
Field Datatype Reason
RentalID (PK) INT(3) Integer of maximum
length 999
BookingDate Timestamp
BookingMethod VARCHAR(15) Variable length of 15
characters
Checkout Date
RentDays INT(2) Integer of maximum
length 99
Checkin Date
DueDate Date
OdometerIn INT(2) Integer of maximum
length 999999
FuelLevel Enum
Damage CHAR(1) Fixed length of 1
characters
Payment_ID (FK) INT(1) Integer of maximum
length 9
Rego (FK) CHAR(6) Fixed length of 6
characters
CustomerID (FK) INT(4) Integer of maximum
length 9999
InsuranceID (FK) CHAR(1) Fixed length of 1
characters
RentAccessory Table
Field Datatype Reason
5 | P a g e
Document Page
RentalID (PK) (FK) INT(3) Integer of maximum length
999
AccessoryID (PK) (FK) INT(2) Integer of maximum length
92
Qty INT(3) Integer of maximum length
999
RentalCharge Table
Field Datatype Reason
RentalID (PK) (FK) INT(3) Integer of maximum length
999
Rent Decimal(6,2) Number of maximum
length 9999.99
Damage Decimal(7,2) Number of maximum
length 99999.99
Fuel Decimal(5,2) Number of maximum
length 999.99
Overdue Decimal(6,2) Number of maximum
length 9999.99
Sale Table
Field Datatype Reason
Rego (PK) CHAR(6) Fixed length of 6
characters
Description VARCHAR(150) Variable length of 150
characters
Make VARCHAR(15) Variable length of 15
characters
Model VARCHAR(15) Variable length of 15
characters
Year CHAR(4) Fixed length of 4
digits
Odometer INT(6) Integer of maximum
length 999999
Price INT(6) Integer of maximum
length 999999
(Janalta Interactive Inc. 2015)
(P. Litwin n.d.)
6 | P a g e
Document Page
References
Janalta Interactive Inc. (2015), Functional Dependency, [Online]. Available:
http://www.techopedia.com/definition/19504/functional-dependency
P. Litwin (n.d.), Fundamentals of Relational Database Design, [Online]. Available:
http://www.deeptraining.com/litwin/dbdesign/FundamentalsOfRelationalDatabaseDesign.asp
x. .
7 | P a g e
1 out of 7
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]