>> While i agree that it is rare that an application should do DDL, it is not taboo.<<
Yes, it is. This is foundations, not a matter of personal style.
For example, if a file is to be imported for known columns, but the order of the columns in the file is not known, an application can CREATE a TABLE on the fly to hold the imported data in original form and then have a PROCEDURE access the appropriate data. <<
I would think that you might want to use an ETL tool for that kind of
thing. And that would be done **outside** of the schema. Ordering is
a physical problem, not a data model or logical problem. Likewise,
converting units from SI to English, Dewey Decimal to LOC, etc. are
physical format problems. Why do you think otherwise?
If you really want to help, you should first answer the question(s), and then mention that it is unlikely that an application should do DDL, both from an efficiency and from a data design standpoint. <<
After teaching SQL for 20+ years and writing six books on SQL, I
disagree. When someone has missed the principles, lecture them about
those principles. Most of the time, ifyou can see what their mental
model was and why they made an error, then you can REALLY help them.
There is a literature on "How we know what is not so" in critical
thinking. Most sane people work from a metnal model and do not behave
at random.
I then suggest a better answer, based on the principles. My "Zen
Master with a stick approach" bothers the current generation of whining
kids with a sense of entitlement. But I have warched this lack of
professionalism kill people (Google some of my posting about a flawed
African medical relief database on other newsgroups; the database was
designed for the front end form screens wthout a real data model).
Bad programmers kill people.
If you give someone a Kludge first, that is all they will hear and that
is what they will do from that time forward. If this was a fine
furniture newsgroup and someone asked for the best kind of rocks to use
for pounding screws into wood, you can answer "Granite!! Bigger chunks
work faster!" or you can answer "NO! Let me tell you about screws.
They can be more complicated than rocks, but they are worth the effort
and the learning curve. etc."