Cocoa and Enterprise class databases in the future?

Discussion in 'Mac Programming' started by GorillaPaws, Aug 3, 2008.

  1. GorillaPaws macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #1
    Do you think that Apple will add core data support for enterprise class database frameworks in the not-so-distant future? If you were going to start a project from scratch and your biggest concerns were ease of implementation with cocoa and likelihood of support from Apple down the road which archetecture would you look into? From what I've been reading, PostgreSQL and Baseten's cocoa framework for development look like a promising solution for the kinds of things I'm looking to do.

    I guess one of my biggest fears is that I would invest all of that time and energy getting involved with PostgreSQL only to have Apple release core data support for MySQL exclusively or something along those lines. Is that a legitimate concern, or are there a lot of pieces I'm missing here? Any help or advice about the general direction to go would be greatly appreciated. Thanks in advance.
     
  2. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    I would never count on Apple to do anything. It's certainly possible because Core Data came from Enterprise Objects Framewrk (WebObjects), which was enterprise-database-connected. But Core Data is a significantly dumbed-down version (if you read the history of it, part on purpose and part because of a series of design missteps). I'm not sure the "core" of Core Data is even capable of supporting everything necessary for an "enterprise level" database at this time, whether someone wants to write the bindings for it or not.

    However, by all accounts Postgres is a very nice database, and is at least the equal of MySQL. If it has all the features you need, you'll probably like it.
     
  3. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #3
    From what I have read, PostgreSQL is better than MySQL simply because it does not suffer from the same level of locking issues that seem to plague MySQL databases of any size. I also believe it has better replication features.

    It is something I had a brief look into, and even though some benchmarks rate MySQL in the lead technology wise PostgreSQL would be the best choice. If I was in this situation I'd just write the application, at least if you do it using the native API it will be easy to port to other platforms in the future.
     
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #4
    This is purely anecdotal, but we wrapped the libpq C API in some of our own functions to return dynamically-sized strings, etc. for use in another language. Since you can natively call into C libraries from Objective-C you might want to do the same thing.

    That way you can use the libpq C functions, but wrap character(*)/varchar/text fields in NSString/NSMutableString, ints, smallints, reals, booleans in NSNumber, etc. This will at least basically Objective-C-ify what you're getting out. You could do something similar for inserts/updates. Write a function that takes an NSDictionary and a type-mapping, and have the dictionary keys be NSStrings that are the field names, and the values can be NSString or NSNumber based on the type, and you can build up your inserts/updates based on the values.

    I'm not sure how you'd want to handle "special" types like intervals, dates, etc. but these could probably be wrapped in NSDate pretty easily.

    -Lee
     
  5. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #5
    "At least" is an gross understatement. Postgres' feature set is enormous while MySQLis quite stripped down. Postgres is actually usable as an enterprise DBMS but it's still not really there. (lacks features like replication) I've done head to head comparison with Oracle and Ocacle has much more even perormance while PostgreSQL had some glitches.

    MySQL does not even play in this league and I would not consider using it as the main information repository for a large corporation.
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    PostgreSQL doesn't have replication? Hmm, I always assumed it did. Ah well, thanks for the update.
     
  7. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #7
    There's no (free) tool that you can run and have replication working. People have crafted their own to varying degrees of success, and companies have built and sell solutions for this. We're currently using a trigger based, home-brewed replication scheme that works, but is being used for migration (across PG versions and CPU architectures), not real-time failover.

    -Lee
     
  8. AlmostThere macrumors 6502a

    #8
    If you are dealing with an 'enterprise' database, implementation with Cocoa and support from Apple would not be my main priorities. I wouldn't actually imagine having much choice of database platform, which will probably be run by another department, separate from client software development.

    Given a clean sheet, choice of database would be my first port of call. From a client perspective, I would be interested in the most mature and supported option - on a Mac, this is Java, which provides many mature database frameworks, modelling tools, abstraction layers and client software.

    Of course, I write this not knowing what it is you want to achieve ;)
     
  9. GorillaPaws thread starter macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #9
    I just wanted to thank you all for your helpful/knowledgeable responses.

    I think I may have been a bit misleading in my post. I'm not creating an "enterprise database" but need to have the features of one such as multiple users, the highest levels of data integrity and security etc. The actual database itself would be much smaller. I was under the impression that databases with these types of features were known as "enterprise class databases" but I may have misunderstood some of the terminology from reading articles.

    I'm still a total novice programmer, and I won't realistically start this project for a while (nor do I expect to do it all on my own :eek:), but I wanted to have an idea of which direction I should be going in so I could focus my self-instruction on the most important areas. Thanks again for your help.
     

Share This Page