Need help in setting up a database

Decklan

Member
Joined
Feb 3, 2006
Messages
13
Programming Experience
Beginner
Hi people

I’m using VB 05 which has SQL built in and I would like to set up a database which holds Formula 1 stuff e.g.

Table 1
Driver names
Team
Nationality
DOB
Points scored
Points needed to win championship

Table 2
Team Names
1st Driver
2nd Driver
Nationality
Engine
Tyers Manufacture
First GP
Points scored
Points needed to win championship

Table 3
Track name
Location
Date of race
Length(Km)
Lap record and holder
No. Laps


I then want to be able to:

Enter new results after each race for the team and the drivers.
Review the standings so far (Points, points to win championship, last race win).
Show the next race details and a history of winners and standings
Show a history for Teams and Drivers separately

My questions are:
1. How do I set it all up?
2. Do I need a new Table for the results and standings?
3. What are the relationships between all the tables?

Thanks People
Decklan :)
 
I think he meant VS05.... not VB5.... - I thought the same thing at first too.... :)

At anyrate I wouldn't use VS to set up database stuff... it's development tool, not a database admin tool.
I'd use enterprise manager, the new SSMT (SQL Server Manager Tool) or Query Analyzer to do database stuff.

Idealy, yes your standings and results should be in new tables. Actualy, in reality standings should be a view that derives its data from the other tables, otherwise the standings table would be constantly updated. By making it a view, changes to the results table automagicaly updates the standings.

As for the relations, only you can really decide that.

-tg
 
Ok Ok sorry if I confused anyone :)


thanks for that I have greated a new table “Results” my next question is if I create a form with say a list box which is bound to the driver table, then I have 2 small textbox’s which I use to put the race results in (position and points), how do I save the race results and the drivers name from the listbox to the Results Table?

Thanks

D:)
 
Last edited by a moderator:
Can anyone help? :)
 
Are you familiar with creating SQL statements?
Do you know how to create an INSERT statement to save the data to the database?

That would be the next step, build the SQL Insert statement, then build the code around it to call it.

-tg
 
No i dont know how to write an sql Insert statement, but i will look around and see what i can find out about it.

Thanks

D:)
 
Back
Top