| Author: | Catherine Devlin |
|---|---|
| Location: | PenguiCon |
| Date: | Apr. 19, 2008 |
Slides & code at catherinedevlin.blogspot.com
8 yr. Oracle database administrator
(align: LE)
IntelliTech Systems, Dayton, OH
If you're here to discuss the difference in B-tree optimization between Postgres and MySQL's ISAPI engine... get out. Go see Aaron instead; this will be way too basic for you.
psql --echo-all
Relational DataBase Management System
name, moniker, race, player Gruk, the Unbathed, half-orc, Christie Lois, of Edina, human, Cordelia Mickey, the Tricky, human, NPC Steve, of Cleveland, half-elf, Grant
name, moniker, race, player, weapon1, damage1, weapon2, damage2 Gruk, the Unbathed, half-orc, Christie, Morningstar, d8, Dagger, d4 Lois, of Edina, human, Cordelia, Staff, d6, , Mickey, the Tricky, human, NPC, Dagger, d4, Dagger, d4 Steve, of Cleveland, half-elf, Grant, Longsword, d8, Longbow, d6
name, moniker, race, player, class, level Gruk, the Unbathed, half-orc, barbarian, 3 Lois, of Edina, human, Cordelia, bard, 8 Mickey, the Tricky, human, NPC, sorcerer/wizard, 4/2
weapon, damage Dagger, d4 Morningstar, d8 Longbow, d6 Longsword, d8 Staff, d6
You can write increasingly complex, fragile code to get at this data... but gradually, you're writing your own database system. A bad one.
$ sudo apt-get install postgresql
$ sudo su - postgres
$ createuser <yourname>
$ exit
$ createdb dnd
Yes, it's running
Files + process
Think "pharmacist"
It's like rules without a campaign setting or adventure
Similar to a filesystem, which is running whether you're accessing it or not
$ psql dnd
dnd=# alter user catherine with password 'friend';
dnd=# \q
$ sudo apt-get install pgadmin3
$ pgadmin3
Huh? Looks empty - use plug to create new connection
Look how structured it is - metadata
the Common Tongue of RDBMS
$ psql dnd
dnd=#
Consistency in case
Table names: plural?
join_words_with_underscores?
$ pg_dump dnd > dnd.sql
dnd=# \i dnd.sql
Remember the pharmacy issue
dnd=# \g resultfile.txt
Jasper Reports
See catherinedevlin.blogspot.com
PostgreSQL 8.3 and Beyond
Aaron Thul
Sunday, 11:00 am
Maple B