I intend to develope a database, to store stock prices...
I'll describe what I need first:
It's meant to stroe the prices for all stocks in the game, which is a trading simulation. the point is that there's a file on the server that contains current prices... I will interperate it and put the data in the database. the database should hold those prices' history.
I need a help on designing it. This is what I generally need:
A table that stores company ID and name
other tables that store the actual prices.
I have some ideas on that one...
#1
one table that contains columns COMPANYID|PRICE|TIMESTAMP.
#2
one table that have COMPANYID|PRICE|TSI
TSI is a short for time stamp index, which will be in another table:
Index|TIMESTAMP
On #1 and #2, the main table would contain info like this:
ID|PRICE|TSI or TIMESTAMP
---------------------------------
1|45.3|1 or 2000...
2|4445.6|1 or 2000...
3|5.343|1 or 2000...
1|46.3|2 or 2001...
2|4446.6|2 or 2001...
3|6.343|2 or 2001...
idea #3 is a different system not having prices table but a table for each company
ex.
company6 table:
PRICE|TSI
What idea would you suggest me to use? 1? 2? 3? another one?
TIA
Designing database - help please.
Moderator: General Moderators
Some general advice here viewtopic.php?t=2996&highlight=database ... e1635341b6
You want to normalise the db as much as possible - sometimes you can compromise with that a bit. Sorry can't find any db normalisation links.
You want to normalise the db as much as possible - sometimes you can compromise with that a bit. Sorry can't find any db normalisation links.