
|
View Full Version : Which one is better?
ultranet 10-22-2006, 07:21 AM I m looking to start a database website..
what i want to know is which database should I use
mysql or oracle? which one is better and simple?
and about programming which is better.. PHP or ASP.. I heared ASP doesnt have security advancement than PHP.. is that true..?
glad to get help.., thank you
dale1991 10-22-2006, 07:35 AM I would go with Mysql and PHP as they are known to be safer and are opensource wich means there free, But asp and oracle are not.
Hope this help you.
astellar 10-22-2006, 09:02 AM It depends on your website goals.
If you plan to run scalable, hi-load web application - think twice before start it on PHP. APC and Eaccelerator will help you with performance, but you will get lots of problems - no shared memory, no connection pooling, poor development toolsets and as final - bad stability. I don't want to say PHP is bad - lots of success projects uses PHP, just think twice.
mwatkins 10-22-2006, 09:56 AM I would go with Mysql and PHP as they are known to be safer
Define "safer".
mwatkins 10-22-2006, 09:59 AM If I get to pick the infrastructure for a project, and that project actually *needs* a SQL database (many do not), then Postgres running on FreeBSD is top of my list. An advanced DB on a solid operating system. Python is my application language of choice.
maxymizer 10-22-2006, 10:54 AM Many people here use php/mysql or python/postgresql or asp.net/mssql. Asking which is better is starting a flame war :)
Free solutions are: php/mysql and python/postgresql. Regarding stability and withstanding the load, there are several websites that run php/mysql such as flickr, and google employees use python for some web-related development.
Also, language security doesn't mean that someone won't leave some holes in the scripting since many people still fall to traps such as sql injections, which actually have no connection with the language whatsoever, but with developers' little knowledge :)
So what does all of what I've said mean - if you know any of mentioned languages/databases - go with that, you won't make a mistake if you know what you're doing (or if a person you hire knows what they're doing).
And remember - there is no better or the best, you'll just start a flame war between people who favor one or another combination of languages / databases.
mwatkins 10-22-2006, 03:33 PM Sure you can define "better" when doing language comparisons without starting language and database wars, as long as you are willing to break down the subject into managable bits and look at them objectively.
MySql is ubiquitous among web hosts; Postgres less so. There are many Python (and Ruby) apps supporting MySql as a primary target. My personal preference for Postgres is that it truly is a more capable database when looked at in the big picture, and since I control the environment that my apps run on, I get to pick that which I prefer, not that which a million web hosts have picked, mostly because MySql was picked for initial support by a cPanel or other control panel product.
So we could say that PHP is "better" for those who want maximum choice to run a particular app on a million web hosts.
We could say definitively that the object oriented nature of Python or Ruby far surpasses the design found within PHP. We could also say that the design of Python and Ruby deliver increased programmer productivity as compared to PHP. In fact, some years ago I gave up PHP for that very reason, having compared a system I built in PHP to a similar system built using Python. I've not gone back since.
We can also say that Python overall outperforms PHP from a raw performance perspective. We can also say that Python runs on more platforms than PHP.
We can say that there are more PHP programmers than Python or Ruby programmers, suggesting that it may be easier to find developers for the former, possibly suggesting that the latter might command higher fees.
We can say that Postgres scales better than MySql as concurrent loads increase.
So yes, there are all sorts of things we can say as to what is "better" but we really need to break apart the question into much smaller pieces before even starting. Why shut down the subject, when the original poster appears to be wanting to explore such things.
maxymizer 10-22-2006, 03:57 PM I'd shut down the subject exactly because there are people like you that prefer one platform and will do anything to promote it as the best there is.
Instead of arguing which is better, I'll take my time to earn some $$ by actually going to work ;)
ultranet, good luck with whatever language and database you choose, cheers.
mwatkins 10-22-2006, 07:12 PM I don't need to argue; I really don't care whether anyone uses Python or MySql or Postgres or Ruby and Ruby on Rails.
The point I'm trying to make is that there are many quantifiable differences between various platforms and its perfectly possible to discuss those differences without the discussion resulting in a simple flame war, provided that facts predominate the discussion, and opinions are highlighted as such.
If you don't agree with my assertions regarding MySql or Python or PHP or Ruby or Postgres, fair enough. Feel free to counter with opinions, or facts, preferably the latter where possible.
I've always said that PHP has a place, and that MySql can be used successfully. I can say that while at the same time point out that certain other platforms have advantages. Some of those advantages are substantial and can offer significant performance and time to market benefits. Some might never be realized by a developer, particularly those doing work closer to the simple, or basic end of the scale.
The original poster had asked for some guidance. I'm trying to point out differences which can be measured.
Frankly I think its easier for a green developer (we can probably safely assume that the OP meets that criteria based on the questions asked) to pick up PHP. However if someone is embarking upon a web development career, in my opinion it would be better to start off with more powerful tools that can be used for a wide variety of purposes from general purpose scripting right on up to cross-platform GUI application development.
mwatkins 10-22-2006, 07:41 PM Continuing on with the quantifiable... Here's a reasonable comparison of three significant web application "frameworks": Django (Python, MySql), Ruby on Rails (Ruby, MySql), and Symfony (PHP, MySql):
http://www.symfony-project.com/forum/index.php/mv/msg/2272/0/0/
Read the thread through, including the push-back from Symfony users.
Chances are that the OP isn't in a position yet to accurately evaluate the numbers and discussions therein. I can shed some light. First read the article linked above.
Now lets consider Symfony, Django, Ruby on Rails, and "unspecified web framework X, which is built using Python, like Django". The applications are all similar, a "Recipe" collection manager. For an article / tutorial I am writing I wrote a similar application using "unspecified web framework X".
The original benchmark used `siege` to simulate high load on a web application - the sort of thing that might occur from a slashdotting. Fine, lets roll with that - 3 minute tests, 50 concurrent users, all frameworks. Here's how they all stack up:
Typical benchmark command: % siege -c50 -t180s -b http://localhost:8005/2/
Framework Transactions Failed Throughput Trans Rate Technology
XXX(*) 56554 0 0.45 MB/sec 313.66 trans/sec Python, OODB
Django(1) 22459 0 0.17 124.74 Python, MySql
Rails (2) 15415 0 0.11 85.33 Ruby w mongrel, MySql
Rails (3) 15875 0 0.12 88.15 Ruby w FastCGI, MySql,
Symfony(4) 8586 0 0.06 47.67 PHP w APC, MySql
Symfony(5) 2256 15 0.02 12.41 PHP w/o APC, MySql
(1) Django result was for 30 minutes, interpolated for 3.
(2) Rails result interpolated for 3
(3) Rails w/o Mongrels, actual run was 3 minutes
(4) PHP with APC accelerator
(5) PHP without APC accelerator showed transaction failures
(*) XXX is a production Python python framework which is the subject of an upcoming article and tutorial.
The results speak for themselve, don't you think?
maxymizer 10-22-2006, 08:16 PM Yes, I'll convert all the work I've done to Python since it's so awesome and this benchmark that's undisputed proves it. Thank you for opening my eyes mwatkins, I am really grateful.
mwatkins 10-22-2006, 08:35 PM What a witty display of sarcasm. Why do you even bother commenting on threads like this, if you are not willing to discuss matters in a rational manner? Why not back up your opinion with some facts or research, or at least be open to the ideas of others?
Accuse me of being biased all you want, but at least I try to back up my opinions with information and specific details -- I've not seen very much of that from you.
As for the benchmark, all but mine are based off of published code and mine will be published shortly. All can be replicated easily. I wouldn't publish my results here today if I wasn't confident in my work, because I certainly expect others to poke at it. This isn't my first time around the block.
maxymizer 10-22-2006, 09:13 PM I won't post anything since I'm not even remotely interrested in speed comparision of available languages. First of all, majority of data sets I work with are parsed at the RDBMs and I never handle large data sets within the language I currently work with.
Second of all, that benchmark compared frameworks. Frameworks can be badly written, and also you're mentioning OO capabilities of Python. Correct me if I'm wrong, but OO isn't necessarely the best approach to developing a certain app as people misuse it often.
I gave my advice, but I couldn't bare NOT to reply to your post where you boast Python as the best there is. Ok, you're good at it, it suits your needs, you did some work with PHP and you don't like it. I retain my right to at least be sarcastic.
mwatkins 10-22-2006, 09:16 PM Incidentally - the server I ran my benchmark on is substantially older than that which drove the benchmark in the article referenced above. They used a Dell 1U Dual Xeon 3.2Ghz machine w 2GB RAM.
The test machine I used for the Python "X" framework benchmark is a 4 or 5 year old dual CPU Pentium III Intel server 1.26Ghz w 2GB RAM.
mwatkins 10-22-2006, 09:19 PM I've never boasted that Python is the best there is. How could I?
I m looking to start a database website..
what i want to know is which database should I use
mysql or oracle? which one is better and simple?
and about programming which is better.. PHP or ASP.. I heared ASP doesnt have security advancement than PHP.. is that true..?
glad to get help.., thank you
Here we go, another flame of the month ... There are two things you need to understand:
1) Define requirements for your project. Don't ask which one is better, ask which one has features that your project requires.
2) Both PHP/MYSQL and ASP.NET/MSQL are FREE. No one mentioned that but Microsoft technology is free.
Since the OP is just starting out, I would recommend MySQL. It is the easiest to get up and running on, as well as being widely used so there are many articles/tutorials out there. Oracle has a crippled free version, and has a lot of advanced features that you probably don't need. I would also echo the recommendation for Postgres, but it can be tricky to setup for first timers. As for PHP vs ASP, go with the one you know more right now. There is no point in learning a whole new language when you are just testing the waters. After you build version 1.0, you will be in good shape to decide if you need to change to another platform. Good luck!
|