使用 interbase 设计数据库表的最佳方法?

发布于 2024-07-23 07:15:41 字数 238 浏览 2 评论 0原文

我即将开始以适当的方式重做公司数据库。 我们当前的数据库很混乱,几乎没有文档。 我想知道人们在设计 Interbase 数据库时建议使用什么? 是否有某种好的可视化模式设计器可以生成 SQL? 全部手工完成是不是更好?

基本上,人们在设计和记录数据库时通常采取哪些步骤? 如果重要的话,我打算使用 Hibernate 作为数据库的 ORM。 (Interbase 的具体提示也将不胜感激)。

谢谢!

I am about to start redoing a company database in a proper fashion. Our current database is a mess and has little to no documentation. I was wondering what people recommend to use when designing an Interbase database? Is there some sort of good visual schema designer that will generate the SQL? Is it better to do it all by hand?

Basically, what are the steps people usually take when designing and documenting a database? If it matters, I intend to use Hibernate as an ORM for the database. (Specific tips with Interbase would be appreciated as well).

thanks!

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

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

发布评论

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

评论(2

讽刺将军 2024-07-30 07:15:41

通常,我使用文本编辑器。 有时,我会使用 Database Workbench。 上次我听说,Embarcadero 打算将 InterBase 支持添加到他们的一些数据库建模工具中,但我不知道是否已经发布。

Usually, I use a text editor. Occasionally, I use Database Workbench. Last I heard, Embarcadero was going to add InterBase support to some of their database modeling tools, but I don't know if that has shipped yet.

雪若未夕 2024-07-30 07:15:41

如果这是一个最近创建的全新数据库应用程序,并且在业务中不被依赖,那么我会说全力推进您的重写/新数据库。 然而,我怀疑您正在处理一个已经存在了几年并且被大量使用的数据库。

如果我对数据库已有几年历史的看法是正确的,我强烈建议不要从头开始。 几乎任何已经存在了几年的生产数据库都会“混乱”。 这通常是因为现实世界对程序的要求通常要求解决方案有些混乱。 几年后,您的全新数据库(如果您走这条路)也将如此。

以下是我不会从头开始重新创建生产数据库的一些原因:

  • 实时数据库包含多年的交易和非常有价值的客户数据。 将这些数据转移到完全不同的数据库结构中将非常困难。 相信我,即使公司现在告诉你他们不需要访问这些旧数据,他们也会的。
  • 许多业务规则可能已经以默认值、触发器、存储过程、甚至列的数据类型的形式内置到数据库结构中,如果不仔细检查这些规则并记录它们,您可能会将它们排除在外。当人们开始使用系统并发现规则没有正确应用时,
  • 您可能会在新数据库设计中犯错误,或者后来意识到结构需要更改以适应新的数据库, 并花费大量时间调试和添加这些内容新功能。 如果您一直在对当前数据库进行更改并从中学习,那么未来的更改将变得更容易、更直观。

这是我推荐的方法:

  • 了解并记录当前的数据库,这将使您真正很好地了解业务中的信息流。
  • 当您看到看起来糟糕或混乱的设计时,请仔细查看。 您可能是对的,并看到了变革的潜力,或者您可能会发现出于性能或其他原因而进行了权衡,您可以从中学习。
  • 对数据库结构进行增量改进,确保更新文档,更改依赖于这些区域的程序(或者与您的程序员合作,如果不是您的话)。

我知道这似乎是一个很长的路要走,但是从一个已经维护和创建数据库 12 年的人那里得到的答案是——你当前的数据库可能很混乱,因为现实世界的需求很混乱。

If this is a brand new database app that has recently been created and is not being relied on in the business, then I say full steam ahead with your re-write / new database. I suspect however that you are dealing with a database that has been around for a few years and is heavily used.

If I am right about the database being a few years old, I strongly recommend against starting from scratch. Almost any production database that has been around a few years will be "messy". This is usually because the real world requirements for programs usually demand the solutions to be somewhat messy. This will be true of your brand new database (should you go this route) a few years from now as well.

Here are some reasons I would not recreate a production database from scratch:

  • The live database contains years worth of transactions and customer data that is very valuable. It will be very difficult to transfer this data into a completely different database structure. Believe me, even if the company tells you now they will not need to access this old data, they will.
  • Many business rules have probably been built into the database structure, in the form of defaults, triggers, stored procedures, even the data types of the columns, and without examining these very carefully and documenting them, you are likely to leave them out of your new database and spend much time debugging and adding these in when people start using the system and discover the rules are not being applier properly
  • You are liable to make mistakes in your new database design, or realise later that the structure needs to change to accommodate a new feature. If you have been making changes to your current database, and learning from that, future changes become easier and more intuitive.

Here is the approach I recommend:

  • Understand and document the current database, which will give you a really good understanding of the information flows in your business.
  • When you see what appears to be bad or messy design, look at it carefully. You may be right, and see potential for change, or you might find a trade off was made for performance or other reasons, and you can learn from this.
  • Make incremental improvements to the database structure, being sure to update documentation, alter the programs that rely on those areas (or work with your programmer if that isn't you).

I know this seems like a very long way around, but take it from someone who has been maintaining and creating databases for 12 years now - your current database is probably messy because the real-world requirements are messy.

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