业务对象又从何入手?

发布于 2024-08-23 00:28:58 字数 79 浏览 6 评论 0原文

我正在创建一个新数据库并将旧数据移入其中。我想为新系统创建业务对象并查看旧系统,看起来这些对象基于旧数据库中的表。这是创建业务对象的正确方法吗?

I am in the process of creating a new database and moving old data into it. I would like to create Business Objects for the new system and looking at the old system, it looks like the objects are based on the tables in the old database. Is this the correct way to create business objects?

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

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

发布评论

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

评论(3

撑一把青伞 2024-08-30 00:28:58

正确规范化的数据库与正确的面向对象设计完全不同。数据库的需求与软件应用程序的需求非常不同。

您应该根据应用程序的使用方式要求来设计您的应用程序。应用程序应该执行哪些操作?需要哪些对象来支持这些需求?他们之间有什么天然的关系?

单个业务对象可以存储在十几个数据库表中,或者单个表可以存储十几个对象的数据。这实际上取决于您正在使用的系统的具体情况。

A properly normalized database will look nothing like a proper object-oriented design. The needs of a database are very different from the needs of a software application.

You should design your application according to the requirements for how it is to be used. What sorts of things is the application supposed to do? What objects will be required to support those needs? And what are the natural relationships between them?

A single business object may be stored across a dozen database tables, or a single table may store data for a dozen objects. It really depends on the specifics of the system you are working with.

初见 2024-08-30 00:28:58

如果旧数据库被正确规范化,您会发现许多表确实对应于业务对象。但是...

您对业务对象的构成的决定不应仅限于此。你需要研究场景并决定业务对什么感兴趣。你对业务的理解将是主要决定因素。

If the old database was properly normalized you will find that many tables do correspond to business objects. However...

Your decision about what constitutes a business object should not be restricted to that. You need to study the scenario and decide what the business is interested in. You understanding of the business will be the main determinator.

逐鹿 2024-08-30 00:28:58

这里没有太多细节,但有一个建议......

从新系统必须做的“什么”开始。 [新]系统应该支持哪些[新]功能。需要什么数据。您的新系统很可能应该满足新的要求或以不同和/或更好的方式满足新的要求。

在您对事物和需求有了相当清晰的了解之后,请跟进“如何”;如何解决这些“是什么”。做一些业务对象建模。

在业务对象建模之后,您可以开始讨论另一个“如何”,即数据库设计。然后就可以做数据迁移的事情了。

遵循这一点并不意味着完全忘记旧的系统/数据库。如果您认为可以从旧方法中获得任何好的或有价值的东西,请接受它并尝试尽可能地将其合并/整合到新方法中。

Without much details here is one suggestion...

Start with the "what" the new system has to do. What [new] functions should the [new] system support. What data is required. Very likely your new system should address new requirements or address new requirements in a different and/or better way.

After you have a fairly clear picture of things and requirement needs, follow up with the "how"; how to address those "whats". Do some business objects modeling.

After the business objects modeling you can get down to another "how", the database design. Then you can do the data migration thing.

Following this does not mean completely forgetting about the old system/database. If there's anything good or valuable you think you can take from the old ways, take it and try to incorporate/integrate that into the new ways as best as you can.

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