Re: Decouple SQL queries from class in OOP design



> Again, not all databases have a single owner. Shared and
> enterprise databases are quite common.

Common, but stupid.

> Denormalization for performance is a change I've seen on more
> than one occasion.

Of you denormalize a set of tables for performance, I assume that the
original normalized tables are still there and are the master for the
data. Otherwise you have created yourself a hell. If you don't realize
this I can give you some examples. Because the original tables still
exists, you are just adding new tables, which does not break any
existing SQL statements. Normally denormalization are only done in data
mining databases. The production database are still there and the data
is replicated from the production database to the datawarehouse
database.

> If the new schema provides the same information
> in a different way, only the implementation of the component or
> service providing the business functionality need change.
Please give some example. Why would you change the schema if it still
provides the same information? It like rewriting your classes, but the
still do the same thing.

> DBAs may also change the schema to support other
> applications, for example by moving some columns from one table to a
> new table in order to change a 1:1 relationship to a 1:M. Such
> changes are not uncommon in large integrated systems
Chaning a 1:1 relationship to a 1:M will not change your business
logic?? Please give some example.

> A particular schema is an implementation detail.
Everything may be considered as an "implementation detail" in some
context. But in the context we are talking about, the database schema
is an interface.

> The same functionality can be supported by a variety of schemas, more than one
> of which can be in third normal form.
The same fact applies to your service interfaces. Two different
interfaces may provide the same functionality. But we still not need to
decouple our application from the service interface.

> I've provided a few examples of the
> types of schema changes that occur in real systems.
You have still not provided a single example.

> Changes to business rules are far from the only reason for schema changes.
Changes to business rules are by far the most common reason for schema
changes.

Fredrik Bertilsson
http://butler.sourceforge.net

.



Relevant Pages

  • Re: Java is becoming the new Cobol
    ... In the Unisys 2200 environment using their Network Database Server, you get a schema work area depending on how you invoke the schema. ... However, it not only copies the schema area into the program, but the "DMCA" (Database Management Communication Area - basically, the block of information that holds your connection state) is copied in too. ... So, you're left with working-storage, which makes it visible to your program only, or common-storage, which makes it visible to programs linked in. ...
    (comp.lang.cobol)
  • Split messages
    ... This is based off the northwind database. ... Create document schema: ... Select the SQL entry, make sure that we are pointing to the SQL ... For the item select a receive pipeline and name it EmpSplitPipe.btp. ...
    (microsoft.public.biztalk.general)
  • Re: Decouple SQL queries from class in OOP design
    ... > Of course there are existing applications that uses many different ... > architectures and still provides measurable business value. ... > should access every database directly. ... by the database, but the schema changes. ...
    (comp.object)
  • ANN: Sequel 2.8.0 Released
    ... Sequel provides thread safety, connection pooling and a concise DSL ... for constructing database queries and table schemas. ... if you want to, but the results and API are adapter dependent, ... Model associations, getting the schema, joins, and many other ...
    (comp.lang.ruby)
  • Re: SQL Source Control
    ... I know a lot of you use various means for PHP source control (CVS, SVN, ... How do you handle the versioning of the database and data ... let me install and maintain database schemas, ... installs the schema in whatever database I use. ...
    (php.general)