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

sansoa666

macrumors newbie
Original poster
Oct 9, 2008
21
0
surigao city, philippines
iam a student and im interested in database programming,
i having difficult to find a database that will suite to mac??
please help me find a database for the mac!

thank you in advance.......
 

Kane.Elson

macrumors regular
Jul 27, 2006
204
0
Mysql apparently runs quite well on OS X. It is the most popular open source database. (Besides SQLite, but that's another story)
PostgreSQL is also a popular open source database. I personally prefer it to MySQL but it's up to you. If you are just learning then pretty much any database will work to teach you the basics.

Google for some quides to SQL and you will find all you need to learn SQL.....

Edit: You might want to get a frontend, something like http://cocoamysql.sourceforge.net/ which will help you manage MySQL easily.
 

costabunny

macrumors 68020
May 15, 2008
2,466
71
Weymouth, UK
I agree. For learning and programming MySQL has a HUGE online community and its not too tricky itself. There are dmg versions for MAC OS if you need it.
 

Aea

macrumors 6502a
May 23, 2007
838
208
Denver, Colorado
SQL is pretty general, anything you learn in MySQL should be quite easily transferable to other vendors with only a little bit of re-learning.
 

thewright1

macrumors regular
Apr 3, 2008
100
0
I downloaded MAMP as a local environment on my Mac, and that's been working great for me. I'm not sure about the policies for link posting, so I'll just say Google MAMP and look into it.
 

ChrisA

macrumors G5
Jan 5, 2006
12,919
2,173
Redondo Beach, California
iam a student and im interested in database programming,.

You say "database programming"? What really do you mean? Do you need to know how to access a DBMS from some kind of programming language? or do you just want to learn SQL?

Be very careful not to skip the theory or databases. Many self taght people skip this and end up making some really poor design decisions later when they go to build a DBMS based system. Don't start writing code until you can at least explain what "normal form" means.

SQL is very easy to learn but if you are a programmer yu are used to thinking in terms of steps that follow one after the other. SQL is not at all like that. It is a specification language that says "all N such that X and Y" and lets the database write the "program". Think set theory not algorithms.
 

montanaproducts

macrumors newbie
Nov 22, 2008
3
0
SQLite Built In!

Sansoa

Go to terminal (Applications>Utilities>Terminal.app), open terminal and type SQLite3. You've got access to the Apple built-in database "SQLite". Type .h for a brief help description. All basic SQL functions are available in SQLite and it's very easy to learn. As for a book, I've found "SAMS Teach Yourself SQL in 10 Minutes" to be a very good beginner book. It is written to be a collage text and works 99% for SQLite. For theory "The Definitive Guide to SQLite" is also very good, however don't get this until you've read SAMS!

Hope this helps

John
 

psingh01

macrumors 68000
Apr 19, 2004
1,590
633
MySQL! It's free (at least the last time I checked). Multi platform (Mac/Win/Linux). And it's "real" DB in the sense that many business use it. There is lots of support for it via php, java/jdbc and other technologies.
 

ChrisA

macrumors G5
Jan 5, 2006
12,919
2,173
Redondo Beach, California
Is DB2 really that good compared to say PostgreSQL?

I've used a number of them for "real" work. First off there is no "good" there is only "well matched to your intended usage".

So what is it you are doing. If it's learning SQL the the hands down #1 chose would be SQLite because Apple installs this on every Mac. We all already have it on our Macs, how much simpler can it get?

But if your use is a enterprise level DBMS and you need 24x7 technical support and and yo might need engineers who can be on-site with 30 minutes notice then SQLite and MySQL are not for you. do NOT discount the value of a support contract. It you have a large number of applications (Like human resources, Inventory and accounting) all running on the same DBMS and you run into trouble you will really, really need a high level of competent support. You can get that from IBM or from Oracle.

Performance wise, I've found MySQL t be very fast but it hits a limit quickly and then performance dies. The higher end products scale better. How to choose? Well do you expect to have a dozen simultainiuos users all doing querries at the same time?

If you want to "paint yourself into a corner" the best way to do that is with a DBMS. You can put enormous amounts of work into one only to find out later that an un-informed decision ealy on means a redesign down the road. And by then you really will have 100 applications and web sites all using the same DBMS and table designs.

For the OP "SQLite" is the no-brainer answer.
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
I've used a number of them for "real" work. First off there is no "good" there is only "well matched to your intended usage".

So what is it you are doing. If it's learning SQL the the hands down #1 chose would be SQLite because Apple installs this on every Mac. We all already have it on our Macs, how much simpler can it get?

But if your use is a enterprise level DBMS and you need 24x7 technical support and and yo might need engineers who can be on-site with 30 minutes notice then SQLite and MySQL are not for you. do NOT discount the value of a support contract. It you have a large number of applications (Like human resources, Inventory and accounting) all running on the same DBMS and you run into trouble you will really, really need a high level of competent support. You can get that from IBM or from Oracle.

Performance wise, I've found MySQL t be very fast but it hits a limit quickly and then performance dies. The higher end products scale better. How to choose? Well do you expect to have a dozen simultainiuos users all doing querries at the same time?

If you want to "paint yourself into a corner" the best way to do that is with a DBMS. You can put enormous amounts of work into one only to find out later that an un-informed decision ealy on means a redesign down the road. And by then you really will have 100 applications and web sites all using the same DBMS and table designs.

For the OP "SQLite" is the no-brainer answer.

Thanks for that. This website is giving me kittens. I keep thinking I've made the wrong decision going with PostgreSQL and should have picked MySQL instead but from what I've read PostgreSQL beats it in terms of features.

Should I just stick with PostgreSQL or what? Can anyone give me any useful insights into running a database system for a website which will need to scale in the future?

I've read quite a bit of the PostgreSQL manual and bought the PostgreSQL dev guide which seems like a good book. Obviously I can't afford to go with a commercial solution so I guess the choice is PostgreSQL vs MySQL.

I've heard that once MySQL starts getting locking issues PostgreSQL overtakes it in terms of performance.

Sorry for the hijack but it is relavent question and could help the OP as well.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Thanks for that. This website is giving me kittens. I keep thinking I've made the wrong decision going with PostgreSQL and should have picked MySQL instead but from what I've read PostgreSQL beats it in terms of features.

Should I just stick with PostgreSQL or what? Can anyone give me any useful insights into running a database system for a website which will need to scale in the future?

I've read quite a bit of the PostgreSQL manual and bought the PostgreSQL dev guide which seems like a good book. Obviously I can't afford to go with a commercial solution so I guess the choice is PostgreSQL vs MySQL.

I've heard that once MySQL starts getting locking issues PostgreSQL overtakes it in terms of performance.

Sorry for the hijack but it is relavent question and could help the OP as well.

PostgreSQL will take you pretty far. On the very high-end, you have products like Oracle and DB2 and (while painful to discuss) MS-SQL server. Feature-wise, Postgres stacks up pretty well (though lacks things like built-in replication, built-in clustering, etc.), but as ChrisA mentions you can't necessarily get the same sort of support. You can certainly buy postgres support contracts from 3rd parties, but most wouldn't consider it "the same" as buying this sort of support from the vendor.

I have a bias that I should reveal, my company has very large deployments of postgres in a clinical setting. I do understand the shortcomings, however, and we have certainly investigated a move to oracle, etc. The expense is obviously a very large deterrent, though we have spent many man hours on jury-rigging real-time-ish replication, etc.

-Lee
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
PostgreSQL will take you pretty far. On the very high-end, you have products like Oracle and DB2 and (while painful to discuss) MS-SQL server. Feature-wise, Postgres stacks up pretty well (though lacks things like built-in replication, built-in clustering, etc.), but as ChrisA mentions you can't necessarily get the same sort of support. You can certainly buy postgres support contracts from 3rd parties, but most wouldn't consider it "the same" as buying this sort of support from the vendor.

I have a bias that I should reveal, my company has very large deployments of postgres in a clinical setting. I do understand the shortcomings, however, and we have certainly investigated a move to oracle, etc. The expense is obviously a very large deterrent, though we have spent many man hours on jury-rigging real-time-ish replication, etc.

-Lee

Thanks Lee.

I doubt the site will ever reach the size where I will need to purchase commercial support, let alone actually being able to afford commercial support :). The largest I am planning for at the moment is a database server and a separate Apache server. Obviously a singe server / VPS will work fine for a long time until I need to get to that size though. Heck, for all I know the site could be a total flop.

