[Cialug] mysql database design

carl-olsen at mchsi.com carl-olsen at mchsi.com
Thu Aug 9 13:53:26 CDT 2007


Yes, it has triggers, stored procedures, and views.  I'm not sure when they were added, but version 5 has them.  The way MySQL does stored procedures is not as good as the way other data bases do them, so I would avoid using them.  I use triggers to emulate foreign keys on MyISAM tables so that I can still do full text indexing and avoid the overhead of InnoDB.  My triggers don't run very frequently, so the performance hit is negligible.  I'm not using views, but that might be part of a solution involving a lot of joins.

I've also used functions for returning custom formatted dates.

MySQL is a little different than most databases.  It is optimized to be slim and fast.  I don't think any other database, at least not the ones I use, has an equivalent for MyISAM.

Carl

-------------- Original message ----------------------
From: "Nathan C. Smith" <nathan.smith at ipmvs.com>
>
> Does MySQL have triggers now? 
> 
> > If I want my reports to be snappy, I sometimes set up a dedicated task
> > that runs as a low priority and denormalizes my data into "report
> > friendly" format using a single or maybe two tables. Then I run my
> > task at 15 min intervals. That way, when PHBs run their report, they
> > get it in 2.3 seconds which makes them happy and makes me look like a
> > god, since everyone else's reports take 90s or more. :-)
> > -- 
> > Matthew Nuzum
> > newz2000 on freenode
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> > 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug




More information about the Cialug mailing list