Hello everyone,
I hope my question is not too stupid for this forum
Premise:I am newcomer to C::B, I study a bit (1wk) the functionality, I even built the C::B from nightly build (it is such a cool thing that I have not enough words to express myself), so I am very pleased about the whole work that you have done guys, and also I am very optimist for the future of some RDBMS projects idea (RDBMS have nothing in common with C++, you'll think, right?)
What I am going to try:Usually I (but I think that there are thousands like me) am working with large RDBMS projects, such project usually have over 1000 tables, 1000 stored procedures, 1000 functions, 1000 triggers, and so on.
You can imagine this project as a structure of folders and files, as following:
- DATABASE
- 1st_MODULE_NAME
- TABLES
- My1stTable
- Triggers
- Constraints(other table dependency)
- ...(other tables)
- STORED PROCEDURES
- 2nd_MODULE_NAME
Bold = project structure as folders
Italic = files with .sql extension
So, actually a RDBMS project is a kind of file structure on disk, folders+files. The file types an RDBMS project will have are:
- .sql = SQL object script file
- .xml = SQL object property file
.sql file will store something like "CREATE <obj_type> BEGIN ....END"
.xml file will store the object's properties, in the case of a table will store the table name, the field's list, for each field will store the name/type/size/etc.
CB already is capable to handle this kind of thing (virtual folders and source files).
CB already have an editor with syntax highlighting. Also I saw in the nightly build the lexer (used for syntax highlighting) and something called "sqcompiler.cpp". I don't know yet where it is used (in C::B I mean) but I have read the source code (.cpp/.h) and it seems to be a "syntax checker" based on the ? language grammar. Based on this ? compiler (if it is not already something built in C::B yet) I will write a plug-in that simply will call(would be the easy way) the "? compiler" to check the .sql file syntax.
If there is not any compiler that I can use to check SQL syntax this will be the first challenge.
In this way I can use CB for RDBMS source management. OK, this can be done (sort of) using a lot of free tools, why reinventing the wheel?
Actually the IDE have already a lot of functionality that can be (re)used no matter what source file you will have + the ability to integrate with custom plug-ins that is extending its functionality. This is the big difference.
The final C:B should help any "RDBMS/C++" programmer to achieve the following:
- to call a plug-in that will connect a RDBMS, analyze the structure, create inside CB the virtual folder structure, in each folder create the necessary .sql/.xml files based on the RDBMS objects
- the IDE already have almost everything necessary for source editing and syntax checking (or will have)
- to call a plug-in that will allow to connect a RDBMS and based on the virtual folder+xml+sql files to create from scratch the database structure, objects, so on; this plug-in will be something like "RDBMS deployment" if you like
- if this will be possible then I will go further, for example to manage the source changes and to create incremental deployment scripts
- I have more ideas but for the moment I will be glad if you (the experimented users preferable) can confirm if CB + CB SDK could be a framework for such a project.
The thing is that RDBMS project is not different than any other programing language project, except that there are no such tools available freely as open source projects, or at least I never heard of.
At M$ they have such a project but you don't want to know how expensive is just one license (see
http://blogs.msdn.com/gertd/archive/2007/11/21/visual-studio-team-system-2008-database-edition.aspx).
So,what do you think? Am I just crazy, do I missed the forum where I should write this problem, or what?
(ignore the following tag)[/list]
Update:I understand now what is about sqcompiler (see my obscure point above), it might be a solution for what I have asked:
http://en.wikipedia.org/wiki/Squirrel_%28programming_language%29