Re: [GENERAL] SQL Book - Mailing list pgsql-general

From Richard Huxton
Subject Re: [GENERAL] SQL Book
Date
Msg-id 00a601bf6c47$ea2f27e0$1001a8c0@archonet.com
Whole thread Raw
In response to Re: [GENERAL] SQL Book  (<kaiq@realtyideas.com>)
List pgsql-general
From: <kaiq@realtyideas.com>
> newbie,hmm, the first homework is: find the answer in
> the archive of this list! hint: search for book.
> actually you can also find it in the "official" online
> doc.
>

Depending on where you start from, make sure you know some basic database
design as well as the SQL. I spent 3 tedious years studying various db
courses and can boil it down into 3 laws:

1. Always put one value into one field.
2. Never store the same value twice.
3. Always make sure every record has a unique key.

Of course, you can always break these laws when you feel like it, but don't
start complaining if you get slapped in irons...

SQL is just a matter of learning syntax - you can always keep the
book/help/webpage next to you for that.

The book being mentioned might teach you a few more specific tricks, but the
principles hold whatever system you're using.

tip - if you're coming from microsoft, build some test queries using MS
Access grid queries then look at the SQL view. Not standard SQL of course -
microsoft's version, but it'll give you an idea.

Apologies if you know all about DB design and just wanted to know about SQL,
but I know too many people who've launched into building an Access database
worrying about VBA syntax rather than whether their underlying tables were
sound or not.

--
  Richard Huxton
  Archonet Ltd.


pgsql-general by date:

Previous
From: Marc Tardif
Date:
Subject: automatic timestamp
Next
From: treklover@bigfoot.com
Date:
Subject: sin() in PostgreSQL?