• Welcome to the new Mac-Forums. See News and Community Announcements for more details.

Doing SQL on the Mac

Joined
Aug 28, 2004
Messages
234
Reaction score
0
Points
16
Hey quick question, I'm in my database class at school right now. We're learning SQL and using Microsoft SQL server and SQL Query Analyzer to enter commands and so on. We were told to ONLY use Microsoft SQL, but is there something similar for Mac that I can do this on my own at home? I know there's MySQL but will it work the same way displaying results for me and so on? Or is there MS SQL for mac? Thanks!
 
M

meltbanana314

Guest
OS X does come with MySQL by default. I've never dealt with MS SQL (and I *really* don't want to.) Some of the fundamentals should work the same but being told to only work with one database is really silly. It's like only being told to work in Visual Basic, when there are a ton of different scripting languages out there that are multiplatform rather than VB (and MS SQL) that will only work on Windows.

I know it's probably none of my business but you should try and convice your instructor(s) that MySQL (and PostgreSQL) are just as valid as Microsoft's database.
 
M

MichaelSullivan

Guest
Neither PostGres or MySQL are at the level of SQLServer, but either would be sufficient to learn basic SQL and DB management. That said, some of the specific SQL you'd use in a SQLServer class would most likely use TSQL, and therefore wouldn't be compatible with MySQL or PostGres.

I've used SQLServer for years, its a great DB.
MySQL is a good DB thats really coming along lately.
PostGres.... well mama said, "if you can't say anything nice..."

Finally, you can use a tool like http://www.macosguru.de/index.php?adwordsid=3 to access SQLServer, MySQL, and more ... as long as you can access them via a network. This would most likely be your best bet... just connect to a SQLServer instance, and code away.

Hope this helps.
 
K

Kokopelli

Guest
MichaelSullivan said:
PostGres.... well mama said, "if you can't say anything nice..."
Funny, I swear by (and frequently at) Postgres. It is somewhat hampered by a lack of a good Admin and Development client but if you are comfortable with command line SQL it gets the job done. I prefer it to MySQL, though I am not religious about it. Originally I went away from MySQL due to their licensing model, but as I got more familiar with Postgres I saw no reason to go back.

None of them compare to Oracle, but the difference is narrowing.
 
Joined
Aug 28, 2004
Messages
234
Reaction score
0
Points
16
I'll have to figure it out, when I start SQL analyzer we tell it to connect to local and it connects to the computer we're on I think. The reason we have to use Microsoft is because for assignments and so on they need some standard to mark everything in. I'll try out mySql and see if it works. I have a PC as well but I'm assuming I need to pay for SqlServer from Microsoft? Most of the exercises are just individual for now so I don't really need to connect to school. But I'll check it out, thanks for the replies.
 
K

Kokopelli

Guest
Hmm, learn something new every day. I did not know Oracle had a Mac port.

For MS SQL Server the school did not provide SQL server or a lab with a server available? Yes, if you are connecting to local it is assuming the server is running on the same machine. You can connect to remote machines as well without a problem but that is not pertinent to the discussion at hand. I would strongly suggest that you see if your school has MS SQL Server for sale or available for educational use. MySQL and SQL server have different foibles and what works on one may not work on one may not work on the other.

As an example MySQL has BLOB support and a default maximum VARCHAR length of 255 as I recall. MS SQL Server on the other hand does not have formal BLOB support but instead uses VARBINARY and IMAGE support as I recall. The default maximum VARCHAR is also something like 8000. Further when you get into unicode support it varies by platform as well as an example.

So to rely on MySQL for an assignment where they are using MS SQL Server as the standard would not be wise.
 
T

Thud

Guest
MySQL isn't the best for learning SQL beyond basic queries, since it doesn't fully implement the SQL spec in the current release version.


Oracle would be nice, more of a pain to install and configure though. Not sure how easily it installs on a mac, but on solaris I had to make changes to /dev/proc and tweak the memory settings or Oracle would not even load.


As far as medium-duty databases go, MS SQL is actually one of my favorites... never had problem with an MS SQL server, and setting up data links between them is easy.
We've had Oracle crap out a TON of times at work, including some issues that even Oracle consultants couldn't figure out.

Also keep in mind that Oracle didn't even support the "INNER JOIN" syntax until version 9 I believe, and there may be other differences between Oracle and MS SQL today, which may cause headaches in your assignments.
Doing outer joins in oracle is a different syntax than MS too.
 
K

Kokopelli

Guest
Oracle is the best IMHO but it is a bit of a dark art getting it installed and running optimally. Then DB tweaking is another dark art. Finally you really should have a ull time administrator, something you can get away with having as a part time duty for most other DBs not under heavy use.

I have never had a problem with MS SQL Server, it is dead simple to install and maintain. I seem to use Oracle, DB2, and Postgres more often though. MySQL is OK, just not for me. SQLite is cool for apps where you need and embedded DB but not for learning. Finally Cloudscape has potential as well if you are writing in Java.
 
D

davidwanat

Guest
For you home PC you can download MSDE (Microsoft Database Engine) it the same guts as MS SQL Server, but limited client connection wise.

Just look for MSDE 2000, it's a free download. Then you can run yor SQL statements on it.

BTW, MS SQL uses different TSQL then Oracle and MySQL. They all do things a bit differently. No so much that once you know what you're doing it's a problem, but when you're just learning, it's best to follow what your instructor says.
 
Joined
Aug 28, 2004
Messages
234
Reaction score
0
Points
16
Yeah at school the servers run on each workstation. I actually just downloaded Microsoft SQL Server 120 day trial which is perfect since only 2 months left of class. Just installed it on my Dell it's the same we use at school so all is well! Thanks!
 
Top