Tag Archives: MYSQL

Debate of NOSQL MongdDB Redis or RDBMS like SQL Server or MySQL continues

Debate continues of NOSQL MongdDB Redis or RDBMS like SQL Server or MySQL

Add more confusion to the fire

http://en.m.wikipedia.org/wiki/Apache_Cassandra

http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis

Join my further to discuss at:

http://www.meetup.com/R-Matlab-Users/events/218915394/

http://www.meetup.com/quant-finance/events/218915269/

http://www.meetup.com/Toronto-NET-Developer-Meetup/

Join my FREE newsletter to see which database is always best for potential trading

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

This is why R blows donkey balls with integration between 3.1.1 and MYSQL packages. Good one! Hello Python???

This is why R blows donkey balls with integration between 3.1.1 and MYSQL packages. Good one! Hello Python???

2014-09-15 22_55_51-~_pmi scraping - RStudioLook very closely at the bottom in this image!. An important little R package called RMySQL cannot be loaded into the CURRENT R version 3.1.1. Oh the joy of open source. Once more example of wasted time. Thanks boys. I lost more faith than ever in the ever fast dropping R language. As if Got the time in the world to monkey around with this stuff. Let’s see how Python handles this stuff, Ugh!

http://www.r-bloggers.com/accessing-mysql-through-r/

