I have an application which reads the data from the database, creates an object out of the data, marshalls it into an xml and enqueue the xml to a queue which is producer. The xml is dequeued from the queue by a consumer.
I need to use xsds at two different places.
For database access while reading the data from the database and
For interaction between producer and consumer
Can the same xsd be used in both the cases? Or do I need to use different xsds?
Transferred some facts from the comments:
Some tables in my datamodel have m-m relns. For eg consider the below 3 tables Requests:
RequestId Desc Exporters : ExporterId Desc Request_exporters : RequestId (FK) ExporterId (FK)
xsd for xml (interaction between producer and consumer ) looks like :
<xs:complexType name="Requests">
<xs:element name="RequestId" type="xs:long" />
<xs:element name="Exporter" type="Exporter" minOccurs="1"
maxOccurs="unbounded"/>
</xs:complexType>
But the xsd for database needs to have the details of ttrequestexporters as well. So I am not clear as to how I should use the same xsd for both.