关系数据库管理系统与对象数据库 [英] Relational database management system vs object database

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

问题描述

我是一所大学的研究助理.我们正在重组我们的软件架构主题,希望能够现代化",并解决我们在过去学期中发现的一些教学和协作学习问题.

I'm a research assistant for a university. We're retooling our Software Architecture subject, hoping to "modernize", and address some of the teaching and collaborative learning issues we've discovered in past semesters.

要求学生使用 Eclipse 快速构建其架构系统的原型.

Students are asked to rapidly build a prototype of their architectured system using Eclipse.

为了持久性,我们引导学生使用 HSqlDb.

For persistence, we've guided students to HSqlDb.

上学期我们收到了大量反馈,称编写数据访问层和映射到 OO 花费了大量时间.这种管道工作可以更好地用于更相关的事情,例如扩展、端到端性能或满足更多场景.

Last semester we received significant feedback that writing the Data Access Layer and mapping to OO has taken alot of time. This plumbing work could be better spent on more relevant things, like scaling, end-to-end perf or satisfying more scenarios.

在现实世界的制作中,我会选择 ORM 技术,例如 Hibernate,但该主题已经太复杂了,无法教授另一种技术(恕我直言,Hibernate 是一个需要学习的庞大技术).

In a real-world production, I'd pick an ORM tech, like Hibernate, but the subject is already too complex to teach yet another technology (and Hibernate is a massive one to learn for students IMHO).

那么,我向 SO 社区提出的问题:

So, my questions to the SO community:

  • 我们是否应该考虑给学生一个面向对象的数据库(如果它们仍然存在)?这可以节省 ORM 和管道的时间
  • 我们是否应该坚持使用 RDBMS 并告诉学生推出自己的 ORM?
  • 我们是否应该向学生介绍轻量级、简单的 ORM?

请记住,这不是现实世界,但我们希望尽可能多地教授现实世界的技能.教授 ORM 不如让学生快速构建满足场景的系统原型重要.

Remember, this isn't real world, but we'd like to teach real world skills as much as possible. Teaching ORM not as important as getting students to rapidly prototype a system that satisfies the scenarios.

我本质上是一名 C# 开发人员,但学生们在进入该主题时才熟悉 Java.

I'm a C# dev at heart but the students are only familiar with Java when they come into the subject.

推荐答案

我必须完全不同意在教育环境中使用 ORM.在跑步之前,您需要先学会走路,而使用 ORM 消除了学习过程中关于在应用程序中使用关系数据库的一个非常重要的步骤.您应该坚持使用一个非常轻量级的数据访问框架——一个要求学生编写自己的 SQL 并且(充其量)不允许将此代码范围绑定到 UI 或(至少)不需要的

I have to wholeheartedly disagree with the use of ORM in an educational environment. You need to be able to walk before you run, and utilizing ORM eliminates a very important step in the learning process regarding using a relational database in an application. You should stick to a VERY lightweight data access framework--one that requires students to write their own SQL and (at best) doesn't allow this scope of the code to be tied to the UI or (at least) doesn't require it.

诚然,我对 Java 世界并不熟悉,因为它与实际的企业开发有关,但我意识到(有点不情愿)这是教育系统中的环境.虽然我相信学生应该接触 .NET,但这是另一次争论 ;) 无论如何,我很确定有某种框架可以满足这一点.

I am admittedly unfamiliar with the Java world as it relates to actual enterprise development, but I realize (somewhat begrudgingly) that it's THE environment in the educational system. While I believe that students should be exposed to .NET, that's an argument for another time ;) In any even, I'm quite certain that there's some sort of framework out there that satisfies this.

我愿意打赌有一些东西可以提供一些代码生成功能.在我以前的工作中,我们只使用 .NET 数据库库来(相对)从数据库中读取数据.我们没有使用任何存储库或更改跟踪技术,而是推出了我们自己的.SQL 命令是手工编写的,但该框架仍然提供类型安全和丰富的设计器支持.我的观点是两者都是可能的.我建议在 Java 中找到类似的东西,要求学生手工编写其中一个或两个适配器以了解其中的内容,然后让代码生成器根据他们的 SQL 执行其他繁琐"的工作声明.

I'd be willing to wager that there is something out there that provides some code generation functionality. At my old job, we only made use of the .NET database libraries to the point of (relatively) low-level reading of the data from the database. We didn't use any of the repositories or change-tracking technologies, but instead rolled our own. SQL commands were written by hand, but the framework still provided type safety and rich designer support. My point here is that both are possible. I would suggest finding something similar to this in Java, requiring the students to hand-code one or two of these adapters to gain an understanding of what goes into them, then have the code generator do the other "gruntwork" plumbing based on their SQL statements.

不要使用任何 SQL 生成.在让计算机为您完成之前,您必须能够编写 SQL.当您使用 ORM 做一些您在 SQL 中不知道如何做的事情时,您就失去了对数据库模型的控制,而他们需要了解这一点.

Don't use any SQL generation. You MUST be able to write the SQL before you let the computer do it for you. The second you use ORM to do something that you don't know how to do in SQL is the second that you've lost control of your database model, and they need to understand that.

这篇关于关系数据库管理系统与对象数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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