SlideShare a Scribd company logo
1 of 204
Car Service System
Assignment
Designed by Lim Yao Cheng
P1 Explain the features of a relational
database
What is Entity?
• An object in a system that store information.
• Usually recognizable concepts, either concrete or abstract, such as
person, places, events.
• Example: student, restaurant, course
What is Attribute?
• Characteristic of an entity or view object.
• Correspond to a database column or independent of a column.
Entities for PERODUA Car Service Centre
• peroOwner
• peroCar
• loginDetail
• peroService
• peroAppointment
Attributes for Perodua Car Service
• ownerID(PK)
• ownerName
• address
• contactNo
• dateOfBirth
• email
• password
• grantLevel
• peroCarID(PK)
• peroCarModel
• peroYear
• peroColor
• peroTransmission
• peroFuelType
• peroMileage
• peroEnginePower
• peroEngineType
• peroCarNo
• peroRegNo
peroOwner peroCar
• loginID(PK)
• loginName
• loginDateTime
• ownerID(FK)
• peroServiceID(PK)
• peroServiceName
• peroServiceType
• peroServiceFees
loginDetail peroAppointment
• peroAppID(PK)
• peroAppDateTime
• peroEmployee
• peroAppStatus
peroService
Attributes for Perodua Car Service
List the tables which will be created
Tables
1. peroOwner
2. peroCar
3. peroCarOwner
4. loginDetail
5. peroService
6. peroAppointment
7. peroCarAppointment
8. peroCarService
How the tables in the scenario are related to each
other using primary and foreign keys
Relationship Between Tables
Table Cardinality Primary Key Foreign Key Assumption
peroOwner - ownerID
peroCar - peroCarID
peroCarOwner - peroCarID+ownerID PeroCarID
ownerID
peroCar and
peroCarOwner
One to One One car is belonged
to only one owner
peroOwner and
peroCarOwner
One to Many One owner may
have one or many
car owners
Relationship Between Tables
Table Cardinality Primary Key Foreign Key Assumption
loginDetail - loginID ownerID
peroOwner and
Account
One to Many One owner may
login one or many
times
account and
peroOwner
One to One One account has
only one owner
Relationship Between Tables
Table Cardinality Primary Key Foreign Key Assumption
peroService - peroServiceID
peroCarService peroAppID+peroSer
viceID
peroAppID
peroServiceID
peroService and
peroCarService
One to Many One service may
have one or many
appointments
peroCarService and
peroservice
One to One One appointment is
related with only
one service
Relationship Between Tables
Table Cardinality Primary Key Foreign Key Assumption
peroAppointment - peroAppID
peroCarAppointment peroAppID+PeroCarID PeroAppID
PeroCarID
peroCar and
peroAppointment
One to Many One car may be
able to make one
or many
appointments
peroAppointment
and peroCar
One to One One appointment
is related with only
one car
Explain referential integrity using an example from
the above scenario
Entity Relationship with reasoning Attributes Constraints
peroCar 1:M(One car may schedule one or many
appointments). If a car is accidently crashed and it
is removed from appointment table, the associated
car and appointment records will be automatically
deleted from perocarappointment table by enforcing
cascade delete option of referential integerity
peroCarID(PK)
peroCarModel
peroYear
peroColor
peroTransmission
peroFuelType
peroMileage
peroEnginePower
peroEngineType
peroCarNo
peroRegNo
peroCarID(PK)
appoint (R) M:1 peroAppID
peroCarID
Composite Primary Key
peroAppoinment 1:1(One appointment must be related with only one
car) If an appointment has been cancelled in
peroappointment table, the corresponding car and
appointment records from perocarappointment table
will be automatically removed
peroAppID(PK)
peroAppDateTime
peroEmployee
peroAppStatus
peroAppID(PK)
Referential Integrity
P2 Design a relational database for a
specified user need
Plan the tables
• peroOwner
• PeroCar
• peroCarOwner
• loginDetail
• peroService
• peroAppointment
• peroCarService
• peroCarAppointment
Plan the Columns
• peroCarID(PK)
• peroModel
• peroYear
• peroColor
• peroTransmission
• peroFuelType
• peroMileage
• peroEnginePower
• peroEngineType
• peroCarNo
• peroRegNo
peroCar
• peroCarID
• ownerID
peroCarOwne
r Composite
PrimaryKey
• ownerID(PK)
• ownerName
• address
• contactNo
• dateOfBirth
• email
• password
• grantLevel
peroOwner
Plan the Columns
• loginID(PK)
• loginName
• loginDateTime
• ownerID(FK)
loginDetail peroAppointment
• peroAppID(PK)
• peroAppDateTime
• peroEmployee
• peroAppStatus
• peroServiceID(PK)
• perServiceName
• peroServiceType
• peroServicFees
peroService
Plan the Columns
• peroAppID
• peroServiceID
CarService
• peroAppID
• peroCarID
CarAppointment
Composite
PrimaryKey
Composite
PrimaryKey
Entity Relationship Diagram
Data Dictionary
peroowner
perocar
perocarowner
logindetail
peroappointment
peroservice
perocarappointment
perocarservice
M1 Explain referential integrity and the purpose
of primary keys in building the relationships
between tables
Purpose of Primary Key
Table Primary Key Purpose of P.K Foreign Key Purpose of F.K
perowner ownerID To uniquely identify
each owner record
perocar peroCarID To implement data
integrity
perocarowner (peroCarID+
ownerID) Composite
Key
To implement a
relationship between 2
tables (owner & percar)
in a relational database
peroCarID
ownerID
Referential Integrity is
not allowed to enter a
record in foreign key
table(peroowner) if that
record is not included in
primary key table(owner,
peroCar)
…..To Continue NEXT SLIDE
Purpose of Primary Key
Table Primary Key Purpose of P.K Foreign Key Purpose of F.K
logindetail loginID Ensure row-level
accessibility
ownerID If the user attempts to
enter a record in the
logindetail table using
an ownerID that is not
found in the owner
table, the database will
reject that entry and
display a warning
message
peroservice peroServiceID To uniquely identify
each owner record
…..To Continue NEXT SLIDE
Purpose of Primary Key
Table Primary Key Purpose of P.K Foreign Key Purpose of F.K
peroappointment peroAppID To implement data
integrity among the
appointment records
perocarservice (peroAppID+
peroServiceID)
Composite Key
Combination of columns
is selected to guarantee
that two services never
have the same
appointment unique
value
peroAppID
peroServiceID
Due to the properties of
referential integrity, all
records have ACID
properties like Atomicity,
Consistency, Isolation
and Durability
perocarappointment (peroAppID+
peroCarID) Composite
Key
Combination of columns
is selected to guarantee
that two cars never have
the same appointment
unique value
peroAppID
peroCarID
The enforce referential
integrity among the
tables, cascade delete
cascade update option
are provided for foreign
key tables
Explain how you can create primary key in a
table using script or phpMyAdmin for the above
scenario
peroowner Table
perocar Table
perocarowner Table
logindetail Table
peroservice Table
peroappointment Table
perocarservice Table
perocarappointment table
P3 Create and populate a database
Create required tables & their
relationship using PHPMyAdmin
peroowner
perocar
perocarowner
logindetail
peroservice
peroappointment
perocarappointment
perocarservice
Establish the relationships and referential
integrity between the tables
Relationship among perowwner, perocar,
perocarowner Tables
Relationship between peroowner and
logindetail Tables
Relationship among perocar,
peroappointment and perocarappointment
Relationship among peroservice,
peroappointment and percarservice
Relationship Diagram for Perodua Car Service
Centre
Insert data to each of the table created
Insert Data Script into peroonwer Table
Insert Data Result into peroonwer Table
Insert Data Script into perocar Table
Insert Data Result into perocar Table
Insert Data Result into perocarowner Table
Insert Data Script into logindetail Table
Insert Data Result into logindetail Table
Insert Data Script into peroservice Table
Insert Data Result into peroserevice Table
Insert Data Script into peroappointment Table
Insert Data Result into peroappointment
Table
Insert Data Script into perocarappointment
Table
Insert Data Result into perocarappointment
Table
Insert Data Script into peroCarService Table
Insert Data Result into perocarservice Table
M2 Import data from an
external source
peroowner CSV File
peroowner after import CSV File
perocar CSV File
perocar after import CSV File
perocarowner CSV File
perocarowner after import CSV File
logindetail CSV File
logindetail after import CSV File
peroservice CSV File
peroervice after import CSV File
peroappointment CSV File
peroappointment after import CSV File
perocarservice CSV File
perocarservice after import CSV File
perocarappointment CSV File
perocarappointment after import CSV File
M3 Export data from an
external source
Insert Data into peroowner Table
peroowner Table Information
Export CSV from peroowner Table
peroowner table CSV File
P5 Perform queries using
multiple tables and multiple
criteria
Display all owners and car information
Display all owners and car information for a
particular car number
Find and display Owner, Car & Service
Appointments for a particular Owner
based on owner email and for service
appointment within the next 1 month
P6 Include an advanced feature in a
database design
Create 3 indexes to speed up data retrieval
Create 3 indexes to speed up data retrieval
Create 3 indexes to speed up data retrieval
Create a field Called Created On all Tables
Create a field Called Created On all Tables
Create a field Called Created On all Tables
Create a field Called Created On all Tables
Create a field Called Created On all Tables
M4 Implement an Automated Function
Code for Backup-ing perocarservice data
Code for the Time to Launch a Backup App
Code for the Time to Launch Ampps
Launch and load from Terminal
Perocarservice Log File
Automated Backup SQL File
P7 Test a relational database
No Test Objective Test Case Expected Result Actual
Result
Pass/Fail
1 Include test to ensure
referential integrity
If the user attempts to enter a
record in the logindetail table
using ownerID that is not
found in the table
The database will reject that entry
and display warning message
Successful Pass
If a car record is deleted from
car table
The associated peroCarID,ownerID,
peroAppID and peroCarID will
automatically be removed from
perocarowner table and
perocarappointment table
respectively.
2 Include test to ensure
default field
Set “CURRENT_TIMESTAMP” as
default for createdOn field in
perocar table
Successful Pass
No Test Objective Test Case Expected Result Actual Result Pass/Fail
To ensure auto
generated fields are
working as expected
Set peroCarID as
AUTO_INCREMENT services
table
Successful Pass
3 To ensure field sizes
meets requirements
If I enter peroColor field over
15 characters
If I enter contactNo field over
20 characters
That peroColor data is not
allowed to save into the database
That contactNo is not allowed to
save into the database
Successful
Successful
Pass
Pass
No Test Objective Test Case Expected Result Actual
Result
Pass/Fail
4 Null values are
handled for non-
mandatory fields
If I leave as blank for non-
mandatory fields in owner
register form
Successful Pass
P4 Create features in data entry forms to
ensure validity and integrity of data
Home Page
The owner registration form should have
information about owner along with 1 car
information
Owner Registration Form
The form should display a thank you page after
registration
This form can save (perocar, perowner,
and perocarowner) table
Register More than One Car
The form should have all the fields mandatory
for an owner and his 1st car.
The form should ensure the data size do not
exceed the field size in the database
If phone field exceed the field size, that
related data is not entered into the database
If car number field exceed the field size, that
related data is not entered into the database
If a a car is accidentally crashed, the related
owner and car information are automatically
removed from database
Register Admin Account
D2 evaluate a database against
specified user need
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
1 Users able to register
themselves
Users able to register
themselves
Yes Figure 1
Yes Figure 2
Yes Figure 3
Figure 1
Figure 2
Figure 3
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
2 Users are able to login to the
portal
Yes Figure 4
3 Users are able to register their
cars
Yes Figure 5 & 6
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
4 Users are able to Add Cars Yes
Figure 5 & 6
Users are able to Delete Cars Yes Figure 7 & 8
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
5 Users are able to book for
appointment
Yes Figure 9, 10 & 11
Figure 9
Figure 10
Figure 11
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
5 Delete existing, unexpired
appointment for their car
servicing
Yes Figure 12 & 13
Figure 12 & 13
Before Deleting After Deleting
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
6 To count car quantity
based on owner ID
Yes Figure 14
To count number of
appointment times based
on carID
Yes Figure 15
Figure 14
Figure 15
No Requirement Query Used Database Meets
Requirements
(YES/NO)
Comments
6 To count number of
appointment based on
serviceID
Yes Figure 16
Figure 16
D1 Discuss how potential errors in the design
and construction of a database can be
avoided
UNF (Un-normalized Form)
ownerID, ownerName, address, contactNo, dateOfBirth, email,
peroCarID, peroCarModel, peroYear, peroColor, peroTransmission,
peroaMileage, peroEnginePower, peroEngineType, peroCarNo,
peroRegNo, loginID, loginName, password, grantLevel, peroServiceID,
peroServiceName, peroServiceType, peroServiceFees, peroAppID,
peroAppDateTime, peroEmployee, peroAppStatus
FNF (Remove any duplicate attributes to a new
table and a composite key is created)
• Owner (ownerID, ownerName, address, contactNo, dateOfBirth, IC,
email)
• carAppointment(ownerID, peroCarID, loginID, peroServiceID,
peroAppID, peroCarModel, peroYear, peroColor, peroTransmission,
peroMileage, peroEnginePower, peroEngineType, peroCarNo,
peroRegNo, loginName, password, grantLevel, serviceName,
serviceType, serviceFees, appDate, appTime, employee, appStatus)
SNF (Assure that no non-key attributes are
dependent on any candidate keys)
• Owner (ownerID, ownerName, address, contactNo, dateOfBirth, IC,
email, password, grantLevel)
• Car(peroCarID, peroCarModel, peroYear, peroColor, peroTransmission,
peroFuelType, peroMileage, peroEnginePower, peroEngineType,
peroCarNo, peroRegNo, ownerID)
• Service(peroServiceID, peroServiceName, peroServiceType,
peroServiceFees)
• loginDetail(loginID, loginName, loginDateTime, ownerID)
• Appointment(perocarID, peroServiceID, peroAppDateTime,
peroEmployee, peroAppStatus)
TNF (Eliminate any column reference in reference data that
are not dependent on the primary key. Only foreign key
columns should be used to referenced another table, and no
other columns from the parent table should exist in the
referenced table)
• peroowner (ownerID, ownerName, address, contactNo, dateOfBirth, IC, email, password,
grantLevel)
• perocarowner(ownerID, peroCarID)
• perocar(peroCarID, peroCarModel, peroYear, peroColor, peroTransmission, peroFuelType,
peroMileage, peroEnginePower, peroEngineType, peroCarNo, peroRegNo)
• peroservice(peroServiceID, peroServiceName, peroServiceType, peroServiceFe)
• logindetail(loginID, loginName, loginDateTime, ownerID)
• peroappointment(peroAppID, peroAppDateTime, peroEmployee, peroAppStatus)
• perocarappointment(peroCarID, peroappID)
• perocarservice(peroAppID, peroServiceID)
POTENTIAL ERRORS IN THE
DESIGN AND CONSTRUCTION
OF DATABASE THAT CAN BE
AVOIDED
1) Accidental deletion of fields
• When a database is in use, you may find it really easy to accidently delete data which
could mean allot of stress.
• One main way to AVOID this would be to make sure that back-ups are made of the data,
so whatever the matter the data will not be completely lost. However, it is very annoying
when data becomes deleted because it takes allot of time and effort to retype the data.
• The best way to stop accidental deletion is to set the database to only the designer can
manipulate it, so anyone using the database without authorisation cannot manipulate
and is only able to read the database with no risk of deletion.
2) Incorrect data types
• Incorrect data type issues can occurs when an unmatched data type is used.
• An example would be, a field called ‘fees’ in a table in a database, it will go wrong if a
‘text value’ is inserted instead of a ‘numerical value’ like ‘two hundred’ instead of ‘200’.
• This can be avoided as you can tell the database to only allow numerical values to be
inputted within that field so this error won’t occur again. The database won’t allow
anything inputted other than numbers.
3) Renaming Incorrectly
• Renaming something or someone incorrectly on a database can be a huge mistake,
hugely if it were to happen to be a bank.
• This is mostly done by human error as a typo or misheard information.
• This means if the error isn’t spotted then it will not be sorted out; so a way to sort out
the problem is by double checking the information given and typed.
4) Validation
• Validation within computers is on par with people verification checks, but checks the data to see if the data
entered is sensible and reasonable.
• When a user puts information in to a database which might not be right then the computer will do
validation checks to see a match between the users input and information given to the database to run
though a list of checks.
• Example: The database is given a set of rules to run by which would be >=18 which means that nothing
under the number (age) is allow to carry on to the next step. So if someone that is the age of 17 or under
will not be allowed to move forward. So as you can see this helps to validate information allowing and
disallowing data which helps to organise the database making sure all the data is correct.
5) Null Values
• The meaning of a null value equals to “nothing there” within a database.
• This would be a big problem with the database as the database will not be able to work properly
as it doesn’t understand what it is told and might cause other errors within the database.
• If the data base has not been set to understand the null values it would carry on to the next step,
but to prevent this from happening you can the use of a validation rule. The validation rule will
work to stop the null value from happening like in an ‘online application form’ where if no value
were to be entered then a user wouldn’t be able to carry on to the next step; the validation rule
will work in the same way to stop the null value from arising and missing values from happening.

