The Database Design Resource Center

Using a Sequence instead of a year number

by Alf

Using a Sequence instead of a year number: I just have to tell you this one:

While working as a DB QA manager in a large DB project, upon revision of the design I discovered that the contracting consultant company (big and French) had a policy of using sequences (auto-generated numbers) for all primary keys in tables.

What was funny was that they used a sequence to uniquely identify the YEARS table (It contained 2 columns; Year number (4 digits) and Active (Y/N).

They actually used a sequence to uniquely identify the year (2007, 2008, etc.) which forced the database to make yet another join in the database for EVERY query just to find what year we were talking about. Crazy!

The worst part? When they realized the idiotic design, it took them one year and another 60 man-years to rewrite the application...

This was an application that was supposed to handle 350-500 mill. transactions/year...

What is YOUR worst database design experience? PLEASE share it right here!:

Comments for Using a Sequence instead of a year number

Average Rating starstarstarstarstar

Click here to add your own comments

Nov 03, 2015
free steam wallet code generator 2015 NEW
by: steam wallet codes

Here the wonderful webpage which generate free steam codes without downloading any file or something.

Oct 23, 2015
Hack facebook account password online NEW
by: Fb hacker

One day i'm searching for how to hack a facebook account password then i got a webpage which easily provides all the facebook online.

Aug 06, 2015
Good post NEW
by: Viviane Russel DDS

What a great blog you have!
May I ask you to place some ads of my site FlowerDress on you blog?
I really love your awesome site and want to offer good money for ads on your site! Please, answer me and let's discuss all the details!

Thank you very much!

Jun 02, 2015
Education NEW
by: Anonymous

So we do not need to give more races to our thoughts and mentality as if we do so then our acts become out of control for us and we will lose everything in our life. While we need superiorrpapers writing service to gather thing for us instead of losing them. As an educated person can be someone but never be a loser.

Feb 26, 2009
by: Anonymous

a table of years...

that takes the cake.

Sep 21, 2007
I don't see why, but I still don't see a problem
by: Steve

Therecan be reasons why you'd find a table of years useful. Sounds like not this time. But what DBMS would suffer a performance hit from this join?

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Worst Database Design Experience.

Exclusive interviews with:
Steven Feuerstein, PLSQL expert
Donald Burleson, Top IT consultant

Free eBook

Subscribe to my newsletter and get my ebook on Entity Relationship Modeling Principles as a free gift:

What visitors say...

"I just stumbled accross your site looking for some normalization theory and I have to say it is fantastic.

I have been in the database field for 10+ years and I have never before come across such a useful site. Thank you for taking the time to put this site together."

Mike, USA

Read more Testimonials

Database Normalization eBook:

Database Normalization eBook

Copyright © / Alf A. Pedersen
All rights reserved.
All information contained on this website is for informational purposes only.
Disclaimer: does not warrant any company, product, service or any content contained herein.

Return to top

Copyright acknowledgement note:

The name Oracle is a trademark of Oracle Corporation.
The names MS Access/MS SQL Server are trademarks of Microsoft Corporation.
Any other names used on this website may be trademarks of their respective owners, which I fully respect.