The last year I’ve been learning a lot of new things. I’ve had to change my mindset from the concept of procedural programming to the concept of object oriented programming. Had to learn Objective-C, Xcode, Cocoa, new frameworks, etc. Although learning new things can be exiting and cool, it can also make you insecure and frustrated. I used to be a damn good software developer, and now everything seems to be new and hard. Luckily I still had my database experience and knowledge. It’s so nice to have some solid ground, some technology that you can trust, that hasn’t changed that much.
From my point of view, a database consists of tables. You can have a “Persons” table for instance. This table has fields, like “Name”, “Address”, “PhoneNumber”, etc. These fields can be filled with data. For convenience reasons sometimes an ID is added to the table, to make it easier to look up data, and to link data from one table to another. I’m used to using SQL to query a database.
Yesterday, my colleague (who also happens to be my husband) and I discussed the data model of our project. I asked him why he didn’t add ID’s to the tables. “No, these are not tables, these are OBJECTS”. Of course not, it’s a database silly, so these must be tables. “No, this is not a relational database…” WTF?! So you’re telling me, that besides everything I’ve already done and learned so far, I also cannot use my database knowledge?! CoreData, I hate you!! Why are you not a relational database of the kind that I know and trust!?
Of course this is not CoreData’s fault, I probably have to blame people at Apple, or even further back, at NeXTstep, and probably they had some good reasons to do it all this way, so I shouldn’t blame anyone, but still… somedays, especially the rainy ones, you just want to be able to go with the flow. As Aaron Hillegass wrote in his Objective-C book: “In this case, ‘learning new things’ is a euphemism for ‘battling against our own ignorance’.” I’m afraid this is very true at the moment.
But tomorrow, I’ll pick up the pieces. Secretly I’ll probably translate objects to rows in my head for a while, when it comes to CoreData. And eventually my mind will get used to this as well and I’ll learn to appreciate CoreData. If only my mind was a little more flexible…
Update: the following articles were tweeted to me in response to this post:
OrmHate – a blogpost by Martin Fowler
Object-Relational Mapping is the Vietnam of Computer Science – a blogpost by Jeff Atwood
Recent Comments