Level: Intermediate
Ted Neward ([email protected]), Principal, Neward & Associates
20 Mar 2007
It has been said that the database wars are over and the relational database won. However, anyone who believes this state of affairs has led to peace and prosperity among programmers hasn't tried using a relational database to back Java™ objects lately. Popular author and lecturer Ted Neward launches an in-depth, multipart series introducing db4o, an object-oriented alternative to today's relational databases.
By the time I came of age as a programmer, it seemed the database wars were pretty much over. Oracle and other relational database vendors had made a convincing argument for the relational model and its standardized query language, SQL. In fact, I can safely say that I've never used any of the relational database's immediate ancestors, such as IMS or the ubiquitous flat file, for long-term storage. Client/server, it seemed, was here to stay.
And then one day, I discovered C++. And with that, like so many others who found this particular language at this particular time, my world view was forever changed. I made the shift from a programming model based on functions and data to one based on objects. Suddenly developers weren't talking anymore about building elegant data structures and "information hiding"; instead we were excited about polymorphism, encapsulation, and inheritance -- a whole new set of buzzwords.
![](/upimg/allimg/070327/1735340.gif) |
About this series Information storage and retrieval has been nearly synonymous with RDBMS for about a decade now, but recently that has begun to change. Java developers in particular are frustrated with the so-called object-relational impedance mismatch, and impatient with the solutions that attempt to resolve it. This, along with the emergence of a viable alternative, has led to a renaissance of interest in object persistence and retrieval. This series is a working introduction to db4o, an open source database that leverages today's object-oriented languages, systems, and mindset. See the db4o home page to download db4o now; you'll need it to follow the examples. |
|
Likewise, it suddenly seemed that the relational database was over-the-hill in favor of a new kind of database, the object database. When married with an object-oriented language like C++ (or its upstart cousin, Java programming), the OODBMS would herald a utopia in programming.
Except it didn't quite work out that way. The OODBMS peaked around the late '90s and then slid back into relative obscurity. What had been exciting and glamorous became obscure and proprietary. Round 2 of the database wars was over, and once again the relational database had won. (This even despite most RDBMS vendors embracing objects in one fashion or another.)
The only problem with this scenario is that some of the reasons developers were excited about the OODBMS never died, as evidenced by the emergence of db4o.
Of objects and relations
The object-relational impedance mismatch is a subject best suited to an academic lecture, but it boils down to the fact that an object system takes a different view than a relational system does of how entities interact with each other. On the surface, an object system and a relational system seem well-suited, but a deeper investigation reveals some fundamental differences between them.
For starters, objects have an implicit sense of identity (denoted by the hidden/implicit
共6页: 上一页 1 [2] [3] [4] [5] [6] 下一页