More Related Content

What's hot

[[Srs]] online shopping website for TYBSC IT
[[Srs]] online shopping website for TYBSC IT[[Srs]] online shopping website for TYBSC IT
[[Srs]] online shopping website for TYBSC ITYogeshDhamke2
 
Overview of Database and Database Management
Overview of Database and Database ManagementOverview of Database and Database Management
Overview of Database and Database ManagementMayuree Srikulwong
 
Car rental system_newfinal2
Car rental system_newfinal2Car rental system_newfinal2
Car rental system_newfinal2rajdeep0007
 
Library management system
Library management systemLibrary management system
Library management systemashu6
 
Matrimonial web site Documentation
Matrimonial web site DocumentationMatrimonial web site Documentation
Matrimonial web site Documentationhome
 
Railway management system, database mini project
Railway management system, database mini projectRailway management system, database mini project
Railway management system, database mini projectshashank reddy
 
Garrage management system
Garrage management system Garrage management system
Garrage management system Prateek Pandey
 
SRS For Online Store
SRS For Online StoreSRS For Online Store
SRS For Online StoreAhsan Rizwan
 
Sequence diagram for employee management system(EMS)
Sequence diagram for employee management system(EMS)Sequence diagram for employee management system(EMS)
Sequence diagram for employee management system(EMS)Achal (अचल) Porwal
 
