4 ms·
I'm going to ask these here because I don't know where to ask them. Because HNers are smart. Please don't think this is off-topic! 1) What would a database sys
by igravious 11y ago
I'm going to ask these here because I don't know where to ask them. Because HNers are smart. Please don't think this is off-topic!
1) What would a database system look like that had an advanced type system that could specify user defined data types? Is this what an object-oriented db is? Is this possible with graph databases? Relational databases? Hierarchical databases?
2) What would type reusability look like? Not code reusability, not object reusability, but type reusability. Does this even make sense?
3) Would it be possible for multiple different languages to share a type system?
4) Would it be possible for the one language to have multiple type systems? (Pluggable, modular, if you see what I mean)
Thanks!
- dastbe 11y ago1. disregarding "advanced" because thats subjective, you can think of a new type in a relational database as a table, where instances of that type are rows. 2. assuming by type reusability you mean something like polymorphism, sql affords subtype polymorphism through "disjoint subtyping" which means a single table which tracks multiple sub-tables, with a single entry existing in at most 1 of these sub-tables. sql also offers a limited row polymorphism through select and views. 3. assuming you're talking about all programming languages, yes. that doesn't mean instances of those types are shareable between languages. 4. yes. several interpreted languages have competing and optional type systems.