Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 MySQL vs. SQL Server

Author  Topic 

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-04 : 07:26:09
Hi everybody,
One of my friends told me that MySQL is a cheaper alternative to SQL Server and that it is almost similar to it. Is that true ? If yes, how far ? If not, what are the differences and what is lacking or better in it ?


Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-08-04 : 08:20:42
quote:

what is lacking


Foreign keys, transactions, hot backups, you know, the sorts of things you need before you have a relational database.
(Unless you use the InnoDB backend)


Go to Top of Page

JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2002-08-04 : 13:15:28
Don't forget stored procedures!

Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-05 : 01:25:25
What would be lacking if I used MySQL with the InnoDB backend ? Is the Transact-SQL syntax similar to that of SQL Server ?




Edited by - Utpal on 08/05/2002 01:26:13
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-08-05 : 03:35:07
No idea. It was just that I was about to make a generalized statement about MySQL -- which I've only had only the slightest experience of -- so I thought I'd better check my facts.


Go to Top of Page

LarsG
Constraint Violating Yak Guru

284 Posts

Posted - 2002-08-05 : 05:39:57
Mysql has a rather limited SQL support. No subselects, no scalar queries, no derived tables for starters.
Both Mysql and Mssql has quite a few (dissimilar) non-standard features (i.e. date and time) so moving between those two could be qutite a job.

Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-08-05 : 08:40:56
It's a toy.
Subqueries exist in version 4, as do Stored procedures (if you write them in PERL!!!! WTF). But as a recent Slashdot thread has revealed, people have been having stability problems with version 4.

It's biggest problem is that it doesn't support foreign keys and referential integrity, which, as far as I am concerned, makes in NOT a relational database.

If you want to use a free DB on Linux, maybe look into PostgreSQL

Damian
Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-05 : 09:08:17
Thanks to all ! Damian, does PostgreSQL run on Windows ?

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-05 : 09:17:44
You can look here:

http://www.postgresql.org/
http://www.ca.postgresql.org/users-lounge/docs/faq.html

And here's some Windows-specific info:

http://www.ca.postgresql.org/docs/faq-mswin.html

Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-08-05 : 09:20:30
quote:

Thanks to all ! Damian, does PostgreSQL run on Windows ?





I wouldn't bother. If you wanted to run it, do it on some form of Unix

Damian
Go to Top of Page

Scott
Posting Yak Master

145 Posts

Posted - 2002-08-05 : 10:11:23
If all you are looking for is cheaper and don't expect having many clients MSDE is great.
Even better if using as a backend web DB where queries are quick and you use connection pooling.

Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-06 : 01:37:06
Thanks to all !

quote:
I wouldn't bother. If you wanted to run it, do it on some form of Unix


Is PostgreSQL not efficient on Windows ? I am not considering Unix because in India small & medium sized companies use only Windows. What about its syntax, is it similar to that of SQL Server ?

quote:
If all you are looking for is cheaper and don't expect having many clients MSDE is great.
Even better if using as a backend web DB where queries are quick and you use connection pooling.


I was considering using MSDE until someone told me that its performance drops drastically if more that 5 queries are fired simultaneously. The type of clients which I am anticipating could have more than 5 clients running reports simultaneously.



Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-06 : 08:31:57
quote:
Is PostgreSQL not efficient on Windows ?
From what I can gather, you have to compile the PostGreSQL code on your Windows machine (!), I cannot find a pre-compiled executable file for download. Plus, in some instances you have to install a Unix shell-type layer in order for it to work. (I have to admit though, looking through the features list, PostGreSQL is pretty damn cool!)

I can't speak for the actual performance of this, but I find it hard to believe it will perform better on a Windows platform than SQL Server would. The same applies to just about any other database product. The fact that SQL Server is completely tied into Windows is both its strength and weakness; it can only run on Windows, but it is also the best database server on Windows.

MySQL might be faster than SQL Server, but only because it does not have the features that would, by necessity, slow it down (foreign keys, subqueries, transactions, etc.) I'm not too impressed if it's even twice as fast as SQL Server; SQL Server is probably doing 5 times as much work.

