MySQL Forums :: Database Design & Data Modelling :: Is this database structure correct? Please help oh wise ones :)


Advanced Search

Is this database structure correct? Please help oh wise ones :)
Posted by: Ajeet Chadha ()
Date: October 13, 2009 04:15PM

I am fairly new to mysql and wanted to practice making a database and tables. As well as filling the tables with made up data and then practicing queries. I wanted to emulate a real life database project.

So I decided to make a database for a Car Dealership.

the database consists of three tables...Car...Buyer..Repairs. The structure is displayed below.


CAR table -

car_id int(5) primary key
make varchar(15)
model varchar(15)
year int(4)
origin varchar(15)
buyer int(5) foreign key references buyer_id in the BUYER table
cost double(5,2)



BUYER table -

buyer_id int(5) primary key
name varchar(20)
address varchar(20)
tel int(10)
car_id int(5) foreign key references car_id in the CAR table


REPAIRS table-

part_id int(5) primary key
origin varchar(15)
cost double(5,2)
car_id int(5) foreign key references car_id in the CAR table




Do you see any problems in this structure?
anything I should have done differently?
anything I could do to improve database performance?

Please bare with me as I am new to this and wish to be a DBA one day soon!

All comments will be appreciated!!

Thanks people



Edited 1 time(s). Last edit at 10/13/2009 07:02PM by Ajeet Chadha.

Options: ReplyQuote


Subject Written By Posted
Is this database structure correct? Please help oh wise ones :) Ajeet Chadha 10/13/2009 04:15PM
Re: Is this database structure correct? Please help oh wise ones :) Rick James 10/14/2009 07:06PM
Re: Is this database structure correct? Please help oh wise ones :) Ajeet Chadha 10/15/2009 11:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.