Best method to store stock quote (financial) data
what's the most efficent method to store quote data (Open, High, Low, Close, Volume), considering the future speed read and the global size of archive ?
XML ? But It is resource consumption
Simple CSV comma separated ?
Is Binary maybe the best way ?
Thanks
EDIT: About database, you're right guys, but i'm thinking: are they "good" for simply storing 5 type of values (for example, sqlite) ? Aren't their开发者_开发技巧 architecture too "up-sized" for my needed ?
A simple normalized data model will do the trick nicely. The problem with XML is it is too verbose. With CSV it is not normalized so a lot of duplicate information.
A normalized data model will not only store the data you require in an efficient manner but queries against this data will be important and that what database are really good at. You won't believe the speed with which a good database engine can give you results if you've designed the data model well.
I would suggest an RDBMS (Relational Database Management System). I'm not sure why it's not one of your options.
RDBMSs were created for exactly this kind of thing e.g. speed and scalability. And if cost is an issue, consider that there are many free, open source or free but somewhat limited versions of very good RDBMSs available.
Some free RDBMS options:
- Postgre
- Firebird
- MySql
- Sql Server Express
Another Option:
If you REALLY want to avoid using a database but want a solid data structure you could consider using an XML serialized DataSet. This actually gives you a couple of things: 1) a human readable serialized format and 2) a very solid in-memory representation that will scale well for a while
Reply to EDIT:
Your needs were up-sized as soon as you mentioned a worry about future performance and scalability. That is why everyone is suggesting a db solution instead of XML etc.
I think that NoSql givs you nessesary speed. In any case, you will not be able to proccess huge XML or CSV files.
A database. Sql server, mongo, oracle, sybase, postgres, mysql. There are many flavors to choose from depending on your need, environment, and budget.
精彩评论