As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What would be the pros and cons of PostgreSQL and MySql with the QSqlDatabase class in Qt? Is there a preferred database when it comes to connecting remotely with C++? These are currently my only options, should I seek another?
QSqlDatabase is database-agnostic. There may be a few slight differences in how QtSql classes behave with the different drivers, but it's still possible to write database-agnostic applications.
I think you really should pick what you're most familiar with, unless there's a compelling reason to favor one in particular.
I like PostgreSQL the most because
works for me
is suitable for my projects
is mature and reliable
documentation is fantastic
community is awesome
for me it's easier to setup
and yes, I'm a deeply fanatized PostgreSQL fanboy.
In some specific scenarios it might make sense to use SQLite instead.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm looking for a database that provides access as SQLite or BerkeleyDB do: access through "in-process API calls". That would be for use in a desktop application.
Requirements:
can be linked to the desktop application (no separate process/server to be run)
document oriented, with query-able metadata/fields
indexing
persistent (disk storage)
C++ bindings
You have many alternatives, but I think that it will be difficult to find an database that meets your exact requirments
Some of the alternatives that comes to mind are HamsterDB, EJDB and FireBird. These can all be embedded into your application and provides C++ bindings.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
After searching seems like the only SQL database that is free and can be embedded in a C/C++ application is PostgreSQL.
There are other solutions with a permissive license ? How hard is writing this from the scratch in C/C++ so i can code my own stuff ?
I suppose the standard answer to this question is sqlite.
What OS are you targeting? For cross-platform use I can't suggest anything but sqlite. If you're targeting windows only, then there is also Microsoft SQL server compact edition to consider.
There is a free database BerkeleyDB from Oracle. It is available as a C Source code. I used the database with VxWorks. with which OS you want to work with? Do mention these to get correct solutions.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am trying to connect to mysql databse with c++.
Im not so good with c++ since i'm web developer, so i was searching around for some good tutorials and found some but most of them are outdated, and my problem that i'm using microsoft visual c++ 2010 so most of tutorials are for older versions and doesn't work so well.
Anyways maybe any one could point me to the right direction with some documentation/tutorials, etc.
I would try this. It seems like the most up-to-date implementation of what you're asking for. It would probably be worth getting an older version of visual C++ if need be.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Is there a tool for C++ that is at least remotely similar to Rails migrations?
I think anything "similar" to Rails migrations is going to be somewhat specific to an ORM or other framework - the ease of use comes from the fact that you migrate from one object model to another.
Since C++ doesn't have an ORM or any other built-in way of specifying a database schema, I don't see how there can be a schema migration tool "for C++". Perhaps if you specify what tools you're using, the question will be more eye-catching for those who know what's available.
If you can express your migration purely in terms of the database tables, then you could use a migration tool that's independent of any ORM. But then you wouldn't actually need it to be in C++, since it's just issuing SQL (or whatever database) commands. There are plenty of tools around (maybe search "database schema migration"), although I'm afraid I'm basically ignorant in this area, and can't recommend one. As long as you have an adaptor to your database, you could even use Rails...
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Rather than possibly reinventing the wheel (by "rolling my own") - I thought I'd ask in here first.
Anyone knows where I can download a good C/C++ RESTful framework?. I have had a quick look on google, but there is nothing too impressive so far - maybe someone in here has written one already (that they dont mind sharing), or may know a lik to a good one (preferably, they have already used it before)
I've just seen this, it may be what I'm looking for. Could be useful for others too
A solution to this would be the ffead-cpp framework, It provides the HTTPRequest, HTTPResponse and the HTTPResponseParser utility classes. Once you get hold of the HTTP Request parameters, developing a rest-full service would be a walk in the park.