SQL Tutorial Ebooks

Pho3nix

The Legend
Joined
Jul 31, 2009
Messages
32,826
Reaction score
3,033
Location
On the toilet
Hi guys,

Looking to work on my SQL skill's but are there any ebooks you guys can recommend? Lol if you guys have the time, are there any smallish SQL problems you can give me that I can work on to get my skills up.
Any help would be appreciated. :)
 
Not exactly an ebook, but take a look at the W3Schools SQL tutorial. It's where I learned my basic SQL.

If you have more time, and want to learn in a more structured manner about databases in general (theory and application), I highly suggest you check out the Introduction to Databases class offered free online by Stanford university. Unfortunately the class is already over, but you can still watch the videos. I think there are also plans to offer the assignments/quizzes/exams as well, but I'm not sure how far along those are at the moment.
 
Not exactly an ebook, but take a look at the W3Schools SQL tutorial. It's where I learned my basic SQL.

If you have more time, and want to learn in a more structured manner about databases in general (theory and application), I highly suggest you check out the Introduction to Databases class offered free online by Stanford university. Unfortunately the class is already over, but you can still watch the videos. I think there are also plans to offer the assignments/quizzes/exams as well, but I'm not sure how far along those are at the moment.

Yeah I agree, spend the time and learn how to design efficient databases. Pretty much anything you can find regarding relational database design is definitely worth the read
 
Well right now my senior has given me some Excel spreadsheets to Normalize and I honestly have no idea where to start as tomorrow said Normalized tables will be put into SQL :wtf:
Do these books also mention anything around that?
 
Last edited:
http://en.wikipedia.org/wiki/Database_normalization

Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy and dependency. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.

Basically think of it as the lazy approach to data capture. You want to design a database where you only need to enter something once, and then only create and remove links between them. Yes, there is quite a bit more involved, but this should get you started.

Note: Very few databases are actually designed in full normalised form: This is, in general, not efficient enough. You have to normalise, but you have to know when to stop.

To a degree most columns in your spreadsheet will be fields in your database. I tend to dump excel spreadsheets as is into a database table, then run extraction and transformation routines on that table to populate the rest.
 
I usually stop at 3NF, the design is pretty efficient by then. Normalization isn't a concept you'll find in a book about SQL, like I said, find some books on relational database design and work of them.
 
In laymans terms normalisation basically means that you never have the same data in more than 1 table.

A good example is an address book.
You identify that you need 2 entities in your app. People and places. These are 2 "things". These entities usually become 2 tables.

Table 1: Persons with name, date of birth, gender etc
Table 2: Places or Addresses which just stores address line 1, 2, etc.? Post code, countries

Now you want to link them, so you create a 3rd table, called, person_addresses, which only stores the links, such person Id and address I'd and maybe a start date.

You now have a database design which is normalised. The main point is that if people move, you don't need to capture the address twice, only update the linking table.

In real life, these 2 tables are but a subset of a larger app and people moving isn't a factor. To avoid the extra join, the address table and person table are merged into 1 table. Let's call it a customer table.

You have now de-normalised :)
 
I've got several years of experience with SQL, but busy doing a Databases module as part of my degree now, that's really amazing.

Author Rob, P., Coronel, C.
Title Database Systems: design, implementation and management
Year Published 2008
Edition 1st
Publisher Cengage

It not only does SQL, but also the logic and design around it.
 
I've got several years of experience with SQL, but busy doing a Databases module as part of my degree now, that's really amazing.

I'm doing the same module (the 2nd year one), though I bought the book second-hand and it's the 2007 version.
 
Top
Sign up to the MyBroadband newsletter
X