As far as SQL syntax, you're better off learning the ins and outs of each product you use than looking for something that's "similar" to what you have now. PostGres has some quirks that SQL Server doesn't, and vice versa. If you try to write vanilla SQL that works with all products, they'll all perform less than optimally (the Snitz forum code that SQL Team uses is a prime example...until graz tweaked it)

And take a look here:

http://www.softwareli.com/sql2000servers.html?source=google

Granted these are U.S. prices, but $7,000 for an Enterprise license is not that expensive, and it's the most expensive of the versions listed. Don't forget that you also get Analysis Services, DTS, English Query, XML support, and Replication for that price. And what about a hosted SQL Server? It'll be cheaper in the short-term.

Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-07 : 02:27:01
Thanks a lot Robvolk !

quote:
As far as SQL syntax, you're better off learning the ins and outs of each product you use than looking for something that's "similar" to what you have now.

The reason I am looking for similarities in syntax is because I want to keep the option open to migrate to SQL Server in the long run when the company can afford it.

quote:
Granted these are U.S. prices, but $7,000 for an Enterprise license is not that expensive, and it's the most expensive of the versions listed.

It maybe not that expensive to U.S. companies, but to Indian companies it amounts to 7000 X 50 = Rs.350,000. The Standard edition would cost 3900 X 50 = Rs.195,000. No wonder 90%(a guess) softwares in India are pirated and no one ever says a word about it. But I want to play safe.

quote:
And what about a hosted SQL Server?

Do you mean a SQL Server in a web farm accessible through a web site ? That's a great idea. Wouldn't that be slow ?

I was reading the FAQ in the PostgreSQL site and came across the question "What languages are available to communicate with PostgreSQL?". The answer to that did not include Visual Basic. Does that mean that I cannot use VB as a front end to PostgreSQL ?




Edited by - Utpal on 08/07/2002 02:29:58
Go to Top of Page

adhik
Yak Posting Veteran

66 Posts

Posted - 2002-08-07 : 04:04:31
Hi robvolk,

As far as u know abt. MySQL, is not pure relational database, also it doesn't support Stored Procedure,
So how come it faster than SQL server which has precompiled SP, which r redy to give output?
Also it lacks in may security features.

Regards
Adhik
Go to Top of Page

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2002-08-07 : 05:46:21
I always wonder what kind of SQL servers people find when there is will for an application and no money. I understand the fact that IT is expensive but on the other hand its a long term strategic decision a company makes when deciding on a business application.

Utpal, as far as I understand it, the company wants something that the company can't afford. Sure there are many free DB's that could take the job of a serious one (MSSQL, DB2,...) but consider this: "If you'll develop the APP you'll be responsible for the data!"

In the begining the companies always focus only on budged (price), the serious things as data storage, data security, expandability, compatibility,... come later and have a much greater impact than price.

My suggestion to you: "If they can't afford a serious project with a real budged then DON'T DO IT!" I wouldn't want to be in your shoes when push comes to showe and I've seen it a lot!

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-07 : 09:07:42
quote:
As far as u know abt. MySQL, is not pure relational database, also it doesn't support Stored Procedure,
So how come it faster than SQL server which has precompiled SP, which r redy to give output?
It's faster because, as I said earlier, it doesn't perform a lot of data integrity functions that true RDBMS systems do. It's no great trick to get a fast database when all it's doing is reading data off the drive.

And take a look at this:

http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#ANSI_diff_Foreign_Keys

I love their talk about the "disadvantages" of foreign keys:
quote:
Disadvantages:

-Mistakes, which are easy to make in designing key relations, can cause severe problems-for example, circular rules, or the wrong combination of cascading deletes.

-A properly written application will make sure internally that it is not violating referential integrity constraints before proceding with a query. Thus, additional checks on the database level will only slow down performance for such an application.

-It is not uncommon for a DBA to make such a complex topology of relations that it becomes very difficult, and in some cases impossible, to back up or restore individual tables.
All of these statements are complete utter bullshit. The people who wrote them have NO CLUE about relational databases. Basically they're saying "We don't know how to get these to work properly, and even if we did it would slow down our database to the point where you would have no reason to use it."

