[lug] BLUG Poll

Bear Giles bgiles at coyotesong.com
Tue Jul 22 09:15:50 MDT 2008


Does mysql support schemas yet?  I seem to recall that it finally added 
true support for referential integrity a while back. (Count me in the 
camp that says a "relational" database is worst than useless without a) 
transactions and b) referential integrity.)

This isn't introductory material, but don't forget that postgresql 
supports some heavy duty stuff:

- several stored procedure languages.  PL/pgplsql (roughly akin to 
Oracle's), perl, ruby, and a few others.

- java as a stored procedure language. I've played with it a little, but 
haven't had time for much beyond some simple demo tasks.  You can do a 
lot of stuff though, even make your own db queries using an internal 
server-side jdbc driver.

- triggers.  that is, call arbitrary stored procedures whenever a record 
is created, updated or deleted, with actions taking place either before 
or after the record has changed.  The classic use is to set a creation 
or modification timestamp, or to record the action in an audit log.  You 
could also do things like create placeholder records in other tables to 
ensure referential integrity, if appropriate for your data model.

- user-defined types.  I did some in C a while back, and there are also 
hooks for java-defined user-defined types.

You can do all of this programmatically, of course, but doing it at the 
DB level ensures that it always takes place even if some evil attacker 
is doing direct sql injection.


On a related note, I've wondered about a talk on database security.  
It's not linux-specific, of course.



More information about the LUG mailing list