Rajan, Vivek K wrote: > - Is there a mechanism to dynamically create a schema on-the-fly from >the data-structure? > > - Essentially a capability to store any custom data-structure into >SQLite data-base by automatic creation of schema for the data-structure > > I don't know about creating a schema from a data structure, but I have some experience going in the other direction, including automatic generation of SQL queries. I'm using this on a very large point of sale system at the moment (although sadly neither with SQLite or C).
In going from schema to code the most important thing is that you need a certain degree of consistency in your code. For each table that you want to generate objects for, it's highly recommended that you have a single unique primary key, and that key is system-assigned. This lends itself well to Boyce-Codd normal form, where the computer and the user have a different idea of what the primary key is, and the user's key has a uniqueness constraint upon it. I understand that this doesn't fly well with some DBAs. I'm not a sophisticated enough designer to understand their objections, but the design works well enough for my purposes. Clay Dowling