Online doctor appointment
Online doctor appointmentOnline doctor appointment
Online doctor appointmentAmna Nawazish
 
A database design_report_for_college_library final
A database design_report_for_college_library finalA database design_report_for_college_library final
A database design_report_for_college_library finalSaira Iqbal
 
E book management system
E book management systemE book management system
E book management systemBarani Tharan
 
Courier Management System By Mukesh
Courier Management System By MukeshCourier Management System By Mukesh
Courier Management System By MukeshMukesh Kumar
 
Online crime reporting system ppt
Online crime reporting system  pptOnline crime reporting system  ppt
Online crime reporting system pptYOGESH SHARMA
 
ATM System Description and functional and non- functional Requirements
ATM System Description and functional and non- functional RequirementsATM System Description and functional and non- functional Requirements
ATM System Description and functional and non- functional Requirementswajahat Gul
 
127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentationNitesh Kumar
 
Grocery store management
Grocery store managementGrocery store management
Grocery store managementGayatri Patel
 
Taxi Booking System UML - Sequence Diagram
Taxi Booking System UML - Sequence DiagramTaxi Booking System UML - Sequence Diagram
Taxi Booking System UML - Sequence DiagramTyler Mooney
 

What's hot (20)

[[Srs]] online shopping website for TYBSC IT
[[Srs]] online shopping website for TYBSC IT[[Srs]] online shopping website for TYBSC IT
[[Srs]] online shopping website for TYBSC IT
 
