[odb-users] odb question
Nugmanov, Ravil (GE Energy Management)
ravil.nugmanov1 at ge.com
Wed Aug 20 12:00:33 EDT 2014
Hi Boris,
Thank you for the response!
With your help and after some more research now I have better understanding of ODB features, particularly how to create database tables automatically. I like how organized and how it works, looks very attractive for me.
One more question - do you have any metrics for performance, how fast is it?
Thank you, Ravil
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Saturday, August 16, 2014 6:07 AM
To: Nugmanov, Ravil (GE Energy Management)
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] odb question
Hi Ravil,
Nugmanov, Ravil (GE Energy Management) <ravil.nugmanov1 at ge.com> writes:
> Looking at the examples, I can see that the type of data base (MSQ SQL
> or MySQL for example) should be selected before compilation, using
> preprocessor definition. So there is no way to build the application
> once, and then select data base at runtime, correct? Looks like that
> separate binaries must be built for each target database, correct?
There is multi-database support. You can even load support code for a particular database dynamically. The examples do it this way (i.e.
compile-time, single-database support) for simplicity. For details, see Section 16, "Multi-Database Support" in the ODB manual.
> Second question is about automatic creation of tables in the database.
> When I started the c++11-mssql-vc11 project, I was expecting that it
> would create tables in the database automatically. But that did not
> happen. So tables should be created before running this test, there is
> no support for automatic table creation, right?
There is support for automatic table creation. ODB can generate the necessary DDL statements either into a separate .sql file (default for client-server databases such as SQL Server) or embedded into the generated C++ code (default for embedded databases such as SQLite). See Section 3.4, "Database" in the ODB manual for details.
What's more, ODB also supports automatic database schema evolution, not only creation. That functionality is described in Chapter 13.
Boris
Unsubscribe from our commercial electronic messages.
http://supportcentral.ge.com/esurvey/takesurvey.asp?p=17778&d=3834102
Désabonner de nos messages électroniques commerciaux.
http://supportcentral.ge.com/esurvey/takesurvey.asp?p=17778&d=3839563
More information about the odb-users
mailing list