Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
An ideea for an RDBMS project using C::B. Would be this a challange or what?
eugen_mihailescu:
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
* Trigger1
* ...
* Constraints
* Contraint1
* ...(other table dependency)
* ...(other tables)
* STORED PROCEDURES
* My1StoredProcedure
* ...
* VIEWS
* My1stView
* ...
* FUNCTIONS
* My1stFunction
* ...
* 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
stahta01:
I do NOT think Code::Blocks would be worth the effort to add SQL additions.
I suggest finding an open source SQL Tool and use your efferts to improve it.
Examples
SQL Query Agent http://sourceforge.net/projects/sqlqueryagent/
pgAdmin http://www.pgadmin.org/
See also:
http://en.wikipedia.org/wiki/Comparison_of_database_tools
Tim S.
JGM:
but many programmers use sql in combination with their programming language I for example use php with sqlite, and firebird with C++ I think never is a bad idea to extend as much as possible an IDE, is true that an IDE will never never cover everything every particular user would like but hey even visual studio has sql support for many databases.
Code::blocks could become much powerful with such a feature if some one implements it!
My 2,3,4,5,6 cents :)
stahta01:
The nice thing about Code::Blocks is a plug-in environment; so, feel free to try to do it.
Note, pgAdmin uses wxWidgets so you might be able to borrow ideas and code from it.
I will be willing to do some testing and add suggestions. But, I still not sure that an IDE that primary does C/C++ is the best thing to add the effort to make an SQL tool.
Things that might apply.
1A. Use Targets as different server/databases for execution of SQL commands.
1B. Use Targets as different users for execution of SQL commands.
2. Would projects match up with databases? This seems a good match.
3. Would workspace match up to Servers? Not sure this is a good match.
Not certain how the xml files describing tables will be used.
Former MS SQL 2000 developer for a small custom client/server App, stopped in mid 2006.
Tim S.
eugen_mihailescu:
--- Quote from: stahta01 on April 30, 2010, 12:08:06 am ---I do NOT think Code::Blocks would be worth the effort to add SQL additions.
I suggest finding an open source SQL Tool and use your efferts to improve it.
Examples
SQL Query Agent http://sourceforge.net/projects/sqlqueryagent/
pgAdmin http://www.pgadmin.org/
See also:
http://en.wikipedia.org/wiki/Comparison_of_database_tools
Tim S.
--- End quote ---
Hi Tim,
I think you have got me wrong, or I was not able (I've learned English from TV/Internet) to synthesize my idea in order to make me very clear. I am not looking to create another RDBMS administration tool (pgAdmin, M$ Management Studio, Toad, etc). These kind of software have nothing in common with my idea, except that both revolve around RDBMS.
The idea is much closer to http://blogs.msdn.com/gertd/archive/2007/11/21/visual-studio-team-system-2008-database-edition.aspx than Toad/pgAdmin/you_name_it.
Toad/pgAdmin/etc are more likely useful for database administrators than database programmers, I will not go further because is too much to discuss about this subject.
Thank you for your reply, I will consider it together with all other replies that I hope it will comes next days :D
Best wishes,
Eugen
Navigation
[0] Message Index
[#] Next page
Go to full version