I'm glad to hear it stacks up well in terms of features. One feature that particularly caught my eye was being able to use precompiled C code as a stored procedure or function to enable fast execution of custom code when a particular action took place. Seems like it could be quite useful further down the road.

I seem to be having more fun learning about networking though than actually building the sodding thing. Damn my inquisitive mind.

I'm lucky in the sense that it is not as mission critical as some other sites. Obviously down time will cost me money but it is not mission critical in the sense of health systems or other government systems are.
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
I've never used Post-can't-spell-it-or-say-it-SQL, so I really can't comment on it. But, I have been using DB2 since 1984, so I kinda know it's in and outs.
 

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
i'm in the same situation as you with learning sql programming... i found it surprisingly difficult to install MySQL for leopard in order to use Terminal to practice simple queries (eventhough i'm sure most people's experiences are different).

recently i discovered XAMPP, which is a local webdev environment - much MUCH easier than setting up apache server and configuring it for PHP (why is PHP disabled by default anyway?) and installing MySQL... XAMPP has a few built-in tools, including MyPHPAdmin, which is a browser based front end and PHP generator for MySQL, and you can also practice queries once you set up a table.
 

ChrisA

macrumors G5
Jan 5, 2006
12,919
2,173
Redondo Beach, California
Should I just stick with PostgreSQL or what? Can anyone give me any useful insights into running a database system for a website which will need to scale in the future?

Study a little bit of theory. You should at least know what "third normal form" is and why is a "Good Thing". Understand constraints and triggers. And with Postgres you can define data types and operations on those. Using this you can move some of the SQL functions out of your applications and into the database. Postgres is "object oriented" you can define types and functions and even overload operators

Make sure you don't start to soon wiith design. At least think about the Normal Form stauff that will keep you away from most mistakes.

Some other beginner mistakes I've seem 100 times are that the designer did not understand joins and actually search tables in his applicatin code to find a key the querried a second table based on that key.
 

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
A friend forwarded me a PPT (converted and saved for KeyNote) from a McGill University lecture on Normalization. it's attached if anyone is interested.
 

Attachments

  • NormalizationSlides.zip
    428.8 KB · Views: 114
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.