Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GorillaPaws

macrumors 6502a
Original poster
Oct 26, 2003
932
8
Richmond, VA
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.
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
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.
 

Cromulent

macrumors 604
Oct 2, 2006
6,816
1,101
The Land of Hope and Glory
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.

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.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
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
 

ChrisA

macrumors G5
Jan 5, 2006
12,918
2,170
Redondo Beach, California
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.

"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.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
PostgreSQL doesn't have replication? Hmm, I always assumed it did. Ah well, thanks for the update.

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
 
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?

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 ;)
 

GorillaPaws

macrumors 6502a
Original poster
Oct 26, 2003
932
8
Richmond, VA
I just wanted to thank you all for your helpful/knowledgeable responses.

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 ;)

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.