建模:Xml vs.关系数据库 [英] Modeling: Xml vs. Relational Database

查看:87
本文介绍了建模:Xml vs.关系数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有最佳实践来决定什么时候应该使用XML建模系统,什么时候应该使用关系数据库建模(我知道你可以在数据库中存储XML,但是有一个巨大的区别使用规范化的数据库表建模系统并使用XML-Schema建模系统)。为了具体性,我们假设你在健身房锻炼模型。 台式压力机实际上是一个锻炼家庭,而不是一个单一的练习。你可以躺在长凳上,或者一个球。你可以强迫你回去或允许作弊。您可以使用哑铃,杠铃,电缆或通用机器。如果你使用哑铃,你可以交替武器或同时推。您可以有倾斜,下降或平坦的表面。我的想法是,由于复杂性(和可能的复杂性,我还没有想到),这将最好使用XML建模。这是一个很好的评估吗?还应考虑其他哪些重要因素?

I am wondering if there are best practices for deciding between when a system should be modeled using XML and when it should be modeled using a relational database (I know you can store XML in a database, but there is an enormous difference between modelling a system using normalized db tables and modelling a system using XML-Schema). For concreteness sake, let's say you were modeling exercises in a gym. The "bench press" is actually a family of exericses, not a single exercise. You can lie down on a bench, or a ball. You can force you're back flat or allow cheating. You can use dumbells, barbells, cables or a universal machine. If you are using dumbells you can alternate arms or push simultaneously. You can have an inclined, declined or flat surface. My thinking is that due to the complexity (and possible complexity that I have yet to think of) that this would best be modelled using xml. Is this a good assessment? What other important factors should be considered?

附录:当我说XML时,我想到的一种技术是RDF(虽然我不想限制讨论)与在数据库表中实现设计相比,这似乎有利可图。我不知道一些用户对XML的一般反感是否会扩展到RDF(也许这样),但也许这将有助于集中谈话。

Addendum: When I said XML, one of the technologies I had in the back of my mind was RDF (though I did not wish to limit the discussion to that), which would seem to have pros and cons compared to implementing the design in database tables. I'm not sure if the general antipathy some users feel towards XML would extend all the way to RDF (maybe so) but perhaps that will help focus the conversation a little.

推荐答案

您的练习示例可以以多种方式建模。对于某些经验和智慧,当xml的层次模型显示出优势时,请阅读Ron Burrett:

Your exercise example could be modeled in many ways. For some experience and wisdom on the question of when xml's hierarchical model shows an advantage, read Ron Burrett:

http://www.rpbourret.com/xml/XMLAndDatabases.htm

有当要存储的内容是半结构化时,本地xml DB显示RDB的巨大优势的情况。 @Smout,将客户 - 合同 - 客户数据存储在RDB中更容易和更安全 - 但是当您还必须存储合同时会发生什么?

There are cases where native xml DBs show enormous advantages of RDBs when the content to be stored is semi-structured. @Smout, es it is easier and safer to store the customer-contract-customer data in an RDB -- but what happens when you also have to store the contract?

RDF与关系模型和xml模型形成对比。 RDF是为一个开放世界的数据表示而设计的,其中你永远不能确定你知道在你必须计算的时候的一切。 RDF可以用xml表示的事实是方便的,但是偶然的。它还有其他表达式。

RDF contrasts with both relational models and with xml models. RDF is designed for an "open-world" representation of data in which you can never be sure that you know everything at the time you have to compute. The fact that RDF can be expressed in xml is convenient, but incidental. It has other expressions as well.

在EMC XML Technologies和MarkLogic也做一些阅读。

Do some reading at EMC XML Technologies and MarkLogic as well.

这篇关于建模:Xml vs.关系数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