1
我有三个类SQL Server 2005中 - 返回的XML数据或数据表
一)母公司 - 其中包含了一些特性,该产品集和儿童的集合
二)儿童 - 其中包含一些属性和项集合
三)项 - 其中包含一些属性
的关系在以下XML结构描述。
<Parents>
<Parent1>
<Property1></Property1>
<Property2></Property2>
<Property3></Property3>
<Parent1Children>
<Child1>
<Child1Property1></Child1Property1>
<Child1Property2></Child1Property2>
</Child1>
<Child2>
<Child2Property1></Child2Property1>
<Child2Property2></Child2Property2>
</Child2>
</Parent1Children>
<Parent1SomeCollection>
<Item1>
<Item1Property1></Item1Property1>
<Item1Property2></Item1Property2>
</Item2>
<Item2>
<Item2Property1></Item2Property1>
<Item2Property2></Item2Property2>
</Item2>
</Parent1SomeCollection>
</Parent1>
</Parents>
我需要使用上面三个类的表中的数据。我能想到的下列选项: -
从数据库中获取 XML的形式,这种结构从存储过程中所描绘的上述 和 在 业务层使用相同的XDocument。
在3个表格的形式获取从 数据库他们在数据表和 建立 之间的关系来获得数据?
哪一个可以提供最佳的性能,是一种更好的方式还是有更好的方法来做同样的事情?
+1但是,我不打算更新这个XML中的数据。这将是一个只读结构。这就是为什么我不认为我应该创建一个数据表的原因之一。你能否在这里抛出一些光线如果我不能看到明显的? – 2010-12-07 04:40:13