Quote from ModulusFE:
Well, ok but how do you read and write to files with memory alone?
The OP was strictly talking about databases, not in-memory arrays or such. That's another topic completely.
This thread is about databases (such as HDF5).
Quote from clearinghouse:
I was skimming this article here: http://www.puppetmastertrading.com/blog/2009/01/04/managing-tick-data-with-hdf5/
Anyone have any very strong opinions on how to layout data for stocks? One file per day, or one day with lots of data-sets per day, one symbol per file, etc... Any preferences? I'm more interested in hearing stories about how you did it one way, then realized what a f* up it was before deciding on reorganizing another way.
Quote from ModulusFE:
Files are hard to backup? What do you think a RDBS like MySQL or MSSQL use? They use files![]()
Quote from ModulusFE:
SQL makes it easy, that's for sure. The speed is sufficient for most applications.
But as a software developer, you can of course have fail-over and redundancy built into your application and you should.
When you backup an SQL database, you are backing up data to a file (where else).
With a linear file you can also check for consistency. Of course your data is stored in binary format in SQL databases. Everything about a computer is binary, even text files. Endianness doesn't matter when you have your own source code, you can write a conversion.
Checks for corruption should also be handled in your software.
Of course SQL gives you all these nice things automatically. That IS the nice part about SQL.
But you are not going to get the same speed out of a RDBMS. It's a trade off. You can have relational data management and all those built-in niceties or you can roll your own. Sometimes it's not worth it, sometimes it is.
Quote from sma202:
This thread is going off-topic. The question was how to best structure hdf5 for stock time-series. Whether you use a custom built file or commercial db is irrelevant, that depends on your own mix of strategy and timeframe.
Frankly, i'd like to hear how other people are using hdf5.