[xwiki-users] Wiki-fying a database schema / DDL?
Hi all, I'm just starting to use Xwiki, having been the admin for my company's JSPwiki installation for a few years now. In that one, we had a very useful part of the wiki which was an online database schema for our databases. You see a list of the tables, which you can click on and see the list of fields in that table, which you can click on and see the information regarding that field. Our method was to take a DDL and run it through a script which parsed it out into files that JSPwiki could read. This way, we could take updated DDL's, run those through the script, and keep updating the table list and table info pages, while leaving the field named pages untouched. Assuming I have described that correctly, does anyone have any solutions that would be similar to this in Xwiki? Something that doesn't involve manually updating the table list and table info pages? I was thinking we could modify the script to spit out something that we could the import into Xwiki, but I'm not sure if that is the best approach. I was hoping there was a plugin that let you connect to a database and run real-time queries and then us a macro to wiki-fy the results, but I didn't find anything like that. Thanks in advance for the suggestions! - Matt L.
Hi Matt, On Jul 2, 2012, at 1:30 AM, Matt Lamoureux wrote:
Hi all, I'm just starting to use Xwiki, having been the admin for my company's JSPwiki installation for a few years now. In that one, we had a very useful part of the wiki which was an online database schema for our databases. You see a list of the tables, which you can click on and see the list of fields in that table, which you can click on and see the information regarding that field. Our method was to take a DDL and run it through a script which parsed it out into files that JSPwiki could read. This way, we could take updated DDL's, run those through the script, and keep updating the table list and table info pages, while leaving the field named pages untouched. Assuming I have described that correctly, does anyone have any solutions that would be similar to this in Xwiki? Something that doesn't involve manually updating the table list and table info pages?
That would be great. The info we have at http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema is a bit too static indeed.
I was thinking we could modify the script to spit out something that we could the import into Xwiki, but I'm not sure if that is the best approach. I was hoping there was a plugin that let you connect to a database and run real-time queries and then us a macro to wiki-fy the results, but I didn't find anything like that.
Here's an example: http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL Thanks -Vincent
There is also this plugin: http://xwikisql.gradsoft.ua/docs/XWikiSqlPluginGuide.html But I'm not sure whether it still works. Guillaume On Mon, Jul 2, 2012 at 7:55 AM, Vincent Massol <[email protected]> wrote:
Hi Matt,
On Jul 2, 2012, at 1:30 AM, Matt Lamoureux wrote:
Hi all, I'm just starting to use Xwiki, having been the admin for my company's JSPwiki installation for a few years now. In that one, we had a very useful part of the wiki which was an online database schema for our databases. You see a list of the tables, which you can click on and see the list of fields in that table, which you can click on and see the information regarding that field. Our method was to take a DDL and run it through a script which parsed it out into files that JSPwiki could read. This way, we could take updated DDL's, run those through the script, and keep updating the table list and table info pages, while leaving the field named pages untouched. Assuming I have described that correctly, does anyone have any solutions that would be similar to this in Xwiki? Something that doesn't involve manually updating the table list and table info pages?
That would be great. The info we have at http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema is a bit too static indeed.
I was thinking we could modify the script to spit out something that we could the import into Xwiki, but I'm not sure if that is the best approach. I was hoping there was a plugin that let you connect to a database and run real-time queries and then us a macro to wiki-fy the results, but I didn't find anything like that.
Here's an example: http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Jul 2, 2012, at 11:15 AM, Guillaume Lerouge wrote:
There is also this plugin:
http://xwikisql.gradsoft.ua/docs/XWikiSqlPluginGuide.html
But I'm not sure whether it still works.
Note that I didn't mention it voluntarily because it's using deprecated technology so I don't think it's a good idea to use it. However it could be nice for someone to create a SQL Script Service and package it as an extension. It's really simple to do. Thanks -Vincent
Guillaume
On Mon, Jul 2, 2012 at 7:55 AM, Vincent Massol <[email protected]> wrote:
Hi Matt,
On Jul 2, 2012, at 1:30 AM, Matt Lamoureux wrote:
Hi all, I'm just starting to use Xwiki, having been the admin for my company's JSPwiki installation for a few years now. In that one, we had a very useful part of the wiki which was an online database schema for our databases. You see a list of the tables, which you can click on and see the list of fields in that table, which you can click on and see the information regarding that field. Our method was to take a DDL and run it through a script which parsed it out into files that JSPwiki could read. This way, we could take updated DDL's, run those through the script, and keep updating the table list and table info pages, while leaving the field named pages untouched. Assuming I have described that correctly, does anyone have any solutions that would be similar to this in Xwiki? Something that doesn't involve manually updating the table list and table info pages?
That would be great. The info we have at http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema is a bit too static indeed.
I was thinking we could modify the script to spit out something that we could the import into Xwiki, but I'm not sure if that is the best approach. I was hoping there was a plugin that let you connect to a database and run real-time queries and then us a macro to wiki-fy the results, but I didn't find anything like that.
Here's an example: http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL
Thanks -Vincent
Hmm, ExecuteSQL looks like it will only work on the wiki database. I was looking for something similar to XwikSqlPlugin - where it could generate wiki pages from our application database schemas. Then I found things like SchemaSpy and SQLFairy. It would be sweet if there was a plugin built around either of those technologies, but maybe I will have time to play with that later. For now, if there is nothing readily available or easily adapted, I think we will just have to rely on manual updates... Thanks!
Hi Matt, On Jul 2, 2012, at 5:11 PM, Matt Lamoureux wrote:
Hmm, ExecuteSQL looks like it will only work on the wiki database. I was looking for something similar to XwikSqlPlugin - where it could generate wiki pages from our application database schemas. Then I found things like SchemaSpy and SQLFairy. It would be sweet if there was a plugin built around either of those technologies, but maybe I will have time to play with that later. For now, if there is nothing readily available or easily adapted, I think we will just have to rely on manual updates…
Another solution is just to write JDBC code in Groovy inside a wiki page. Groovy even has some syntactic sugar to make that easy, see http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL (I've updated it) Note that it would be nice to find out how to define a data source in xwiki's web.xml and use that instead of having to specify the credentials in the page. I haven't researched that but it should be pretty easy to do by doing some JNDI lookup or something similar. Thanks -Vincent
is groovy installed/active in WAR installation ? to me groovy macros rendered just like any other text -- View this message in context: http://xwiki.475771.n2.nabble.com/Wiki-fying-a-database-schema-DDL-tp7580034... Sent from the XWiki- Users mailing list archive at Nabble.com.
vmassol wrote
However it could be nice for someone to create a SQL Script Service and package it as an extension.
would it be generic enought to support different SQL dialects? Would it support SVG ot tables would be enough ? About XWiki documentation, i think the Hibernate schema should be taken for wikifying. SQL scripts are important to maintain or add db compatibility layers, but the primary info sources from Hibernate, not from SQL database -- View this message in context: http://xwiki.475771.n2.nabble.com/Wiki-fying-a-database-schema-DDL-tp7580034... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (4)
-
Arioch -
Guillaume Lerouge -
Matt Lamoureux -
Vincent Massol