Database Projects

Milian Wolff mail at milianw.de
Wed Jan 11 13:01:12 UTC 2012


Miguel Tadeu, 10.01.2012:
> Hi,
> I'm making a proposal for a new project type. This project type is to
> create facilities to develop for databases. Since there's the need for
> some applications to use a database, it would be useful to integrate the
> database development into the same session as the application.

Note: Quanta has a first-shot at this with its SQL plugin. If you want to work 
on it, I can push it into it's own repository for easier access.

> Some of the features I'm thinking of would be:
> 	- Reverse engineer from already existing databases

what does this mean?

> 	- Tree view for the database objects(tables, views, stored procedures,
> functions, etc)

if the above mentioned plugin cannot do this already, it is of course a good 
idea to add such functionality.

> - The database objects would be stored as .sql files

again, what does this mean? if users write database stuff in .sql files, so be 
it. But what should KDevelop do here?

> 	- Language support for SQL

define "SQL". MySQL? SQLite? PostgreSQL? ...? You'll need to concentrate on 
one "dialect" first and then might work on others later on. I agree that this 
would be a nice thing btw.

For this you'll need a parser and lexer for your dialect. Best would be to 
reuse such code from the official server, if possible. I.e. by copying their 
grammar/lexer files.

> 	- Code completion for SQL development, collecting the symbols from the
> .sql files

-> see above

> - Code validation for SQL

-> see above

> 	- Ability to easily create unit tests for functions and stored procedures

is there no existing SQL-test framework? I'm reluctant to create one on our 
own. If there really is none yet, I would not suggest writing it in a way that 
is heavily dependend on KDevelop. Rather create it as a separate application 
and embed/integrate it into KDevelop. This way more people can use it and it 
will get better coverage.

> 	- Data generation for testing

-> see above

> 	- With .sql files generated in a structured tree in the file system, it
> would be easy to include the database in a source control system

again, I don't get it. A database (binary blob, potentially large!) should 
*not* be tracked by a VCS. If a user really wants to do it, he should do that 
manually. This is *not* something KDevelop should do automatically.

Re file system structure: Again, this should be left to the user if he wants 
that or not. KDevelop does not / should not impose such rules.

> - Deployment of the local .sql files into one or more databases(DEV, TEST,
> PROD, etc)

the above mentioned SQL plugin could be extended with such functionality

> - Diff between databases and local .sql files

Again, what do you mean by a "database .sql file"? Maybe you mean a dump from 
a database?

> 	- Generate a diff script to deploy on a database

? what do you mean here?

> 	- Possibility to run tests against the local .sql scripts instead of the
> database server

see above regarding testing

> - Debug functions and stored procedures

see above regarding testing

> 	- Support for MySQL. Other servers would also be nice.

Yep, MySQL language support would be nice.

bye

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120111/287133a0/attachment.sig>


More information about the KDevelop-devel mailing list