install.packages("RMySQL")
Installing package into ‘C:/Users/Bryan/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)

   package ‘RMySQL’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘RMySQL’ is not available (for R version 3.1.1

Join my FREE newsletter to see what solution will be

 

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Who knew? As DBMS wars continue, PostgreSQL shows most momentum, Oracle MYSQL SQL Server and NOSQL MongoDB drop

Who knew? As DBMS wars continue, PostgreSQL shows most momentum, Oracle MYSQL SQL Server and NOSQL MongoDB drop

Postgres has always been an interesting to watch!

http://www.zdnet.com/as-dbms-wars-continue-postgresql-shows-most-momentum-7000032711/

Join my FREE newsletter how we proceed with databases for our trading needs 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

How to simply get Visual C++ connect to MYSQL, Oracle, and DB2!!

How to simply get Visual C++ connect to MYSQL, Oracle, and DB2!!

 

Join my FREE newsletter if you like these sort of articles 

Frigging hel. This took all day. I was trying to have a simple Visual C++ console application project connect to a MYSQL database. What a mess but it is from the 80s I guess. I managed to connect through an ODBC which is what I did not want. After wasted hours and desperation, I gave in. After searching online, I came across a really decent ‘library’ which seems to do the trick with even a successful Visual Studio 2010 C++ Express build. Other tutorials were not as good.  It worked so I went with it. Links below are:

http://stackoverflow.com/questions/4867424/know-of-a-good-c-mysql-odbc-tutorial

http://otl.sourceforge.net/

Use this example for MYSQL http://otl.sourceforge.net/otl3_ex226.htmbut it appears to work for DB2 and Oracle. Microsoft seems to make it hard for even for their own SQL Server but that is another day. It was just bad documentation and stupid limitations with both the Express versions of SQL Server and Visual Studio. If you want to use it, you may need to pay to complete with SQL Server. Bah!
As said, I got it connecting finally.  Here my working C++ client file.

====

#include <iostream>
using namespace std;

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define OTL_ODBC // Compile OTL 4.0/ODBC
// The following #define is required with MyODBC 3.51.11 and higher
#define OTL_ODBC_SELECT_STM_EXECUTE_BEFORE_DESCRIBE
// #define OTL_ODBC_UNIX // uncomment this line if UnixODBC is used
#include “otlv4.h” // include the OTL 4.0 header file

otl_connect db; // connect object

void insert()
// insert rows into table
{
otl_stream o(1, // buffer size should be == 1 always on INSERT
“insert into test_tab values ”
” (:f1<int>,:f2<char[31]>), ”
” (:f12<int>,:f22<char[31]>), ”
” (:f13<int>,:f23<char[31]>), ”
” (:f14<int>,:f24<char[31]>), ”
” (:f15<int>,:f25<char[31]>) “,
// INSERT statement. Multiple sets of values can be used
// to work around the lack of the bulk interface
db // connect object
);

// If the number of rows to be inserted is not known in advance,
// another stream with the same INSERT can be opened
otl_stream o2(1, // buffer size should be == 1 always on INSERT
“insert into test_tab values ”
” (:f1<int>,:f2<char[31]>)”,
db // connect object
);

char tmp[32];
int i;
for(i=1;i<=100;++i){
sprintf(tmp,”Name%d”,i);
o<<i<<tmp;
}
for(i=101;i<=103;++i){
sprintf(tmp,”Name%d”,i);
o2<<i<<tmp;
}
}

void update(const int af1)
// insert rows into table
{
otl_stream o(1, // buffer size should be == 1 always on UPDATE
“UPDATE test_tab ”
”   SET f2=:f2<char[31]> ”
” WHERE f1=:f1<int>”,
// UPDATE statement
db // connect object
);
o<<“Name changed”<<af1;
o<<otl_null()<<af1+1; // set f2 to NULL

}

void select(const int af1)
{
otl_stream i(50, // buffer size may be > 1
“select * from test_tab ”
“where f1>=:f11<int> ”
”  and f1<=:f12<int>*2″,
// SELECT statement
db // connect object
);
// create select stream

int f1;
char f2[31];

i<<af1<<af1; // :f11 = af1, :f12 = af1
while(!i.eof()){ // while not end-of-data
i>>f1;
cout<<“f1=”<<f1<<“, f2=”;
i>>f2;
if(i.is_null())
cout<<“NULL”;
else
cout<<f2;
cout<<endl;
}

}

int main()
{
otl_connect::otl_initialize(); // initialize ODBC environment
try{

db.rlogon(“root/XX @mysql3532”);
//db.rlogon(“UID=scott;PWD=tiger;DSN=mysql35”); // connect to ODBC
//  db.rlogon(“scott/tiger@mysql35”); // connect to ODBC, alternative format
// of connect string

otl_cursor::direct_exec
(
db,
“drop table test_tab”,
otl_exception::disabled // disable OTL exceptions
); // drop table

otl_cursor::direct_exec
(
db,
“create table test_tab(f1 int, f2 varchar(30))”
//”create table test_tab(f1 int, f2 varchar(30)) type=innoDB” (causes MYSQL error)
);  // create table

insert(); // insert records into the table
update(10); // update records in the table
select(8); // select records from the table

}

catch(otl_exception& p){ // intercept OTL exceptions
cerr<<p.msg<<endl; // print out error message
cerr<<p.stm_text<<endl; // print out SQL that caused the error
cerr<<p.sqlstate<<endl; // print out SQLSTATE message
cerr<<p.var_info<<endl; // print out the variable that caused the error
}

db.logoff(); // disconnect from ODBC

return 0;

}

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

How to use SQL Database for Algo Trading with HFT Potential with SQL Server MYSQL NOSQL MongoDB Redis Cassandra R Java

How to use SQL Database for Algo Trading with HFT Potential with SQL Server MYSQL NOSQL MongoDB Redis Cassandra R Java

This has been posted for my QuantLabs.net Premium Members

Notes and Video Demos of SQL Database for Algo Trading with HFT Potential with SQL Server MYSQL NOSQL MongoDB Redis Cassandra R Java

This happens tonight and will be the LAST EVER I do this LIVE

Get access here

Want to learn more about how to use databases for Automated Algo Trading System, join my FREE newsletter

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

TONIGHT SQL Databases with MYSQL SQL Server NOSQL MongoDB with Automated Trading Systems webinar with quant and HFT potential

HI there

Here are the details for tonite’s Workshop event on :
I have my last LIVE workshop event for 2013 for tonight at 7 PM Eastern Time:

Quant Members Workshop schedule for Trading Infrastructure: Databases like MYSQL or SQL Server for automated trading systems – See more at: https://quantlabs.net/blog/2013/11/quant-members-workshop-schedule-for-trading-infrastructure-databases-like-mysql-or-sql-server-for-automated-trading-systems/#sthash.3huP3TVZ.dpuf

 

Login details at:

….

Hope you can make it out!

Want access? Get it here!

Need more info? Get it here?

Join our FREE newsletter to learn more about topics like this
Bryan

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Quant Members Workshop schedule for Trading Infrastructure: Databases like MYSQL or SQL Server for automated trading systems

Quant Members Workshop schedule for Trading Infrastructure:  databases like MYSQL or SQL Server for automated trading systems

Workshop details on databases like MYSQL or SQL Server for automated trading systems

Thur Dec 19 at 7PM EST

– See more at: https://quantlabs.net/blog/2013/11/final-scheduled-dates-for-our-upcoming-automated-trading-system-workshop-with-membership-closing-jan-6-2014/#sthash.oNJSFtWA.dpuf

 

Join our FREE newsletter to help you launch your profitable automated trading business with compete source code

DATABASES LIKE SQL SERVER AND MYSQL
Demo of Position Management with SQL Server Potential Strategy and Interactive Brokers TWS
Demo of 2 C Sharp applications communicating through SQL Server using SQL Dependency
First version trading platform database schema with SQL Server T-SQL script
Demo of code walkthrough with SQL Server StreamInsight Financial Example
How to connect Microsoft SQL Server to Matlab
SQL Server T-SQL create script for market data with C# sample to insert H
Steps from MySQL Workbench to C# Visual Studio 2012 to import into Matlab 2012b workspace with Database Toolbox
How to connect MYSQL to Matlab
Recommended videos for webinar on NOSQL (Redis) parallelization for R model processing and simulations

HOLY! SOURCE CODE AND WALK-THROUGH VIDEOS ARE AVAILABLE FOR MOST TOPIC!

Want to participate? Join our QuantLabs.net Premium Membership for access to this private webinar!    

–> JOIN HERE <–

NOTE ON HOW THIS WORKS:

It is strongly advised to join as soon as possible to prepare for these topics. This event will cover

any questions you have on the above topics. I need to know what to formally present from a

collection of questions collected 48 hours prior to this event.

THIS IS GOING TO HAPPEN ONCE AND ONCE ONLY

Here is the entire schedule and topics covered:

Final scheduled dates for our upcoming automated trading system workshop with the

QuantLabs.Net Premium  Membership no longer be taking new members

past Jan 6 2014!

See more at:

https://quantlabs.net/blog/2013/11/final-scheduled-dates-for-our-upcoming-automated-trading-system-workshop-with-membership-closing-jan-6-2014/#sthash.KjcC1jWF.dpuf

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Holy! New SQL Server 2014 will have a neat high speed Hekaton in memory database capability vs Oracle vs MYSQL vs NOSQL

Holy! New SQL Server 2014 will have a neat high speed Hekaton in memory database capability vs Oracle vs MYSQL vs NOSQL

This could be a real game changer compared to Oracle, MYSQL, or even NOSQL

http://joinsights.com/2013/06/16/whats-new-in-sql-server-2014/

Join my FREE newsletter to see what kind of potential uses this may have for my high speed automated trading system

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

My video on Matlab 2013a and MYSQL database integration demo with no SQL Server or Postgres

My video on Matlab 2013a and MYSQL database integration demo with no SQL Server or Postgres

Oracle does offer a FREE 64 of MYSQL

Get more info on how I use this with my FREE newsletter 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Current update with Matlab 2013a connecting to Microsoft SQL Server 2012 Oracle MYSQL and Postgres

Current update with Matlab 2013a connecting to Microsoft SQL Server 2012 Oracle MYSQL and Postgres

T his is still a pure hell to accomplish. WIth Matlab 2011, I was only able to connect to MYSQL. I was hoping the integration of SQL Server with Matlab 2013a would be easier but nope Postgres is a mess for WIndows with their ODBC not connecting with Matlab. I may resort back to MYSQL but I got some beefs with Oracle.

Just FYI

Oracle decided only to provide a free 32 bit version with no 64 bit version. Bad decision on the part of Oracle but what can we do. I stand corrected as this does exist!

As for the NOSQL options like MongoDB, no thanks as the Postgres proves to be useless. I like it easy but will give it MYSQL is quite easy. Also, I am not too worried about speed as this Matlab/MYSQL integration is only being used for research and testing. Not  production and trading.

UPDATE: I think Oracle is making it a nightmare to use MYSQL today. The Workbench is kind of useless. It is nowhere as easy to work with separate databases versus the current version. I am dropping this MYSQL

LEARN MORE HOW I WILL USE A DATABASE TO CONNECT TO IN MY FREE NEWSLETTER

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!