The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Simplying app database management has a screencast showing how to do database migration which looks very sweet.

Is there a similar framework for C++ and sqlite?

It would be awesome if I could specify database tables as C++ classes and then use these classes directly to create and manipulate the tables. When I need to change the schema, it would be great to just change these classes and have the migration happen automatically somehow.
Monday, March 03, 2008
That sounds like a database schema diff tool? There are such tools available for most databases. RoR has an ORM-layer build in to the framework. I'm sure there are ORM's for C++, although I don't know any specifics, as I'm not using C++.
Troels Knak-Nielsen Send private email
Monday, March 03, 2008
I rolled my own database management app that alters the database based on classes. It is written in C#. But I don't know of anything for C++.
Monday, March 03, 2008
I think what I am referring to is called "migration framework".

The nice thing is that the screencast shows, you don't have to dabble in SQL for crud operations although I am not sure how more complicated things work (like joining tables etc).
Tuesday, March 04, 2008
I used ror a bit last summer and the migrations are great, with a few caveats. For instance total disregard for foreign keys, which if you want them you will need to write sql. Another thing is that changes to the schema are not transactional. Another thing that can bite you is that if you use your models directly in the migrations, as those models might change over time/refactoring and thus make your database migration invalid... and the solution is to use you guessed it, sql..

Anyway I ended up just building a command line migration tool for myself that uses the same principles, but that just runs plain sql and it works great and fits very well with development I do.
Wednesday, March 05, 2008

That's the terminology I was looking for apparently. I didn't know what to search for.

Friday, March 07, 2008

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz