Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

24.7.10

son of SQL

Who knew that I prefer the world in 2-D? Relational databases are a labyrinth I can't seem to navigate my way out of. It's not that I don't know whether to turn right or left. I don't know if I'm upside down, which exit I'm supposed to be heading for, and I forgot how I got into the maze in the first place!

I think part of it is because I'm new to it. If I spent some time with it, I'd probably feel more comfortable with it. But, SQL (and relational databases) are in many ways non-verbal-- which is my strength. And my weakness is spatial orientation. I can remember, quite vividly, driving back from California on a Sunday night, sitting in the passenger seat, insisting to my friend that we were driving parallel to I-10. It was Phoenix, it was one o'clock in the morning, and no one was out except us. I was almost frantic; I wanted to get home so badly and I was so sure that we were never going to make it back to the freeway because we were running parallel to it.

And then we got to the on ramp. I felt internally disoriented now. Like a slap in the face, I was reminded once again that spatial orientation-- not my strong suit.

This is what relational databases look like to me:

Only maybe insert a few more going in at different directions.

So using MySQL under these conditions is just a wee bit difficult. Mostafa says, we can be precise with our MySQL queries. Sure, if you know what the heck you're doing!

The written examples in our Assignment packet helped me tremendously, especially because I chose to use the database provided, and I could use the examples as a template. I'm verbal: I saw the words, could see the pattern in the words, and could eke out a few queries that way. And there's nothing like seeing the query results table come scrolling up the screen instead of, "Error. You are a dummy and I can't understand what you are trying to tell me."

So, yay for the scrolling results, a small feeling of victory, and one step closer to wrapping my mind around MySQL.

16.7.10

bridge to nowhere

So this week I was pretty psyched about the readings and the exercises because the types of commands that are in MySQL make sense to me (pretty much). I think MySQL might work how my own brain works. I kept thinking, Maybe you should have been a programmer, or a database engineer or something. You've got this!

And then I tried to create my own, extraordinarily simple database proposal regarding three images. Three. And I cannot tell you how frustrated I got! It's not too often that I feel that inadequate. I kept drawing tables and writing in entities, then decided that they were attributes, then decided, no, they're values. My head was spinning in circles about what, exactly, to do with the attributes. Do they get their own tables? Doesn't that make them entities? And all the foreign keys, when should they come into the picture? Arrrrrrrgh!

On top of that, my "simple" database just got more complicated when I realized that I ended up with a many-to-many relationship between two tables-- one art piece was created by two people, because one died partway through painting it. I knew I had to make a bridge table to connect the piece table and the creator table, which I thought I did... but since it wasn't recognized as a bridge, I think I need to revisit that concept a bit. Stupid artist, why did you have to die right then? Now you've ruined my life.

Oh, well, he couldn't help it, I guess. I think what's in store for me is re-reading and /or re-watching some of the stuff on database modeling, to build a better bridge.