> Imagine a database that is only accessed by a server application.
(Sorry for being slightly off-topic.
I am trying to initiate a c.d.theory glossary.)
This effectively reduces the meaning of the word 'database' to
'deluxe filesystem'. No problem, many use the word in that sense.
The implication it is that part of the server application may be
busy taking care of contraints which would have to be guarded by the
dbms if there would be other applications. Typically, developers
*will* implement some of the more complicated contraints in
the server application. This severely limits the chance of the
data ever being shared. 'Import' and 'export' facilities
become crucial to the success of the application.
> This
> application provides the ability for admin users to create templates
[quoted text clipped - 11 lines]
> There are two approaches that come to my mind:
> Solution 1. Header table and Value Pairs
[snip casting solution]
To me it looks as if you are trying to implement
a generic, table driven data-capture gui in front
of another, more specific datacollection, so the
casting doesn't really surprise me.
> Solution 2. Header table and Dynamic Table Creation
[snip dynamic schema solution]
> In this solution we could end up with many tables, yet we are using
> the storage facilities of the RDBMS better. Also we are allowing the
> schema to dynamically change.
>
> From a practical and theoretical point of view, which of these
> approaches is better?
Practical: I've seen both. The dynamic schema approach seems to
fit big workflow applications. I did not see recent examples of
the casting approach for big applications, so maybe it doesn't
scale as well. The dynamic schema approach requires thorough
knowledge of the specific dbms.
Theoretical: I prefer programming languages for programming
instead of tables.
> ... Is there another way I haven't thought of?
I don't know.
Just my 2 Eurocents.
Laconic2 - 17 Apr 2004 15:15 GMT
> The implication it is that part of the server application may be
> busy taking care of contraints which would have to be guarded by the
[quoted text clipped - 3 lines]
> data ever being shared. 'Import' and 'export' facilities
> become crucial to the success of the application.
Agreed. Let me add my two US cents.
Why does the above severely limit the chance of the data ever being shared?
I think it's because constraints that are buried deep in the code are often
separated from the data thus produced. Thus, if the writers of some data
adhere to a contstraint that is unkown to the readers, then some
information inherent in the data has been lost to the readers.
More commonly, if the readers infer that the data adheres to a constraint,
when no such constraint exists for the writers, then the information the
readers derive from that constraint has the quality of "lore" about it.
That is, the readers attribute inferences to the data that the data does
not, in fact, convey.
In practice this situation can cause things to run very smoothly, until the
day comes when some data that violates the constraint is written to the data
base. Then all hell breaks loose.
Karen Sundquist - 17 Apr 2004 19:34 GMT
> > Imagine a database that is only accessed by a server application.
>
[quoted text clipped - 10 lines]
> data ever being shared. 'Import' and 'export' facilities
> become crucial to the success of the application.
I don't understand your deduction that a database accessed only by
server applications is no longer a database or that constraints cannot
be included is such a database. Is it because, the actual users are
hidden from the database, so user level privileges must be looked
after by the application?
As you know, many databases these days are accessed directly only by
the superuser and by a number of middleware server applications that
marshal end user queries. Data is shared by these separate
applications. Critical constraints are included in the database that
are common to all users of the data. The middleware applications may
impose their own local constraints which are not critical to the
integrity of the data.
Karen
mAsterdam - 17 Apr 2004 20:17 GMT
> mAsterdam wrote:
>>>Imagine a database that is only accessed by a server application.
[quoted text clipped - 13 lines]
> hidden from the database, so user level privileges must be looked
> after by the application?
No, not at all.
In writing there is only a small
difference between the singular 'a server
application' from your first post, and the plural
'server applications' from your second post.
However, to your architecture it matters a lot.
In the singular case you can protect your data wherever
you see fit. In the plural case you had better put all
constraints which protect your data in the database.
A few weeks ago there
was a thread about the redundancy in the constraint
specification caused by this.
> As you know, many databases these days are accessed directly only by
> the superuser and by a number of middleware server applications that
[quoted text clipped - 3 lines]
> impose their own local constraints which are not critical to the
> integrity of the data.
Who is responsible for the constraints imposed by the middleware?
Which data do these constraints protect?
Why would middleware protect data?
My take is:
Use the middleware to store and forward messages.
That is what it is designed for.
Timothy J. Bruce - 18 Apr 2004 01:12 GMT
Karen:
> Critical constraints are included in the database that
> are common to all users of the data. The middleware applications may
> impose their own local constraints which are not critical to the
> integrity of the data.
*ALL* constraints are critical to and for integrity, and therefore
belong in the DBMS, as declaritive constraints when possible. I am
aware that many products offered today may not offer the level of
control and logic I insist apon, thus making the scenario you
described above more common than most suspect.
Just because I should doesn't mean I can,
Timothy J. Bruce
uniblab@hotmail.com
</RANT>
Anthony W. Youngman - 24 Apr 2004 15:10 GMT
>> Imagine a database that is only accessed by a server application.
>
[quoted text clipped - 3 lines]
>This effectively reduces the meaning of the word 'database' to
>'deluxe filesystem'. No problem, many use the word in that sense.
Doesn't the planned implementation of Longhorn use SQL-Server as its
filesystem?
What about Native Pick? Or OS/400?
In some cases, the "deluxe file system" IS what you would call a
database, I suspect. In others (Longhorn?) I suspect the use of a
database is a gross abuse of the concept of a filesystem :-)
Shades of grey.
Cheers,
Wol

Signature
Anthony W. Youngman - wol at thewolery dot demon dot co dot uk
HEX wondered how much he should tell the Wizards. He felt it would not be a
good idea to burden them with too much input. Hex always thought of his reports
as Lies-to-People.
The Science of Discworld : (c) Terry Pratchett 1999
mAsterdam - 24 Apr 2004 16:27 GMT
> mAsterdam writes
>>
[quoted text clipped - 5 lines]
> Doesn't the planned implementation of Longhorn use SQL-Server as its
> filesystem?
Ah, the sequel to the OS that has a
web-browser and a media-player
as essential, impossible-to-remove parts.
> What about Native Pick? Or OS/400?
They both use technology that originated from databases
at an unusal level.
I haven't ever worked on AS/400, but what I hear from people
who do is that they like it very much for database applications.
Same goes for Pick.
> In some cases, the "deluxe file system" IS what you would call a
> database, I suspect. In others (Longhorn?) I suspect the use of a
> database is a gross abuse of the concept of a filesystem :-)
:-)
> Shades of grey.
Some demarcation lines do get blurred.
"The filesystem is the database"
"The network is the computer"
"The media is the message"
"L’État, c’est moi"
Why do you want a database?
Karen Sundquist - 20 Apr 2004 09:37 GMT
> Why do you want a database?
We would make more progress with this discussion if we had common
definitions for terms such as 'database' and 'constraint'.
Good luck with the glossary.
Karen