Mapping Relational Database to Object generated from XML Schema

Posts   
 
    
ftuttle
User
Posts: 40
Joined: 10-Dec-2006
# Posted on: 12-Dec-2006 19:40:46   

I have a need to map a relational database to an XML Schema that is quite dissimilar. I need to do some enumeration conversions from numeric and string data, I also need to in some cases perform some logic to determine the values of the data to use in the XML object schema file. The database has about 150 applicable tables to draw from and the schema is very complex and large.

Is the LLBLGen tool a good choice for this kind of need?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Dec-2006 07:12:25   

LLBLGen Pro generated entities are XML serializable, and you can use Type Converters to convert from any database type to any .Net Type (Enum type converter example: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7355)

ftuttle
User
Posts: 40
Joined: 10-Dec-2006
# Posted on: 15-Dec-2006 17:56:33   

You provided an answer to part of the problem of mapping a relational design to XMLSchema. I know that I can do about anything I want if I write the code myself. How can this tool help me with this kind of thing so I dont have to mannually write the code? Or is the answer, it just generates entities and it is my job to write the code between the entities generated and my schema generated objects?

BertS
User
Posts: 89
Joined: 28-Jul-2005
# Posted on: 15-Dec-2006 22:03:16   

ftuttle wrote:

Or is the answer, it just generates entities and it is my job to write the code between the entities generated and my schema generated objects?

Yes, that's the way to go. But you can edit the templates that generate the enitities. So if there are standards for converting your rows(/entities) to the XML-schema (which has to be applied over several entities), you can change the template, and that part is generated for you. For the specific conversion-issues, you've of course to write your own logic, but that can be simple by overriding the properties from the entities.

I think, that if there's any conversion-logic (in your implementation) that is duplicated in several places, LLBLGen will help you pretty much, with the ability to edit the templates.