That shouldn't be hard; in Oracle, you may map columns of table "all_tables"
and "all_tab_columns" to get what you want.

In MySQL, you should use [
http://dev.mysql.com/doc/refman/5.0/en/columns-table.html]


SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE table_name = '*tbl_name*'
  [AND table_schema = '*db_name*']
  [AND column_name LIKE '*wild*']


Diogo F.C. PatrĂ£o
Manager of Medical Informatics
Biotechnology Laboratory
Hospital A.C. Camargo
http://www.accamargo.org.br/


On Fri, Jan 21, 2011 at 11:48 PM, Erwachen Hz <[email protected]> wrote:

> Hi,
>
> Was reading from Bobdc 
> Blog<http://www.snee.com/bobdc.blog/2008/10/sparql-and-relational-database.html>and
>  wanted to ask this question as the entry have more than 3 years:
>
> Lets first take this example which represent (country, language,
> population) of a database:
>
> "Germany"        "German"         91.3
> "Seychelles"     "Seselwa"        91.3
> "Romania"        "Romanian"       90.7
>
> Is there a way to use D2RQ to have the following result  ("*name_of_table*"
> - "country_name"):
>
> *Country* -> "Germany"
> *Country* -> "Seychelles"
> *Country* -> "Romania"
>
>
> D2RQ should give instances but is there a way to have *names of tables* as 
> above with just using d2rq?
> and does anyone changed on the mapping file so it'll give rather the shema 
> structure as result?
>
>
> Regards!
>
>
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> d2rq-map-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
>
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to