Overview of Database and Database Management
Overview of Database and Database ManagementOverview of Database and Database Management
Overview of Database and Database Management
 
Car rental system_newfinal2
Car rental system_newfinal2Car rental system_newfinal2
Car rental system_newfinal2
 
Library management system
Library management systemLibrary management system
Library management system
 
Matrimonial web site Documentation
Matrimonial web site DocumentationMatrimonial web site Documentation
Matrimonial web site Documentation
 
Railway management system, database mini project
Railway management system, database mini projectRailway management system, database mini project
Railway management system, database mini project
 
Garrage management system
Garrage management system Garrage management system
Garrage management system
 
SRS For Online Store
SRS For Online StoreSRS For Online Store
SRS For Online Store
 
Sequence diagram for employee management system(EMS)
Sequence diagram for employee management system(EMS)Sequence diagram for employee management system(EMS)
Sequence diagram for employee management system(EMS)
 
Online doctor appointment
Online doctor appointmentOnline doctor appointment
Online doctor appointment
 
A database design_report_for_college_library final
A database design_report_for_college_library finalA database design_report_for_college_library final
A database design_report_for_college_library final
 
E book management system
E book management systemE book management system
E book management system
 
Courier Management System By Mukesh
Courier Management System By MukeshCourier Management System By Mukesh
Courier Management System By Mukesh
 
