Hi All, I'm going round in circles trying to think of the 'best' way to implement a data server. This data server will be accessed by several systems, some in operation, some 'on the drawing board' and some that haven't even been thought of yet. Probably the best performing solution would be to write all application queries as stored procedures, but that has the obvious and major disadvantage of tightly coupling the data server with its client applications. What I would like to do is to 'publish' the type of data that is available e.g via an XML schema, and then allow the client applications specify what data fields they require and what the 'selection' criteria is.
Let me give an example to clarify: Suppose I have a DB that contains a list of people and addresses. Each person can have 0 or more addresses (home, office, mailing, etc) and each address can be 'used' by 0 or more people. Now suppose I have a HR application that wants to list all the addresses for a specific person. It would want to pass the data server a 'person id' and have it return something along the lines of: <person> <pid>1001</pid> <name>Joe Bloggs</name> <address type='home'> <aid>1234</aid> <line1>Bloggsville</line1> </address> <address type='office'> <aid>1235</aid> <line1>The Slave Pit</line1> </address> </person> Finally suppose I also have a mailing application that wants list all the people who have the same 'office' address. It would want to pass the data server an 'address id' and have it return something like: <address> <aid>1235</aid> <line1>The Slave Pit</line1> <person> <pid>1001</pid> <name>Joe Bloggs</name> </person> </address> The crux of the problem seems to centre around mapping the DB relations to the hierarchical structure of XML. In the above example the 2 client applications model the relationship between address and person differently. I have looked at using annotated schemas with XPath but the main problem with that solution is a single annotated schema is unlikely to be sufficient for all (or even one) client applications. When a new client application comes along I will almost certainly need to create a new schema. The more schemas that are produced the closer I am to the specific stored procedure solution. The example above would require two XSDs, one for each application. Does anyone have any ideas or pointers to resources that can help me out? Is this actually possible or do I just have to accept a certain level of inter-application dependency. Many thanks in advance, Phil Ruelle Website: http://www.mourant.com The information in this email is confidential. The contents may not be disclosed or used by anyone other than the addressee. If you are not the intended recipient, please notify us immediately at the above e-mail address or telephone +44 (0)1534 609 000 We cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. If you suspect that the message may have been intercepted or amended, please call the sender. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.