| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Two meanings of "data structures"
I'll give my $0.02: my feeling is that many of the "traditional" data
structures were primarily due to the poverty of languages and data
management tools and techniques available at the time. Linked list is
an implementation of a list, designed for a programming environment
philosophically close to C; I've never used one in Java. Fortunately
languages have evolved enough in most cases for us to think about Sets
and Lists rather than implementations.
In Java I tend to use Map and Set a lot, although using Map is an exercise in frustration because I long for a type-safe Relation type generator, something on the order of the new generics: for example, I could define variables:
Relation<int id, String name, Address address> emps = ...; emps.add({<3, "Fred", new Address("whatever")>}); Address fredsAddr = emps.{<name="Fred">};
and then do some meaningful operations, rather than writing endless loops through impoverished data structures, and designing various classes to act as keys into Maps and then keeping the various maps in sync. All that begs for relations.
This is not to say that the "primitive structures" have no place; I just feel that in most of the programming I do, relations would trump them all.
As far as "drop-in" goes, unless you're talking about dropping in new types (domains) and then using them in relations, it's not really applicable. Relation isn't just a type but a type generator, and it has no sense of encapsulation. However, if I recall Date does address the ideas of tuple and relation type in Intro-DB Systems, but since it weighs 28.37 pounds, I don't have it with me...
![]() |
![]() |