Online crime reporting system ppt
Online crime reporting system  pptOnline crime reporting system  ppt
Online crime reporting system ppt
 
ATM System Description and functional and non- functional Requirements
ATM System Description and functional and non- functional RequirementsATM System Description and functional and non- functional Requirements
ATM System Description and functional and non- functional Requirements
 
127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation127801976 mobile-shop-management-system-documentation
127801976 mobile-shop-management-system-documentation
 
ER Diagram
ER DiagramER Diagram
ER Diagram
 
Grocery store management
Grocery store managementGrocery store management
Grocery store management
 
Taxi Booking System UML - Sequence Diagram
Taxi Booking System UML - Sequence DiagramTaxi Booking System UML - Sequence Diagram
Taxi Booking System UML - Sequence Diagram
 
File system vs DBMS
File system vs DBMSFile system vs DBMS
File system vs DBMS
 

Similar to DATABASE DESIGN CAR SERVICE CENTRE

Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...Codemotion Dubai
 
Patterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesPatterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesRachel Reese
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docxmayank272369
 
Salesforce Integration with PHP
Salesforce Integration with PHPSalesforce Integration with PHP
Salesforce Integration with PHPToivo Talikka
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataPace Integration
 
APEX Reporting on external data sources
APEX Reporting on external data sourcesAPEX Reporting on external data sources
APEX Reporting on external data sourcesRodrigo Mesquita
 
Tsp value chain
Tsp value chainTsp value chain
Tsp value chainSBD
 
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...AlexACMSC
 
