Coder Social home page Coder Social logo

cab_service_project's Introduction

Cab_Service_Project

Cab Service University design project

Graph

The Report CabsOnDemand.

The task was to design a database for a cab company, I researched the project and managed to normalise it to the third form, I designed the E-R diagram and I had to create and display the queries. This course work will help me with my next coursework in my other module of data structures and software programming where I have to develop a web app and will need to connect and design a database. In this course I use the SQL Developer GUI, it was a new software because in the past I have tried MySQL, however I manged to get used to it and used it in my project in the end it was a lot easier to export my SQL tables using SQL developer. The research I did for this course work helped me learn and discover new technologies and websites that will help me prosper in my studies.

Assumptions

  • They may have more than one office in the same borough
  • Drivers and taxi owners are not considered to be employees
  • Taxi owners provide their cars to drivers not the business
  • Drivers are self employed
  • Managers are part of staff
  • No two offices in the same building

Conceptual relations.\

Cabs On Demand.

Address(Borough, houseNumber, StreetName, Postcode,)
Office(OfficeID, MobileNos, Email, AddressID*, Telephone, Manager)
Staff(StaffNumber, FirstName, SecName, NI, D.O.B, Salary, Gender)
Taxi Owner(OwnerID, FirstName, SecName, tReg)
Driver(DriverID, FirstName, SecName, Gender, licenceNo)
Contract(ContractID, DateSigned, DateDue, fixedCharge, NoofJobs)
Job(JobID, PickupDate, PickupTime, PickupAddress, DropoffAddress, TotalChargeble, Mileage, ReasonIfFailed)
Client(ClientID, ClientType(Private,(charge)Business(Businestype,email)), FirstName SecName, phoneNo))
Taxi(tReg, Model, Make, Colour, Capacity, CurrentMileage, DueDate)\

UnNormalized\

CabsOnDemand(Location(Borough, houseNumber, StreetName, Postcode,), Office( OfficeID, MobileNos, Email, Location, Telephone, Manager), Staff(StaffNumber, FirstName, SecName, NI, Address, D.O.B, Salary, Gender), Taxi Owner( OwnerID, FirstName, SecName, tReg), Driver(DriverID, FirstName, SecName, Gender), Contract(ContractID, DateSigned, DateDue, fixedCharge, NoofJobs),Job(JobID, PickupDate, PickupTime, PickupAddress, DropoffAddress, TotalChargeble, Mileage, ReasonIfFailed), Client(ClientID, ClientType(Private,(charge)Business(Businestype,email address)), FirstName SecName Address, Contactdetaisl(MobileNo))Taxi(tReg, Model, Make, Colour, Capacity, CurrentMileage, DueDate))

Normalize Form

Location(Borough, houseNumber, StreetName, Postcode,) Client(ClientID, ClientType(Private,(charge)Business(Businestype,email)), FirstName SecName, phoneNo)) Contract(ContractID, officeId* DateSigned, DateDue, fixedCharge, NoofJobs) Driver(DriverID, FirstName, SecName, Gender, licenceNO) Job(JobID, PickupDate, PickupTime, PickupAddress, DropoffAddress, TotalChargeble, Mileage, ReasonIfFailed) Office(OfficeID, MobileNos, Email, AddressID*, Telephone, Managerid) Staff(StaffNumber, FirstName, SecName, NI, D.O.B, Salary, Gender) Taxi(tReg, Model, Make, Colour, Capacity, CurrentMileage, DueDate) TaxiOwner(OwnerID, FirstName, SecName, tReg*)\

2NF

Location(Borough, houseNumber, StreetName, Postcode,) Client(ClientID, FirstName SecName, phoneNo)) ClientType(Private,(clientid,charge)Business(clinteid,Businestype,email)) Contract(ContractID, Jobid, officeId* DateSigned, DateDue, fixedCharge, NoofJobs) Driver(DriverID, FirstName, SecName, Gender, licenceN0, treg) Job(JobID PickupDate, PickupTime, PickupLocation ,DropoffLocation, Mileage, ReasonIfFailed) JobAlloc(JobId,StaffID,DriverID,ClientiD) Office(OfficeID, MobileNos, Email, bourogh*,Telephone, Managerid) Staff(StaffNumber, FirstName, SecName, NI, D.O.B, Salary, Gender) Taxi(tReg, Capacity, CurrentMileage, DueDate, driverID*) Car (tReg, Model, Make, Colour, ownerID*) TaxiOwner(OwnerID, FirstName, SecName, tReg*)

3NF

Location(Borough, houseNumber, StreetName, Postcode,) Client(ClientID, FirstName SecName, phoneNo)) ClientType(clientID,Private,(clientid,charge)Business(clinteid,Businestype,email)) Contract(ContractID, Jobid, staffId*, DateSigned, DateDue, fixedCharge, NoofJobs) Driver(DriverID, FirstName, SecName, Gender, licenceN0, treg) Job(JobID ReasonIfFailed) Pickup(JobID, Date,Time,Location, priomilage) Dropoff(JobID, time,Location, Mileage) JobAlloc(JobId, StaffID,DriverID,ClientiD) Office(OfficeID, MobileNos, Email, bourogh*,Telephone, Managerid) Staff(StaffNumber, FirstName, SecName, NI, D.O.B, Salary, Gender) Taxi(tReg,Capacity, CurrentMileage, DueDate, driverID*) Car (tReg, Model, Make, Colour, ownerID*) TaxiOwner(OwnerID, FirstName, SecName, tReg*)

Image

Graph

Examples of Queries

SELECT OFFICE.OFFICEID, OFFICE.BOUROUGH, OFFICE.MANAGERID,PERSONA_DETAILS.FNAME, PERSONA_DETAILS.LNAME, OFFICE.TELEPHONE FROM PERSONA_DETAILS, OFFICE WHERE STAFFID =MANAGERID;

SELECT DRIVERS.OFFICEID, OFFICE.BOUROUGH, DRIVERS.DRIVERID, DRIVERS.GENDER, DRIVERS.FIRSTNAME,DRIVERS.LASTNAME FROM OFFICE, DRIVERS WHERE DRIVERS.GENDER = 'F' AND (OFFICE.BOUROUGH ='Ealing' OR OFFICE.BOUROUGH ='Islington');

SELECT TAXI.TREG, TAXI.OWNERID, TAXI.INSURANCEDATE, TAXI.CMILEAGE_1000S,TAXI.CAPACITY, HR.DRIVERS.OFFICEID, LOCATION.BOUROUGH FROM DRIVERS, TAXI, LOCATION WHERE HR.DRIVERS.OFFICEID = 'EA09' AND LOCATION.BOUROUGH = 'EALING'

cab_service_project's People

Contributors

mrrutledge avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.