dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

Is this database structure correct? Please help - Database Discussions

This is a discussion on Is this database structure correct? Please help - Database Discussions ; 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 ...


Home > Database Forum > Database and Unix Discussions > Database Discussions > Is this database structure correct? Please help

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 10-14-2009, 02:34 AM
Database Newbie
 
Join Date: Oct 2009
Posts: 4
badmanmc is on a distinguished road
Default Is this database structure correct? Please help

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
ERROR IN PARAMETER @ROWCOUNT_ONLY usenet ms-sqlserver 4 06-08-2009 12:04 PM
URGENT: SQL 6.5 Database is 'Suspect' Database Administrator sqlserver-server 18 04-21-2008 09:29 AM
flashback database in 10g Rel 2 Database Administrator Oracle Server 4 04-12-2008 03:11 AM
Database Migration Path / Activity List? Database Administrator mysql 6 01-02-2008 11:19 PM
rman recover/restore from backup Database Administrator Database Discussions 525 02-26-2004 06:31 PM


All times are GMT -4. The time now is 02:36 PM.