[MonetDB-users] porting a financial time series database from mysql (how to represent datetime fields)
Hi monetDb collective, I am porting a test database over from a MySQL schema, and it currently looks like this; CREATE TABLE `MSFT` ( `date` datetime default NULL, `o` decimal(10,0) default NULL, `h` decimal(10,0) default NULL, `l` decimal(10,0) default NULL, `c` decimal(10,0) default NULL, `v` decimal(10,0) default NULL, `a` decimal(10,0) default NULL, `period` varchar(12) default 'daily' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1) Whats the equivalent monetDB method for representing the datetime of the start of the OHLC period? 2) As lots of queries are going to pull all the data from a particular symbol table to do things like calculate moving average, should I even be using datetime as the time index, should I use an integer value instead? Many thanks, Tom
Ah it looks like I use the timestamp column type, I was getting confused with the Mysql timestamp field. Tom On Fri, 2009-05-08 at 18:00 +0100, Tom H wrote:
Hi monetDb collective,
I am porting a test database over from a MySQL schema, and it currently looks like this;
CREATE TABLE `MSFT` ( `date` datetime default NULL, `o` decimal(10,0) default NULL, `h` decimal(10,0) default NULL, `l` decimal(10,0) default NULL, `c` decimal(10,0) default NULL, `v` decimal(10,0) default NULL, `a` decimal(10,0) default NULL, `period` varchar(12) default 'daily' ) ENGINE=MyISAM DEFAULT CHARSET=latin1
1) Whats the equivalent monetDB method for representing the datetime of the start of the OHLC period?
2) As lots of queries are going to pull all the data from a particular symbol table to do things like calculate moving average, should I even be using datetime as the time index, should I use an integer value instead?
Many thanks,
Tom
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
participants (1)
-
Tom H