CS/SE education topic: WHY do so many books/instructors have students program a student DB/gradebook/etc. as an early exercise, esp in OOP?
Basically domain-specific code is never the right solution for that type of problem; a standard DB backend or general data model is.
-
-
Also, most "databases" used in both education and industry are simple key-value stores. Those do NOT need a RDBMS, but a good filesystem.
-
There are lots of good reasons to want searchable tables, complex atomic transactions, etc.
-
Prob. I had in mind was more abt using lang-level objects to represent records when you really want/need access layer to persistent records.
-
And despite OO's allure/promises, there's actually no way to switch out one for the other while keeping the same class interfaces.
-
Because it's a fundamental mismatch of what your objects/object-lifetimes are.
-
I suspect that while you are right, students learning oo are unlikely to be equipped to also learn sql and Schema design. It's just a bad project
-
Oh I agree. I'm not advocating starting them on hard topics. Rather finding easy learning examples that do make sense.
-
There are lots of obvious math examples if you're willing to assume students know a little math or are willing to learn.
- 1 more reply
New conversation -
-
-
Pedagogically, I'm not sure that's relevant? Teaching use of standard tools is important, but it's a good motivating example for concepts.
-
My assertion (maybe not 100% right but close I think) is that these are wrong motivating examples for the concepts.
-
For example a C++ class "Student" is almost surely wrong, even if you decided to keep the interface and swap in a db-backed implementation.
-
It's wrong because the object lifetime is wrong unless you plan to copy the whole db into your process and keep it there.
-
Instead you probably want some sort of object to represent a query result or changes to go into a transaction. Not to represent the record.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.