Re: Informix & Persistence
Posted in 1996
mailgw!hpx400!Trevisol_Roberto/bbb_cak@srv3-poa.nutecnet.com.br wrote: > > Item Subject: Texto da Mensagem > Hi, > > Is there anyone using (or planning to) Informix Online Dynamic Server > with Persistence? Any comments or thoughts would be great. > > Our company is developing Object Oriented apps. So, we're looking for a > way of encapsulating database access through classes. > > Roberto Trevisol > rtrevisol@bamerindus.com.br Persistance of an object implies storing both the data elements and the methods of the object. (Of course no one really wants to store code unless its JAVA ;-)[Iced coffee] First, I am assuming you want to use this data within the relational database and not just store it as a blob. Depending on your OO Language, you can create a method like StoreSelf[]; In this method, you would basically call a set of common libraries passing the table which matches your object, or tables matching your object class hierarchy. The common libraries would contain the code to do dynamic SQL. So you would end up passing the name of the object, the table name, and the address of the data structure to be saved. An example would be if you wanted to store an object called student. The class student is a subclass of people, so you would call your store library twice. Once to store people, once to store student. I realize that this is somewhat abstract, thus a poor example. But hey, you got what you paid for. -Mikey