Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!dlogics!dsa From: dsa@dlogics.COM (David Angulo) Newsgroups: comp.object Subject: Re: Object-Oriented COBOL? Summary: Good idea but I haven't figured out how Message-ID: <679@dlogics.COM> Date: 8 Nov 90 17:49:33 GMT References: <0B010001.xkabkz@bse.com> Distribution: comp Organization: Datalogics Inc., Chicago Lines: 21 In article , cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: > By the way, a personal query of mine is whether, in using a relational DBMS > within an object-oriented effort, it makes better sense to represent the > relational DBMS itself as an object (containing Relations, Tuples, Attributes, > etc.) or make direct use of the relational DBMS and represent the entities and > relationships as objects. Any ideas? I originally thought that this would be the way to design the classes - have a class interface to the SQL/relational database. The problem with this is that you can't use embedded SQL code with this approach because you must hard code the table name. I suppose you could use dynamic SQL but.... It's easier to just have each object implement methods to access the database. For example, Class::insert(), Class::modify(), .... The problems with this is that you end up making a LOT of these for specific accessing needs (see my article of yesterday for more info). -- David S. Angulo (312) 266-3134 Datalogics Internet: dsa@dlogics.com 441 W. Huron UUCP: ..!uunet!dlogics!dsa Chicago, Il. 60610 FAX: (312) 266-4473