Database programming help!

Off topic discussion zone.

Moderators: winston, another_commander, Cody

Post Reply

You think learning database programming helps on learning other codes?

Poll ended at Sat Jan 14, 2006 1:13 am

Yes
1
50%
No
1
50%
 
Total votes: 2

User avatar
Eli Santiago
Poor
Poor
Posts: 6
Joined: Tue Jan 10, 2006 7:22 pm
Location: Mex

Database programming help!

Post by Eli Santiago »

Hi, I was wondering if someone could tell me where to download a real My SQL manual, because the one mysql gives free is a reference one. And I would kindly apreciate any tips on learning.
I'm Always sticked to Lave and Zaonce $$$$
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

You don't need anything particularly MySQL - just pick up any good book on SQL then use the MySQL reference for the bits specific to the DB (administration, syntax quirks etc).
User avatar
Cyberian Tiger
Average
Average
Posts: 8
Joined: Tue Jan 10, 2006 10:11 am

Post by Cyberian Tiger »

If you're using *unix and you install postgresql it kindly installs man pages on SQL for you.

Most of which is applicable to mysql.

Alternatively the postgresql documentation is available online, I find it slightly easier to use than the mysql documentation.

Yes I am completely biased in favour of postgresql over mysql

-CT
User avatar
Flying_Circus
Dangerous
Dangerous
Posts: 118
Joined: Thu Dec 09, 2004 10:04 pm
Location: Hexham, UK

Post by Flying_Circus »

Database programming and admin are best learnt in their context, as well, I'd say. Running aa database as the backend to a website is a very different proposition to running it as a standalone, say, or even in a small network.

So, if, for instance, you mean "I want to leaarn MySQL to program PHP-based websites" (as an example) then a book specifically aimed at that use, such as this Ex-Wrox title, being republished by Apress http://www.apress.com/book/bookDisplay.html?bID=10017 (or even their dediicated e-commerce title), might suit you best. Apress is good, in this regard, actually: I know quite a few of the people Gary Cornell took on when Wrox went belly-up, and even though I only have one of their books in my own collection, ATM, I know that, as a team of people, they're good at producing good, focussed content.
And so I gave myself to God. There was a pregnant pause before He said "OK"
Image
User avatar
stevesims
Dangerous
Dangerous
Posts: 78
Joined: Wed Jun 23, 2004 4:07 am
Location: London, England

Post by stevesims »

I'd also like to say that PostgreSQL is a better database than MySQL.

Not only does MySQL allow you to do all sorts of nasty things that a real database won't let you (like use invalid dates) it ends up being incredibly slow if you try to do complex things with it. If you want a toy database then by all means use MySQL, but for a real database you're going to want PostgreSQL instead.

At my work we're currently based on MySQL. Some of the complex queries that our web site uses can take up to 20 seconds to execute when the server is quiet. Run two of those queries at the same time and they'll take about 4 minutes to complete. Run three at the same time and you're looking at 10 minutes. We're transitioning to PostgreSQL right now because of this poor performance with MySQL - the same queries take 4 seconds to execute, 8 if you're doing two at once.
User avatar
Eli Santiago
Poor
Poor
Posts: 6
Joined: Tue Jan 10, 2006 7:22 pm
Location: Mex

Post by Eli Santiago »

Well really i'm not interested on changing subject because matter or fact im studying because I have to learn it because it's Homework. So where can I download a good SQL Man?
I'm Always sticked to Lave and Zaonce $$$$
User avatar
Flying_Circus
Dangerous
Dangerous
Posts: 118
Joined: Thu Dec 09, 2004 10:04 pm
Location: Hexham, UK

Post by Flying_Circus »

Absolutely. Postgre is a great database - and it is BSD licensed, rather than GPL. The main argument against it and in favour of MySQL (i.e. that the only company commercially involved with its development had gone bankrupt, whereas MySQL AB seem unstoppable) is no longer the case, of course, with strong interest from a number of platform and DB vendors, vesting in Postgres. The other major gripe against it (i.e. that there wasn't a native Windows port) no longer applies, either, of course.

Many of the major arguments traditionally raised against MySQL have also vanished with this year's release of 5.0, of course, but as it has gained features, so too has it slowed down.

Simple installation ppackages for OS X exist for Postgres on Marc Liyanage's website http://www.entropy.ch/home/. He's a really nice bloke, and he runs an active BB on his website, for people learning to use this stuff.

MySQL themselves have an installer for OS X which is as good as you could wish foor.

Just remember to vacuum regularly ;).
And so I gave myself to God. There was a pregnant pause before He said "OK"
Image
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Comments on MySQL vs Postgres: it's about choosing the right tool for the right job. Not all databases need to do complex queries, and MySQL is relatively lightweight. Many high traffic sites work just fine with MySQL (Wikipedia, Slashdot etc.) but the data and queries are probably pretty straightforward for those. I wouldn't dismiss MySQL as a "toy database" - it fits some workloads very well.

The nice thing about them being both free open source software you can try both with no cost and no risk and just use the one that suits the task. For a small database, it probably doesn't really matter which one you use, it's probably only going to be important if you have complex queries or higher demands (either in throughput or certain features - I don't think MySQL supports views yet).
Post Reply