Writing sql backend.
Added main fund.
more work.
Merge pull request #1 from dzyp/sql_backend

Sql backend