Generating XSD from database tables.
958449Aug 28 2012 — edited Aug 29 2012Greetings,
I'm having a serious problem with XSD generation on my DB tables. As I have found I could use the DBMS_XMLSCHEMA.GENERATESCHEMA(DB_Schema, Object_Type); function which returns and XMLTYPE variable. This would be just PERFECT and awesome way to solve my business problem, HOWEVER the database I've been probided does not have predefined types. Only the tables, and as I can see I can't create the xsd from the table itself. However I also can not create object types from the tables only the tables from object types.... very confusing ideed.
One possible solution would be to recreate the DB with the types specified and create the tables from them. Well also impossible because if I try to alter the created table to have primary keys and not null constraints I get the error that I can't alter the columns of object table...
One thing I'm not allowed to do: I MUST NOT create the types behind the tables. I either create a type FROM the table. Or I create a type and create the table FROM the type and alter it with constraints.
Any advice would come handy.
Regards,
Joe