Personal Workflow Blog

To content | To menu | To search

Tag - database

Entries feed

Tuesday, 19 May 2009

Surrogate Keys : Globally Unique, Application Unique or Type Unique ?

When you just decided to use Surrogate Keys, another problem arises : which value should I use ? It seems to be a very simple problem since the key now is completely in isolation in your application and is not related to any data. The choice is quite bonding, since a change means that every value has to be changed, and you did not let this key leak outside the database did you ?

The keypoint here is isolation. Many differents kinds of isolation are available, and soon you will be able to make a informed decision.

Continue reading...

Friday, 17 April 2009

Databases: Partial Indexing

In huge tables, usually only a fraction of the table is used on a regular basis. The rest is useful either for historical purpose, or is just not being treated right now.

Continue reading...

Monday, 30 March 2009

Databases: Meta-Data (ctime & mtime)

A RDBMS is all about data. Actually also about the relationships between them, but let's focus mostly on the datas.

We can even view a RDBMS as a glorified file system, with the tables like directories and rows like files inside. Every filesystem has some meta-data attached to its elements such as the creation date and the last modification date. With this analogy it becomes quite clear that we could also have this meta-data on the table. The good part of the filesystem meta-data design is that it's handled outside the element. The last modification date is something that isn't stored in the file itself. (Actually it could, but then it had an application meaning, and is to be handled by the application). It's also completely automated, without any intervention required, or even possible, on the application part (except for specialized tools like when we restore a backup).

Continue reading...

Wednesday, 30 May 2007

Should SQL die, and can it ?

These days, writing SQL code seems like writing some C/C++ code : it's so old fashioned.

Continue reading...