Re: creating tables at runtime

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Joe Celko (jcelko212_at_earthlink.net)
Date: 05/10/04


Date: Mon, 10 May 2004 07:50:17 -0700


>> i want to create another table at runtime that has as its columns the
row of the prev table. the number of rows are determined at runtime as
such the columns are determined only at runtime. <<

Your whole approach is completely wrong. Any kludges you have been
given will only lead to trouble within a year. One of the
**fundamental** ideas of RDBMS is that you start with a schema and it
does not change on the fly. If you have to let the users invent tables
on the fly, then you had no logical data model at all!!

You even use names like "num_field"; that is a description of the
physical storage, not a data element name. Likewise "MSP_Number_Fields"
is a description of the phsyical storage, not a data element name. Read
ISO 11179 for the right way to do this.

My guess is that you are using a dynamic table as a COBOL-style WORKxxx
file, the way we did in the 1950's. These were usually tape or disk
files allocated on the fly for sorting or selecting data from a Master
tape for the purpose of a report. They were deallocated at the end of
the program, so we could reuse the tape or disk space.

You probably ought to be doing the report in the front end and not the
database. We use a tiered architecture these days, not the old
monolithic COBOL-style architecture which tied data and code together.

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Generic Device Names and FDR
    ... Use the HCD panels to look or select option 3 and print the OS -> EDT ... An FDR print report showed that the dataset had been properly backed up ... device type the back up tape was created on. ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: Macro to produce a report from a query
    ... and the report opening, I get several boxes asking for "parameter values", ... Find tape number", and another asking for the parameter ... before the query does it's thing.... ... I created both a query and a report that produces the contents of the ...
    (microsoft.public.access.macros)
  • Re: USAF F-16 Instructor Discusses Flying Into MOAs
    ... Well if the FAA has a tape and the pilot doesn't I'd go with the FAA. ... Carona refused to answer any questions from the grand jury, ... One inmate said Taylor told them Chamberlain was a child molester. ... Taylor's report rather than review his own statements, ...
    (rec.aviation.piloting)
  • Re: SCSI tape [more info]
    ... > I tried that on the 29160 adapter. ... > Is it time to file a bug report? ... This is sounding a lot like a problem I ran into with a DDS-2 tape ... This was using an Adaptec 2940 SCSI adapter and the aic7xxx driver. ...
    (Fedora)
  • Re: 911 Operator Chides 5 yr old As His Mother Dies
    ... two *hoax* 911 calls had been received from ... What you're hearing on the tape is the boy's voice amplified, ... the dispatch center (who said that the operator could not hear ... what time it is, find an address, report a barking dog, call ...
    (alt.true-crime)