what did I ever do without views?!

There are some things in life that, once you get used to them … there’s just no going back. Things like underwear, Malt-O-Meal, Neverwinter Nights, and views.

At work we use databases much, much more than I ever have anywhere else. Because of that, I’ve been forced to stretch and learn more ways to do things efficiently because if things are going slow, we are losing $$$. All that’s nice and good, but the part I’m enjoying as a developer is the convenience of that views, stored procedures and user-defined functions give me.

For instance, I’ll use a recent example. We have three tables that we pull data from a lot, and I’m constantly doing INNER JOIN foo ON bar = poop across a lot of pages. Well, a view lets me take the most critical data of those three tables and lump them all into one subset. So now, I can just do ‘SELECT * FROM view-la-la WHERE foo-poo-pah’ and be done with it.

I really have no idea how I lasted so long without these great features. It’s probably because I was stuck using that other open-source database that has said for years that those features weren’t important. Well, that and because sometimes I won’t try something new if I’m familiar with what I have. Until they stop selling my favorite flavor of Cream of Wheat at the store, and then I *have* to try something different. Mmm… Malt-O-Mealie.

2 comments on “what did I ever do without views?!

  1. Gabriel Gunderson

    Looks like you are running PostgreSQL these days. Don’t you love it? The only problem is that MySQL is everywhere and sometimes needed. While I use it when I have to, I replace it with PostgreSQL when I can.

    Reply
  2. Steve

    Actually, I’m not using postgres at work (or MySQL). In fact, I’m too embarrassed to even say what we are using, so I won’t mention it. We are migrating to pgsql though. Happy days ahead. 🙂

    Reply

Leave a Reply