Re: creating tables at runtime
From: Joe Celko (jcelko212_at_earthlink.net)
Date: 05/10/04
- Next message: Joe Celko: "Re: New primary key field"
- Previous message: Zwi2000: "Re: SQL help"
- In reply to: Brina: "creating tables at runtime"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: Joe Celko: "Re: New primary key field"
- Previous message: Zwi2000: "Re: SQL help"
- In reply to: Brina: "creating tables at runtime"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|