TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Best Book for learning SQL?

6 pointsby babyboy808over 16 years ago
I am trying to learn SQL, to work with MySQL. The main part I am having trouble with is getting my head round relationships (Querying, Updating and linking different tables together etc etc). What book do you recommended for learning SQl that maybe has a tutorial flow?

7 comments

silentbicycleover 16 years ago
It isn't specific to MySQL, but an excellent book for understanding relational databases is _An Introduction to Database Systems_ by C. J. Date. Reading that (even just the first several chapters, and then others as needed) will help you understand the mindset behind both SQL and relational databases in general. While I had figured out the basics of SQL on my own, I found that getting the big relational ideas made it much clearer why some schema designs are better, the intent behind some aspects of SQL that seemed strange, etc.<p>It has a new edition published every couple years (it's a textbook), so you can usually get the previous edition for quite cheap.<p>Also, note that a lot of the books on SQL deal specifically with MySQL, SQL server, etc., and don't always make it clear which aspects are the implementation vs. which are standard SQL. (I was learning with SQLite and Postgresql, so I probably got bit by this more than you will.)
评论 #454099 未加载
kqr2over 16 years ago
I actually recommend playing with sqlite. It's fast and easy to setup. You can work with it via command line or use a web browser plugin.<p>I can also recommend Mike Owens' book <i>Definitive Guide to SQLite</i><p><a href="http://www.amazon.com/Definitive-Guide-SQLite-Mike-Owens/dp/1590596730/" rel="nofollow">http://www.amazon.com/Definitive-Guide-SQLite-Mike-Owens/dp/...</a>
compayover 16 years ago
Joe Celko's "SQL For Smarties" and "SQL Puzzles and Answers" are classics in the field. They're still very relevant despite being 10+ years old, since SQL hasn't changed anywhere near as much as, say, Java in that time.<p><a href="http://www.celko.com/books.htm" rel="nofollow">http://www.celko.com/books.htm</a>
NonEUCitizenover 16 years ago
online: <a href="http://philip.greenspun.com/sql/" rel="nofollow">http://philip.greenspun.com/sql/</a>
评论 #454075 未加载
wigglywonkover 16 years ago
Skip the book. Find, read, and 'do' a few online tutorials, and you'll know over 90% of what you need to get going. Pick one specific to your engine of choice (MySQL in this case, it seems) and just go with it.
gtaniover 16 years ago
fromthat other site<p><a href="http://www.reddit.com/r/programming/comments/7n9q8/ask_proggit_what_are_some_good_books_for_learning/" rel="nofollow">http://www.reddit.com/r/programming/comments/7n9q8/ask_progg...</a>
morbidkkover 16 years ago
if you are completely new to this then Head First Sql would be good start