描述键/值数据存储的 UML 方法?

发布于 2024-08-04 20:50:58 字数 95 浏览 3 评论 0原文

我目前正在使用 berkeleyDB 编写数据库文档。我想绘制描述数据存储的键和值的 UML 图。是否有一种“标准”方法来使用 UML 来描述这种数据库?

谢谢

I'm currently writing the documentation for a database using berkeleyDB. I'd like to draw UML diagram describing the keys and the values of the datastores. Is there a 'standard' way to describe this kind of database using UML ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

柳若烟 2024-08-11 20:50:58

没有。只是一个具有两个属性的类图。一种用于键,一种用于值。请记住,UML 设计仅用于文档目的,尽管某些 UML 编辑器能够根据您的模型生成代码。

当然,您也可以使用活动模型来显示此表如何与其他表交互。或者一个用例图,它显示了参与者如何处理数据。

不过,还有更多种类的图表。您需要哪一个取决于您想要讲述您的项目的内容。

Nope. Just a class diagram with two properties. One for the key, one for the value. Do keep in mind that an UML design is meant for documentation purposes only, although some UML editors are capable of generating code based upon your model.

Of course, you could also use an Activity model to show how this table interacts with others. Or a Use Case diagram which shows how the data is handled by the actors.

There are more kinds of diagrams, though. The one you need depends on what you want to tell about your project.

南巷近海 2024-08-11 20:50:58

执行此操作的正确 MDA 方法是使用类或对象图,为每个表使用类或对象,为每个数据库字段添加属性。定义 PK、FK、Unique、Index 的构造型,并将它们适当地附加到每个字段。通过关联连接每个 Table 对象。根据您使用的工具,您可能可以将关联的每一端附加到特定字段。

The proper MDA way to do this is to use a Class or Object diagram, use a Class or Object for each table, add a property for each database field. Define Stereotypes for PK, FK, Unique, Index and attach them to each field as appropriate. Join each Table object with associations. Depending on the tool you use you can probably attach each end of the associations to specific fields.

动次打次papapa 2024-08-11 20:50:58

我更赞成更严格地遵守 NoSQL 数据库的结构和行为。因此,Base 的键值模型虽然与 MongoDB 或 DynamoDB 略有不同,但它会减少对必须实施该模型的人员的偏见。例如,在 DynamoDB 中,我将有一个包含分区和排序键以及不太相关的属性的主表,并将符合二级索引条件的属性放在单独的表中。

I am more in favour of a stricter adherence to the NoSQL database’s structure and behaviour. Thus a key value model for Base would differ albeit slightly from MongoDB or from DynamoDB but it would reduce the bias towards the people who have to implement the model. E.g. in DynamoDB I would have a main table with the partition and sort key as well as less relevant attributes and put the attributes eligible for secondary indexes in separate tables.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文