Subj : Re: Change Patterns (was: Polymorphism sucks) To : comp.programming,comp.object From : Ed Prochak Date : Wed Aug 10 2005 12:45 pm Robert Maas, see http://tinyurl.com/uh3t wrote: > > From: "topmind" > > the closest approach to the Ultimate Business Rule Machine that I > > have seen is a RDBMS. > > About ten or so years ago I read a book about SQL and thereby got a > general idea of it, basically COBOL-style fixed-length fixed-format > records stored in huge arrays on disk. I decided it was too limiting > for my uses which typically had hugely variable length data fields. Your understanding of RELATIONAL Databases is really off track. It looks like flat files in only the shallowest view. One big feature of an RDBMS is to handle the data storage for you. You don't know or care whether the fields are fixed lenght or not. But the key feature of a RDBMS is treating data as sets. Until you understand that fundamental concept of Relational databases, you will not use them properly. > > My only exposure to a real live RDBMS was within the past year, when > our Java classes had us play with one, MicroSoft ACCESS on the campus > machine and CloudScape/Derby on my Linux laptop that one of my Java > instructors gave to me in lieu of posting it for free on eBay. ACCESS internally is a Network model database with an SQL front end. I haven't used or read about CloudScape/Derby. > > Do you know of any really good text/html document online which would > give me a more complete idea of what such a thingy might be used for > beyond storing the fixed-length fixed-format records that I've seen it > used with? I need to get a better "feel" for what good it is. For all > of my applications to-date, s-expressions seem better, since they can > handle arbitrary-length fields within arbitrary-organzed records, and > can easily nest records via pointers of various kinds (direct nesting > of lists within single s-expression, cross-references to named globals, > cross-references to named tags within single structure, external > references by filename or URL, etc. Or have you written anything like > that yourself? how do you handle data integrity? e.g., how would you guarantee that a stock number exists before allowing it to be used on a shipping order. What stops an application program not written by you from adding that record to the order file? How to you deal with multiple users accessing the same rocords at the same time? how to you guarantee one user doesn't interfere with another? A decent DBMS does a lot of this (data integrity and tranaction integrity) for you. > > > I wish they would release dynamic RDBMS. The static Oracle model is a > > bit limiting. > > Would I be correct to guess that both MicroSoft ACCESS and > CloudScape/Derby are Oracle model, and that I've never seen any dynamic > RDBMS? Do you know of any online document (usascii/html) that tells the > difference, or if not then could you summarize the difference? I have no idea what he means by dynamic either. Or even what he means by "static Oracle model". FYI, the ACCESS internal model is Network, not Relational. ORACLE is Relational (with some OO and other features). > > > only once out of several dozens, perhaps hundreds, of projects I > > worked on did we have to go back to flat files. > > Would hierarchial lists as in s-expressions (on disk) and nested linked > lists (in main memory) count as "flat files" per your usage of the > terms? In all my experience I never felt the need to use RDBMS instead > of just sticking with either s-expressions or HTML whenever I needed > something logically non-flat. Of course I don't have access to any > RDBMS on my Unix shell account nor on my Macintosh, only on my Linux > laptop and the whole machine runs a lot slower when the CloudScape > server is running, so I am disinclined to make any serious use of it. You might be surprised by the things you could do with a real RDBMS. > > So I take it you've always had RDBMS available whereever you worked in > all your years, unlike me where I never had any RDBMS available where I > ever worked. Personally I started on a network model DBMS called IMAGE 2000 on a 16bit minicomputer. > Actually the main usage I can see for RDBMS is data > synchronization between processes that are running in different virtual > machines but all talking to the same RDBMS/SQL/ODBC server with access > to shared databases. I wanted to make sure two different programs > didn't try to increment the master sequence number at the same time, so > I set up a "Lock" database whereby any process can ask the RDBMS to add > a Lock record with a certain value as the unique key, and if successful > then the process knows that no other process can have that same key at > the same time, hence that one process has unique access to whatever > activity is associated with that unique key, in this case right to > compute the maximum plus one of sequence numbers within another table > and generate a new record with that guaranteed new sequence number. A locking model is used in some RDBMS's you are basically rewriting stuff that ORACLE Sequel Server, DB2, UNIFY, Informix, and others include. Also, controlling access by locks is inherently unscalable. ONLY ONE process has access, making all others wait. > Since I was on Linux, I might have used standard Unix lock files > instead, but using a lock record in a database was easier to program > without making any mistake, and also since I was developing on Linux > but then porting to Windows, and I had no idea how to do lock files on > Windows, it made sense to do it once with the database lock table > instead of trying to do it separately in system dependent manner for > each of Linux and Windows. commercial DBMS's have solved the problem on many platforms/OS's. > > > I have never seen a software engineering book that looks carefully at > > change patterns and their probabilities before offering solutions. > > They skip a big step and start with a lot of bad or unproven givens. > > It sounds like *you* should write that book. Perhaps start with an > informal "book" as a Web site to get feedback from people like myself > who might appreciate it and people like the unknown person you were > responding to (you didn't attribute the text you quoted, and the new > Google Groups doesn't provide any way to see where in the thread tree > your article is located in order to back up in the tree to find what > article you were replying to) who really seems to need your advice. > > Why you? Because you really deeply understand and appreciate the need > for such a book and the comparitive shoddyness of all currently > existing books you've seen before. Only somebody who really understands > the need for something new can invent it. (As I invented linked frames > of information online in 1970-71 after having seen harccopy "programmed > texts" and the AutoTutor machine a few years previously, and Richard > Stallman got the same idea about the same time, by coincidence both of > us implementing our ideas within the framework of an existing text > editor, me using SOS (Son Of Stopgap), RMS using EMACS/TECO.) Finally > more than ten years later Apple converted our ideas into HyperCard, and > then about ten years after that somebody invented HTML and the Web > using those same ideas. I'm impressed. Maybe I'm speaking to a master who has moved beyond the need for a DBMS. But for us mortals, it is a very useful tool. Ed .