Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relational database management system vs object database

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.

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

For persistence, we've guided students to HSqlDb.

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.

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, my questions to the SO community:

  • Should we consider giving students an object oriented database (if they still exist)? This saves time on ORM and plumbing
  • Should we stick with RDBMS and tell students to roll their own ORM?
  • Should we point students to a lightweight, simple 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.

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

like image 366
CVertex Avatar asked Sep 21 '26 16:09

CVertex


1 Answers

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.

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.

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.

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.

like image 110
Adam Robinson Avatar answered Sep 24 '26 07:09

Adam Robinson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!