Reputation: 4363
I am trying to implement a system that could store any kind of features for an object, the object can be any class of object. For each object i will save it's features using xml into the database. For each class of objects i will use a validation (DTD or XSD) constructed dynamically constructed by user, in order to validate the product before it's saved into database. A feature of the object can be any type of data : string, char, int,double, picture, video,etc.
Can you point me in some articles, examples, code snippets or best code oriented approach in order to obtain the goals i stated before?
From a previous question I've seen that this is the best approach.
Thanks,
Upvotes: 2
Views: 837
Reputation: 755381
I would say: toss the DTD and upgrade to the 21st century! Use XSD (XML schema) instead.
SQL Server 2005 and newer offers support for XML schema collections in your database, so you can "enforce" your XML columns to comply with a collection of possible XML schemata.
Read more about SQL Server XML schema collections here:
Upvotes: 4