Re: Decouple SQL queries from class in OOP design
- From: "frebe" <fredrik_bertilsson@xxxxxxxxxxx>
- Date: 22 Nov 2005 12:45:50 -0800
> 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
.
- Follow-Ups:
- Re: Decouple SQL queries from class in OOP design
- From: Patrick May
- Re: Decouple SQL queries from class in OOP design
- References:
- Decouple SQL queries from class in OOP design
- From: Hongyu
- Re: Decouple SQL queries from class in OOP design
- From: Robert C . Martin
- Re: Decouple SQL queries from class in OOP design
- From: Mikito Harakiri
- Re: Decouple SQL queries from class in OOP design
- From: Bruno Desthuilliers
- Re: Decouple SQL queries from class in OOP design
- From: Mikito Harakiri
- Re: Decouple SQL queries from class in OOP design
- From: Patrick May
- Re: Decouple SQL queries from class in OOP design
- From: frebe
- Re: Decouple SQL queries from class in OOP design
- From: Patrick May
- Re: Decouple SQL queries from class in OOP design
- From: frebe
- Re: Decouple SQL queries from class in OOP design
- From: Patrick May
- Decouple SQL queries from class in OOP design
- Prev by Date: Re: Decouple SQL queries from class in OOP design
- Next by Date: Re: Decouple SQL queries from class in OOP design
- Previous by thread: Re: Decouple SQL queries from class in OOP design
- Next by thread: Re: Decouple SQL queries from class in OOP design
- Index(es):
Relevant Pages
|