Thanks for all the good advice.
I actually got your first model with the single data table to work - it's a little slow, but works. I did this by adding a data_ID field (primary key) and placing this in a separate join_prices table along with date_ID and tickers_ID.
I started to experiment...
Is the number 275153239 or is it 2147483647? This is the upper bound for the INT data type in mySQL - you are using mySQL right? If you convert the number to UNSIGNED INT, it will double it's capacity to 4292467295.
Also, if you need domething more substantial, check out BIGINT (range...
Does anyone know if there's a way to create a select statement where the FROM clause references tables listed in a field from another table?
So, for example let's say I have a database that stores data on 3,000 different stocks accross the nyse. Assume each stock has its own table with the...
You're absolutely right, I misread my calculations. It is 2.5 million records. However, This is really just a sample set of data used to test the design. When the full implementation is launched, it will hold over 30 years of historical price data from NYSE, AMEX, and NASDAQ, which will be...
rycamor: thanks for the advice. I took your suggestion and redesigned my tables. I also came up with two alternate designs and tested all three on mySQL using 2 years of data for 3000+ stocks on the NYSE. Here's what I came up with.
The first model is based on your suggestion. I placed the...
When I run SELECT field_01 FROM table_01, where field_01 is of type TEXT, mySQL returns a broken table with the rows all miss-aligned.
Could this be because TEXT is a variable-length type? Is there a fix for this? Can the contents of a field be wrapped so to fit within the table?
rycamor: here's a schematic of what I think you're proposing. let me know if I'm right.
Thanks,
-Adam
tickers data
+-------------+ +-------------+ dates
| ticker_ID --+-----+-- ticker_ID | +-----------+
| symbol | | date_ID --+-----+-- date_ID |...
rycamor: Thanks for your response. I like the idea of storing the ticker symbols, company names, and descriptions in a separate table. But don't you think localizing 2 years of date, open, high, low, close data for all 3,000+ stocks in a single table would slow database operations?
I'm trying to build a mySQL database around 2 years of historical stock quotes for all tickers on nyse. The problem is some stocks use funny characters in their ticker symbols and company names (i.e., CD~ is one symbol). When I try to create table names and add records with these characters...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.