[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process
[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process
[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development ProcessRakuten Group, Inc.
 
Lane Matching Solution to Fill Capacity with Backhauls
Lane Matching Solution to Fill Capacity with BackhaulsLane Matching Solution to Fill Capacity with Backhauls
Lane Matching Solution to Fill Capacity with Backhaulsparadoxsci
 
Netflix Machine Learning Infra for Recommendations - 2018
Netflix Machine Learning Infra for Recommendations - 2018Netflix Machine Learning Infra for Recommendations - 2018
Netflix Machine Learning Infra for Recommendations - 2018Karthik Murugesan
 
ML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talkML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talkFaisal Siddiqi
 
Events, Picos, and Microservices
Events, Picos, and MicroservicesEvents, Picos, and Microservices
Events, Picos, and MicroservicesPhil Windley
 
Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...
Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...
Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...Amazon Web Services
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingWidhian Bramantya
 

Similar to DATABASE DESIGN CAR SERVICE CENTRE (20)

Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...
 
Patterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesPatterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservices
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx
 
Salesforce Integration with PHP
Salesforce Integration with PHPSalesforce Integration with PHP
Salesforce Integration with PHP
 
Report On Travel Cab Agency
Report On Travel Cab AgencyReport On Travel Cab Agency
Report On Travel Cab Agency
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and OData
 
Use case
Use caseUse case
Use case
 
APEX Reporting on external data sources
APEX Reporting on external data sourcesAPEX Reporting on external data sources
APEX Reporting on external data sources
 
Tsp value chain
Tsp value chainTsp value chain
Tsp value chain
 
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
 
[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process
[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process
[Rakuten TechConf2014] [B-6] Rakuten Travel Architecture and Development Process
 
Lane Matching Solution to Fill Capacity with Backhauls
Lane Matching Solution to Fill Capacity with BackhaulsLane Matching Solution to Fill Capacity with Backhauls
Lane Matching Solution to Fill Capacity with Backhauls
 
DDD_upload
DDD_uploadDDD_upload
DDD_upload
 
Transport Management
Transport ManagementTransport Management
Transport Management
 
Netflix Machine Learning Infra for Recommendations - 2018
Netflix Machine Learning Infra for Recommendations - 2018Netflix Machine Learning Infra for Recommendations - 2018
Netflix Machine Learning Infra for Recommendations - 2018
 
ML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talkML Infra for Netflix Recommendations - AI NEXTCon talk
ML Infra for Netflix Recommendations - AI NEXTCon talk
 
Events, Picos, and Microservices
Events, Picos, and MicroservicesEvents, Picos, and Microservices
Events, Picos, and Microservices
 
Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...
Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...
Easy Rider: How ML, Serverless, and IoT Drive Mobility as a Service (AMT302) ...
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented Programming
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

DATABASE DESIGN CAR SERVICE CENTRE

  • 2. P1 Explain the features of a relational database
  • 3. What is Entity? • An object in a system that store information. • Usually recognizable concepts, either concrete or abstract, such as person, places, events. • Example: student, restaurant, course
  • 4. What is Attribute? • Characteristic of an entity or view object. • Correspond to a database column or independent of a column.
  • 5. Entities for PERODUA Car Service Centre • peroOwner • peroCar • loginDetail • peroService • peroAppointment
  • 6. Attributes for Perodua Car Service • ownerID(PK) • ownerName • address • contactNo • dateOfBirth • email • password • grantLevel • peroCarID(PK) • peroCarModel • peroYear • peroColor • peroTransmission • peroFuelType • peroMileage • peroEnginePower • peroEngineType • peroCarNo • peroRegNo peroOwner peroCar
  • 7. • loginID(PK) • loginName • loginDateTime • ownerID(FK) • peroServiceID(PK) • peroServiceName • peroServiceType • peroServiceFees loginDetail peroAppointment • peroAppID(PK) • peroAppDateTime • peroEmployee • peroAppStatus peroService Attributes for Perodua Car Service
  • 8. List the tables which will be created
  • 9. Tables 1. peroOwner 2. peroCar 3. peroCarOwner 4. loginDetail 5. peroService 6. peroAppointment 7. peroCarAppointment 8. peroCarService
  • 10. How the tables in the scenario are related to each other using primary and foreign keys
  • 11. Relationship Between Tables Table Cardinality Primary Key Foreign Key Assumption peroOwner - ownerID peroCar - peroCarID peroCarOwner - peroCarID+ownerID PeroCarID ownerID peroCar and peroCarOwner One to One One car is belonged to only one owner peroOwner and peroCarOwner One to Many One owner may have one or many car owners
  • 12. Relationship Between Tables Table Cardinality Primary Key Foreign Key Assumption loginDetail - loginID ownerID peroOwner and Account One to Many One owner may login one or many times account and peroOwner One to One One account has only one owner
  • 13. Relationship Between Tables Table Cardinality Primary Key Foreign Key Assumption peroService - peroServiceID peroCarService peroAppID+peroSer viceID peroAppID peroServiceID peroService and peroCarService One to Many One service may have one or many appointments peroCarService and peroservice One to One One appointment is related with only one service
  • 14. Relationship Between Tables Table Cardinality Primary Key Foreign Key Assumption peroAppointment - peroAppID peroCarAppointment peroAppID+PeroCarID PeroAppID PeroCarID peroCar and peroAppointment One to Many One car may be able to make one or many appointments peroAppointment and peroCar One to One One appointment is related with only one car
  • 15. Explain referential integrity using an example from the above scenario
  • 16. Entity Relationship with reasoning Attributes Constraints peroCar 1:M(One car may schedule one or many appointments). If a car is accidently crashed and it is removed from appointment table, the associated car and appointment records will be automatically deleted from perocarappointment table by enforcing cascade delete option of referential integerity peroCarID(PK) peroCarModel peroYear peroColor peroTransmission peroFuelType peroMileage peroEnginePower peroEngineType peroCarNo peroRegNo peroCarID(PK) appoint (R) M:1 peroAppID peroCarID Composite Primary Key peroAppoinment 1:1(One appointment must be related with only one car) If an appointment has been cancelled in peroappointment table, the corresponding car and appointment records from perocarappointment table will be automatically removed peroAppID(PK) peroAppDateTime peroEmployee peroAppStatus peroAppID(PK) Referential Integrity
  • 17. P2 Design a relational database for a specified user need
  • 18. Plan the tables • peroOwner • PeroCar • peroCarOwner • loginDetail • peroService • peroAppointment • peroCarService • peroCarAppointment
  • 19. Plan the Columns • peroCarID(PK) • peroModel • peroYear • peroColor • peroTransmission • peroFuelType • peroMileage • peroEnginePower • peroEngineType • peroCarNo • peroRegNo peroCar • peroCarID • ownerID peroCarOwne r Composite PrimaryKey • ownerID(PK) • ownerName • address • contactNo • dateOfBirth • email • password • grantLevel peroOwner
  • 20. Plan the Columns • loginID(PK) • loginName • loginDateTime • ownerID(FK) loginDetail peroAppointment • peroAppID(PK) • peroAppDateTime • peroEmployee • peroAppStatus • peroServiceID(PK) • perServiceName • peroServiceType • peroServicFees peroService
  • 21. Plan the Columns • peroAppID • peroServiceID CarService • peroAppID • peroCarID CarAppointment Composite PrimaryKey Composite PrimaryKey
  • 32. M1 Explain referential integrity and the purpose of primary keys in building the relationships between tables
  • 33. Purpose of Primary Key Table Primary Key Purpose of P.K Foreign Key Purpose of F.K perowner ownerID To uniquely identify each owner record perocar peroCarID To implement data integrity perocarowner (peroCarID+ ownerID) Composite Key To implement a relationship between 2 tables (owner & percar) in a relational database peroCarID ownerID Referential Integrity is not allowed to enter a record in foreign key table(peroowner) if that record is not included in primary key table(owner, peroCar) …..To Continue NEXT SLIDE
  • 34. Purpose of Primary Key Table Primary Key Purpose of P.K Foreign Key Purpose of F.K logindetail loginID Ensure row-level accessibility ownerID If the user attempts to enter a record in the logindetail table using an ownerID that is not found in the owner table, the database will reject that entry and display a warning message peroservice peroServiceID To uniquely identify each owner record …..To Continue NEXT SLIDE
  • 35. Purpose of Primary Key Table Primary Key Purpose of P.K Foreign Key Purpose of F.K peroappointment peroAppID To implement data integrity among the appointment records perocarservice (peroAppID+ peroServiceID) Composite Key Combination of columns is selected to guarantee that two services never have the same appointment unique value peroAppID peroServiceID Due to the properties of referential integrity, all records have ACID properties like Atomicity, Consistency, Isolation and Durability perocarappointment (peroAppID+ peroCarID) Composite Key Combination of columns is selected to guarantee that two cars never have the same appointment unique value peroAppID peroCarID The enforce referential integrity among the tables, cascade delete cascade update option are provided for foreign key tables
  • 36. Explain how you can create primary key in a table using script or phpMyAdmin for the above scenario
  • 45. P3 Create and populate a database
  • 46. Create required tables & their relationship using PHPMyAdmin
  • 55. Establish the relationships and referential integrity between the tables
  • 56. Relationship among perowwner, perocar, perocarowner Tables
  • 57. Relationship between peroowner and logindetail Tables
  • 60. Relationship Diagram for Perodua Car Service Centre
  • 61. Insert data to each of the table created
  • 62. Insert Data Script into peroonwer Table
  • 63. Insert Data Result into peroonwer Table
  • 64. Insert Data Script into perocar Table
  • 65. Insert Data Result into perocar Table
  • 66. Insert Data Result into perocarowner Table
  • 67. Insert Data Script into logindetail Table
  • 68. Insert Data Result into logindetail Table
  • 69. Insert Data Script into peroservice Table
  • 70. Insert Data Result into peroserevice Table
  • 71. Insert Data Script into peroappointment Table
  • 72. Insert Data Result into peroappointment Table
  • 73. Insert Data Script into perocarappointment Table
  • 74. Insert Data Result into perocarappointment Table
  • 75. Insert Data Script into peroCarService Table
  • 76. Insert Data Result into perocarservice Table
  • 77. M2 Import data from an external source
  • 94. M3 Export data from an external source
  • 95. Insert Data into peroowner Table
  • 97. Export CSV from peroowner Table
  • 99. P5 Perform queries using multiple tables and multiple criteria
  • 100. Display all owners and car information
  • 101.
  • 102.
  • 103. Display all owners and car information for a particular car number
  • 104.
  • 105.
  • 106. Find and display Owner, Car & Service Appointments for a particular Owner based on owner email and for service appointment within the next 1 month
  • 107.
  • 108.
  • 109. P6 Include an advanced feature in a database design
  • 110. Create 3 indexes to speed up data retrieval
  • 111. Create 3 indexes to speed up data retrieval
  • 112. Create 3 indexes to speed up data retrieval
  • 113. Create a field Called Created On all Tables
  • 114. Create a field Called Created On all Tables
  • 115. Create a field Called Created On all Tables
  • 116. Create a field Called Created On all Tables
  • 117. Create a field Called Created On all Tables
  • 118. M4 Implement an Automated Function
  • 119. Code for Backup-ing perocarservice data
  • 120. Code for the Time to Launch a Backup App
  • 121. Code for the Time to Launch Ampps
  • 122. Launch and load from Terminal
  • 125. P7 Test a relational database
  • 126. No Test Objective Test Case Expected Result Actual Result Pass/Fail 1 Include test to ensure referential integrity If the user attempts to enter a record in the logindetail table using ownerID that is not found in the table The database will reject that entry and display warning message Successful Pass If a car record is deleted from car table The associated peroCarID,ownerID, peroAppID and peroCarID will automatically be removed from perocarowner table and perocarappointment table respectively. 2 Include test to ensure default field Set “CURRENT_TIMESTAMP” as default for createdOn field in perocar table Successful Pass
  • 127. No Test Objective Test Case Expected Result Actual Result Pass/Fail To ensure auto generated fields are working as expected Set peroCarID as AUTO_INCREMENT services table Successful Pass 3 To ensure field sizes meets requirements If I enter peroColor field over 15 characters If I enter contactNo field over 20 characters That peroColor data is not allowed to save into the database That contactNo is not allowed to save into the database Successful Successful Pass Pass
  • 128. No Test Objective Test Case Expected Result Actual Result Pass/Fail 4 Null values are handled for non- mandatory fields If I leave as blank for non- mandatory fields in owner register form Successful Pass
  • 129. P4 Create features in data entry forms to ensure validity and integrity of data
  • 131.
  • 132. The owner registration form should have information about owner along with 1 car information
  • 133.
  • 135. The form should display a thank you page after registration
  • 136.
  • 137.
  • 138. This form can save (perocar, perowner, and perocarowner) table
  • 139.
  • 140.
  • 141.
  • 142. Register More than One Car
  • 143.
  • 144.
  • 145.
  • 146.
  • 147.
  • 148. The form should have all the fields mandatory for an owner and his 1st car.
  • 149.
  • 150.
  • 151.
  • 152.
  • 153. The form should ensure the data size do not exceed the field size in the database
  • 154. If phone field exceed the field size, that related data is not entered into the database
  • 155. If car number field exceed the field size, that related data is not entered into the database
  • 156.
  • 157.
  • 158.
  • 159. If a a car is accidentally crashed, the related owner and car information are automatically removed from database
  • 160.
  • 161.
  • 162.
  • 164.
  • 165.
  • 166.
  • 167.
  • 168.
  • 169.
  • 170. D2 evaluate a database against specified user need
  • 171. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 1 Users able to register themselves Users able to register themselves Yes Figure 1 Yes Figure 2 Yes Figure 3
  • 175. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 2 Users are able to login to the portal Yes Figure 4 3 Users are able to register their cars Yes Figure 5 & 6
  • 176. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 4 Users are able to Add Cars Yes Figure 5 & 6 Users are able to Delete Cars Yes Figure 7 & 8
  • 182. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 5 Users are able to book for appointment Yes Figure 9, 10 & 11
  • 186. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 5 Delete existing, unexpired appointment for their car servicing Yes Figure 12 & 13
  • 187. Figure 12 & 13 Before Deleting After Deleting
  • 188. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 6 To count car quantity based on owner ID Yes Figure 14 To count number of appointment times based on carID Yes Figure 15
  • 191. No Requirement Query Used Database Meets Requirements (YES/NO) Comments 6 To count number of appointment based on serviceID Yes Figure 16
  • 193. D1 Discuss how potential errors in the design and construction of a database can be avoided
  • 194. UNF (Un-normalized Form) ownerID, ownerName, address, contactNo, dateOfBirth, email, peroCarID, peroCarModel, peroYear, peroColor, peroTransmission, peroaMileage, peroEnginePower, peroEngineType, peroCarNo, peroRegNo, loginID, loginName, password, grantLevel, peroServiceID, peroServiceName, peroServiceType, peroServiceFees, peroAppID, peroAppDateTime, peroEmployee, peroAppStatus
  • 195. FNF (Remove any duplicate attributes to a new table and a composite key is created) • Owner (ownerID, ownerName, address, contactNo, dateOfBirth, IC, email) • carAppointment(ownerID, peroCarID, loginID, peroServiceID, peroAppID, peroCarModel, peroYear, peroColor, peroTransmission, peroMileage, peroEnginePower, peroEngineType, peroCarNo, peroRegNo, loginName, password, grantLevel, serviceName, serviceType, serviceFees, appDate, appTime, employee, appStatus)
  • 196. SNF (Assure that no non-key attributes are dependent on any candidate keys) • Owner (ownerID, ownerName, address, contactNo, dateOfBirth, IC, email, password, grantLevel) • Car(peroCarID, peroCarModel, peroYear, peroColor, peroTransmission, peroFuelType, peroMileage, peroEnginePower, peroEngineType, peroCarNo, peroRegNo, ownerID) • Service(peroServiceID, peroServiceName, peroServiceType, peroServiceFees) • loginDetail(loginID, loginName, loginDateTime, ownerID) • Appointment(perocarID, peroServiceID, peroAppDateTime, peroEmployee, peroAppStatus)
  • 197. TNF (Eliminate any column reference in reference data that are not dependent on the primary key. Only foreign key columns should be used to referenced another table, and no other columns from the parent table should exist in the referenced table)
  • 198. • peroowner (ownerID, ownerName, address, contactNo, dateOfBirth, IC, email, password, grantLevel) • perocarowner(ownerID, peroCarID) • perocar(peroCarID, peroCarModel, peroYear, peroColor, peroTransmission, peroFuelType, peroMileage, peroEnginePower, peroEngineType, peroCarNo, peroRegNo) • peroservice(peroServiceID, peroServiceName, peroServiceType, peroServiceFe) • logindetail(loginID, loginName, loginDateTime, ownerID) • peroappointment(peroAppID, peroAppDateTime, peroEmployee, peroAppStatus) • perocarappointment(peroCarID, peroappID) • perocarservice(peroAppID, peroServiceID)
  • 199. POTENTIAL ERRORS IN THE DESIGN AND CONSTRUCTION OF DATABASE THAT CAN BE AVOIDED
  • 200. 1) Accidental deletion of fields • When a database is in use, you may find it really easy to accidently delete data which could mean allot of stress. • One main way to AVOID this would be to make sure that back-ups are made of the data, so whatever the matter the data will not be completely lost. However, it is very annoying when data becomes deleted because it takes allot of time and effort to retype the data. • The best way to stop accidental deletion is to set the database to only the designer can manipulate it, so anyone using the database without authorisation cannot manipulate and is only able to read the database with no risk of deletion.
  • 201. 2) Incorrect data types • Incorrect data type issues can occurs when an unmatched data type is used. • An example would be, a field called ‘fees’ in a table in a database, it will go wrong if a ‘text value’ is inserted instead of a ‘numerical value’ like ‘two hundred’ instead of ‘200’. • This can be avoided as you can tell the database to only allow numerical values to be inputted within that field so this error won’t occur again. The database won’t allow anything inputted other than numbers.
  • 202. 3) Renaming Incorrectly • Renaming something or someone incorrectly on a database can be a huge mistake, hugely if it were to happen to be a bank. • This is mostly done by human error as a typo or misheard information. • This means if the error isn’t spotted then it will not be sorted out; so a way to sort out the problem is by double checking the information given and typed.
  • 203. 4) Validation • Validation within computers is on par with people verification checks, but checks the data to see if the data entered is sensible and reasonable. • When a user puts information in to a database which might not be right then the computer will do validation checks to see a match between the users input and information given to the database to run though a list of checks. • Example: The database is given a set of rules to run by which would be >=18 which means that nothing under the number (age) is allow to carry on to the next step. So if someone that is the age of 17 or under will not be allowed to move forward. So as you can see this helps to validate information allowing and disallowing data which helps to organise the database making sure all the data is correct.
  • 204. 5) Null Values • The meaning of a null value equals to “nothing there” within a database. • This would be a big problem with the database as the database will not be able to work properly as it doesn’t understand what it is told and might cause other errors within the database. • If the data base has not been set to understand the null values it would carry on to the next step, but to prevent this from happening you can the use of a validation rule. The validation rule will work to stop the null value from happening like in an ‘online application form’ where if no value were to be entered then a user wouldn’t be able to carry on to the next step; the validation rule will work in the same way to stop the null value from arising and missing values from happening.