You are currently browsing the The Rhodium Toad weblog archives for December, 2008.
Archive for December 2008
UUID generation for PostgreSQL 8.3 on FreeBSD
2008-12-21 by Andrew.
A couple of weeks ago I whomped up a quick module in response to someone on IRC who was unable to get contrib/uuid-ossp working on FreeBSD (which turns out to be due to a nasty conflict between misc/ossp-uuid and libc).
I’ve now put it up on PGFoundry, and the initial release can be found here:
http://pgfoundry.org/projects/uuid-freebsd/
Posted in PlanetPG, Postgres | 1 Comment »
On Normalization
2008-12-08 by Andrew.
People have funny ideas about database normalization.
What normalization is not:
- creating an (id,value) table for every single piece of data is not normalization
- using surrogate keys for everything is not normalization
- a way to improve performance (though it sometimes does)
Equally, failing to do the above does not mean your data is “denormalized”.
What normalization is:
- keeping your data consistent by ensuring that the relationships between values exist only in one place
- applying the rules: 1NF, 2NF, 3NF, BCNF, 4NF, 5NF … usually between 3NF and 4NF is enough
Obviously, though, there are times when one denormalizes for performance reasons, with appropriate care to ensure consistency isn’t lost in the process.
Posted in PlanetPG, SQL, Peeves | 1 Comment »
Hello world!
2008-12-08 by Andrew.
I have no idea if I want to keep a blog.
So let’s see what happens, if anything.
Posted in Bloggery | 3 Comments »