From lieber@ccs.neu.edu Wed Nov 4 17:36:11 1998 Received: from stockberg.ccs.neu.edu (lieber@stockberg.ccs.neu.edu [129.10.116.114]) by amber.ccs.neu.edu (8.9.1a/8.9.1) with ESMTP id RAA15119; Wed, 4 Nov 1998 17:36:10 -0500 (EST) Received: (from lieber@localhost) by stockberg.ccs.neu.edu (8.9.1a/8.9.1) id RAA03072; Wed, 4 Nov 1998 17:36:09 -0500 (EST) Date: Wed, 4 Nov 1998 17:36:09 -0500 (EST) From: Karl Lieberherr Message-Id: <199811042236.RAA03072@stockberg.ccs.neu.edu> To: WMcMahon@BFDS.com, lieber@ccs.neu.edu Subject: RE: COM3360 project. Status: R Hi Bill: thank you for the example. Your project looks interesting since you are going to generate Demeter/Java programs from DB schemas. Can you do a little example of what you will generate from which inputs? Before writing a generator it is always good to write an example manually. -- Karl >From WMcMahon@BFDS.com Mon Nov 2 16:15:21 1998 >From: William McMahon >To: "'Karl Lieberherr'" >Subject: RE: COM3360 project. >Date: Mon, 2 Nov 1998 16:03:49 -0500 > >Prof. Lieberherr, > >You wrote: >> To translate a relational schema to a cd is however not easy. >> Why not start with schemas for an oo data base such as Object Store? > >I was planning on using Java's relation DB interface, JDBC. It has a >class "DatabaseMetaData" that provides schema information. Is it not >sufficient to just map tables to classes, columns to class parts, and >then use foreign keys to relate the classes? For example: > > Customer > AccountNo Key > Name > Address > > Parts > PartNo Key > Description > Price > > Orders > OrderNo Key > AccountNo Foreign key of Customer. > > OrderItem > OrderNo Key(1), foreign key of Order. > ItemNo Key(2). > PartNo Foreign of Parts. > Quantity > >// CD for above DB schema. > >// Tables >Customer = AccountNo Name Address >Order = OrderNo Customer // AccountNo has been >translated to Customer. >OrderItem = Order ItemNo Parts Quantity // OrderNo -> >Order, PartNo -> Parts. > >// Columns >AccountNo = int. // Translated from DB data >types. >Name = String. >etc. > > >> Can you be more explicit what the generated programs will have >> as inputs and outputs. > >The generated programs will have an interactive GUI. The details of >which will be based on the .cd and .beh files generated. Exactly what >is generated will depend on the DB schema and any options that are >specified. Options will include which tables to generate code for. > >For example, a simple program just to maintain customer information >would be a single window with a labeled text entry fields for each >column in that table and a few buttons for various operations like, >select, update, cancel, and quit. The user could for example enter the >account number, press the select button, change that customer's address, >and then press the update button. Of course, something like a >full-blown order entry system would get a lot more complicated and >involve multiple windows, but the basic idea would be then same. > >I know this is somewhat sketchy, but I haven't completely thought >everything through. I am still working with kind of a gut feel, based >on what I have learned in class and my experience with databases and >GUI. My main motivation is that I can see a real use for this kind of >tool. If you think I'm on the right track, I can put together a more >detailed overview and send it to you. > >Thanks, >--Bill > >-----Original Message----- >From: Karl Lieberherr [mailto:lieber@ccs.neu.edu] >Sent: Saturday, October 31, 1998 10:59 PM >To: William McMahon; lieber@ccs.neu.edu >Cc: wjmcmaho@ccs.neu.edu >Subject: Re: COM3360 project. > > >Hi Bill: > >Generating code from db schemes is a good idea. >Generating adaptive programs from db schemes is a good idea. > (Demeter/Java generates the Print etc. visitors as adaptive programs.) > >To translate a relational schema to a cd is however not easy. >Why not start with schemas for an oo data base such as Object Store? > >Can you be more explicit what the generated programs will have >as inputs and outputs. > >-- Karl > >>From WMcMahon@BFDS.com Fri Oct 30 12:17:35 1998 >>From: William McMahon >>To: "'Karl Lieberherr'" >>Cc: "'Me @ NU'" >>Subject: COM3360 project. >>Date: Fri, 30 Oct 1998 12:06:08 -0500 >> >>Prof. Lieberherr, >> >>For my project, I would like to develop a (prototype) tool that >>automatically generates GUI data base query and maintenance programs >>from db schemes. Or, rather it would generate Demeter/Java .cd and >.beh >>files, which would in turn generated the programs. The basic idea >would >>be to couple relational data base schemes (translated to class >>dictionaries) with GUI screen components (java.awt) and data base >>operations (select, insert, and update), in a structure-shy way. >> >>While there are many commercially available tools that generate DB >GUIs, >>my experience is that they are either impossible to customize or >>cumbersome to use. It seems to me that a tool based on Demeter/Java >>could be almost completely automatic (for a first approximation) and, >>more importantly, that result could then be easily customized. >> >>I realize that this project could grow quite large and complex, but I >>see that as opportunity to test the evolutionary nature of Demeter. My >>plan is to start small and see how far I can get by the end of the >term. >> >>Of course, any input you could give would be most welcome. Thanks. >> >>--Bill >> >