Serving the Quantitative Finance Community

 
User avatar
humtumiit
Topic Author
Posts: 0
Joined: April 28th, 2007, 6:20 pm

Database and MAtlab

May 20th, 2008, 4:49 pm

I would like to extract data from database. The extractes data has around more than 2 millions no of rows and 6 colums. How to extract 2 millions no of rows in matlab. what is the function to extract such a huge data? How to handle such a big datain matlab. Any help will be appriciated.
Last edited by humtumiit on May 19th, 2008, 10:00 pm, edited 1 time in total.
 
User avatar
msperlin
Posts: 5
Joined: July 10th, 2006, 6:21 pm

Database and MAtlab

May 20th, 2008, 5:00 pm

QuoteOriginally posted by: humtumiitI would like to extract data from database. The extractes data has around more than 2 millions no of rows and 6 colums. How to extract 2 millions no of rows in matlab. what is the function to extract such a huge data? How to handle such a big datain matlab. Any help will be appriciated.No way. Matlab will choke for a 2mX6 cell array.You have to first load the data into some database software (eg. acess) and them pull out what you want (eg. a particular column for a particular ticker). Its quite easy (google "odbc server matlab").
 
User avatar
katastrofa
Posts: 7954
Joined: August 16th, 2007, 5:36 am
Location: Event Horizon

Database and MAtlab

May 21st, 2008, 11:47 pm

You can also write something in Java and call that from Matlab.
 
User avatar
humtumiit
Topic Author
Posts: 0
Joined: April 28th, 2007, 6:20 pm

Database and MAtlab

May 23rd, 2008, 10:42 am

Is there any option in VC++
 
User avatar
lehalle
Posts: 0
Joined: April 19th, 2006, 7:13 am

Database and MAtlab

May 24th, 2008, 11:11 am

the matlab "database" toolbox will allow to connect matlab directly to any database.the question about the size of your data is not directly connected to database issues (you can use a cursor in database toolbox functions to build a "block by block" access to the data). if you really need to access to all those rows simultaneously (I do not think that's the case), use matlab on a linux64bit computer. If you only need to access your data block by block, use the cursor matlab feature, like for database access in any other language.
 
User avatar
dobranszky
Posts: 0
Joined: January 8th, 2006, 11:53 am

Database and MAtlab

May 24th, 2008, 12:15 pm

humtumiit, if you want to do it from VC++, then I propose you to connect to your database through ODBC using libodbc++. This is also what I do.After the extraction and making some preprocessing you may put the data towards to MATLAB using the MEX functionalities.However, if you really need the data in MATLAB, then it is better to do the preprocessing in Java, since there the JDBC is built-in and you can use the Java beans in MATLAB directly, which means there is no need to write wrappers using MEX.