Thomas Smith
Thomas Smith

Reputation: 1

One big XML schema or more smaller?

I create an ER Diagram of a purchase order system and currently I'm trying to create the corresponding XML schema(s) for the purchase order system. The schema(s) should include the following elements:

At the moment I'm unsure of how modular the schema(s) should be.

  1. Should I make one one big XML schema "Order" which has all of the mentioned elements in it?
  2. Should I make a XML schema for each entity/element and then include them in the "Order" XML schema?

I guess it would make sense to have a separate XML schema for the products, but I'm not sure. Is there any rule of thumb of how modular XML schemas should be created?

Upvotes: 0

Views: 86

Answers (1)

Michael Kay
Michael Kay

Reputation: 163352

The only benefit in splitting the schema into multiple schema documents is if you think you might one day be able to use those modules in isolation from each other. With something this simple, I suspect that's unlikely to happen; but your guess is likely to be better than mine. (Like most design questions posted on SO, there's not enough information about the requirements and constraints to make an informed recommendation.)

Upvotes: 1

Related Questions