Learning the Rudiments of MySQL

Get help on databases - MySQL, Oracle, Access, etc.
Post Reply
User avatar
StarPhoenix
B.Soc.Sci, M.SocSci [UPCF]
Posts: 17634
Joined: 11 Dec 2003, 02:00
Processor: Core i5 3470
Motherboard: Gigabyte G1 Sniper Z77
Graphics card: nVidia GeForce GTX 1060
Memory: 8Gb DDR3 1600
Location: East London
Contact:

Learning the Rudiments of MySQL

Post by StarPhoenix »

Someone in management believes that I would be able to relieve our developers of some nasty spade work if I were to learn some basic HTML and a few MySQL statements.

I have HTML covered, I think, but what would be the simplest way of learning the easier bits of the abovementioned database software? I would prefer not to shell out hundreds of rands to buy a book, so if you know of any good online resources, please let me know about them.

Thank you
"Humankind cannot bear very much reality." T.S. Elliot
User avatar
hamin_aus
Forum Moderator
Posts: 18358
Joined: 28 Aug 2003, 02:00
Processor: Intel i7 3770K
Motherboard: GA-Z77X-UP4 TH
Graphics card: EVGA GTX680 SC
Memory: 32GB G.Skill Ripjaws
Location: Where beer does flow and men chunder
Contact:

Re: Learning the Rudiments of MySQL

Post by hamin_aus »

SQL is stupidly easy to learn.
mySQL is a stupidly simple DB

Get Toad or some other free front-end for mySQL and Google one of those teach yourself SQL in 7 days tutorials
Image
User avatar
rustypup
Registered User
Posts: 8872
Joined: 13 Dec 2004, 02:00
Location: nullus pixius demonica
Contact:

Re: Learning the Rudiments of MySQL

Post by rustypup »

MySQL CE - available for free - be sure to grab workbench while you're about it, (workbench is similar in function to sql studio - DB managment, query, analysis, etc, etc)

the most important thing to learn is that there is no better query structure than SELECT * FROM <TABLE>... this is, simply put, the most efficient approach to extracting data... especially if used on multiple tables.... multiple times.... every minute....
Spoiler (show)
in the event you missed it: the last bit's a lie... the best query is still DELETE * FROM TABLE WHERE 1=1
Most people would sooner die than think; in fact, they do so - Bertrand Russel
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Re: Learning the Rudiments of MySQL

Post by Anakha56 »

Also Google w3schools for some great learning material.

@rusty & hamin any other tips for sql query writing? I understand the query structure and what the commands all do my problem is in writing the queries :-(.

Sent from my HTC Desire to annoy hamin... :P
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
User avatar
rustypup
Registered User
Posts: 8872
Joined: 13 Dec 2004, 02:00
Location: nullus pixius demonica
Contact:

Re: Learning the Rudiments of MySQL

Post by rustypup »

Anakha56 wrote:any other tips for sql query writing?
my preference is for a nice, wide, 2B... not too hard, not too soft and it provides for a pleasing roundness in the script... it also transitions nicely between different media...

1) use the indexes!... labels may be more readable, but they're only there to slow things down... no point bothering with relational databases if you're not going to use the indexes...
2) never use "SELECT *" anywhere near production...
3) avoid IN() and LIKE like the plague..
4) NOLOCK can be your bestest buddy
5) UNION instead of OR
6) don't sort views unless there's a specific reason, (row_number()).. particularly if the view was created to plug into a report somewhere down the line...

there are a million and one of these...
Most people would sooner die than think; in fact, they do so - Bertrand Russel
Post Reply