And there used to be a blurb ON THE MYSQL HOME PAGE about someone complaining, "Why doesn't MySQL have foreign keys?" and one of the developers replied, "Who uses those?" I think that got passed around to quite a few web sites and they finally had the good sense to take it down.

Granted, they do say that MySQL is not really a relational database, but it doesn't excuse the misinformation they're posting about foreign keys and other features that they don't support, in order to convince people that these features aren't necessary because they SLOW PERFORMANCE.

InnoDB improves on a lot of things, but it's designed using a lot of Oracle methods for things like locking and transactions, so it won't work and play well with a SQL Server setup (plus InnoDB has no query optimizer)

I totally agree with rihardh: if the client can't or won't put up the money for something solid, they're not serious about their business needs, and you'll only meet a lot of grief on this project.

Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-08 : 01:36:27
quote:
My suggestion to you: "If they can't afford a serious project with a real budged then DON'T DO IT!" I wouldn't want to be in your shoes when push comes to showe and I've seen it a lot!


Actually I am developing a standard inventory package, keeping in mind the budget of medium and small sized Indian companies. I am trying to make it flexible to adapt to the budget of maximum number of companies. If a company could afford, it could use SQL sever, if not, a near substitute (of course not as good), which was what I was looking for. But it looks like, there is no alternative other than MSDE for small sized companies. The speed might get slow, but atleast the data would be safe.

quote:
And what about a hosted SQL Server?

Do you mean a SQL Server in a web farm accessible through a web site ? That's a great idea. Wouldn't that be slow ?

I was reading the FAQ in the PostgreSQL site and came across the question "What languages are available to communicate with PostgreSQL?". The answer to that did not include Visual Basic. Does that mean that VB cannot be used as a front end to PostgreSQL ?



Go to Top of Page

Onamuji
Aged Yak Warrior

504 Posts

Posted - 2002-08-08 : 02:29:06
If you really want to make it multi-database capable what I did for one such project was make DLL's that had the same routine calls that did certain jobs through the data provider and returned data ... then you could figure out which db they are using and load that dll for data access when the application starts ... its quite simple ... it would allow for optimized queries for one...

Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-08 : 07:58:56
quote:
If you really want to make it multi-database capable what I did for one such project was make DLL's that had the same routine calls that did certain jobs through the data provider and returned data ... then you could figure out which db they are using and load that dll for data access when the application starts ... its quite simple ... it would allow for optimized queries for one...


That would take care of the front-end programming, but what about the back-end programming including foreign keys, triggers, stored procedures, views etc. ? Those are unique to every database. Besides, I never meant readymade muti-database capable. I want to have one robust package for companies which can afford it and another economical one for demo and smaller companies. The front-end source code could be same, except for the string parsings to the database to use database objects.

Edited by - Utpal on 08/08/2002 08:07:17
Go to Top of Page

aclarke
Posting Yak Master

133 Posts

Posted - 2002-08-08 : 20:20:09
quote:

Does that mean that I cannot use VB as a front end to PostgreSQL ?



PostgreSQL has an ODBC driver, so you can use anything you want as long as it will communicate via ODBC.

I haven't done much with PostgreSQL beside install it (yet), but I'm looking forward to using it more! Is it a REQUIREMENT that the databse run on MS Windows? Although PostgreSQL WILL run on Windows (via cygwin), why bother? You've already stated that you have a budget (don't we all) so why spend $$ on Windows when you don't have to? And if you're willing to pirate Windows, well, umm, I'll say no more...

And to you, Robvolk, SQL Server is pretty expensive, IMHO. My main client is an successful (wow!) e-commerce outfit and I can't even in good conscience recommend that they upgrade from v.7 -> 2000. It's just not worth it for us. I'd be much more likely to recommend that I port the site over to postgreSQL and run it under linux. The M$ tax really does start to add up after a while. Just start adding up your development, test and live servers...

Go to Top of Page
    Next Page

- Advertisement -