Live data from Hacker News

Ask HN: I want to start learning about databases, where should I start?

news.ycombinator.com

1–10 of 38 posts

Re: Ask HN: I want to start learning about databases, where should I start?

#2
I recommend checking out Apache Friends site download XAMPP. That will set up a fully functional web environment (Apache, PHP, MySQL) which will let you play a bit with database. It also comes packaged with PHPMyAdmin, which is great for learning how to create tables and the like.

Also, you'll need to learn SQL. Check out http://www.w3schools.com/sql/default.asp for a good primer on the subject.

Re: Ask HN: I want to start learning about databases, where should I start?

#3
I think it depends also on what strengths you already have and how you are personally motivated to learn. For example, I have found java's h2 database to be easy to work with (and you never have to leave java). I don't think any db could be easier to get started with and have less administrative overhead than sqlite. If, to learn how to program computer games, one is advised to first write tetris, to learn programming with databases, you might write a message board.

Re: Ask HN: I want to start learning about databases, where should I start?

#5
If you want to learn more than just how to use a database I recommend Ullman's and Garcia-Molina's "Database Systems: The Complete Book."[1] It has overview of classic topics such as relational algebra and calculus, practical topics such as using a SQL database, and the second half is devoted to an overview of how databases are actually implemented. Unfortunately I don't know of a book that will introduce you to things like column-stores and such, my knowledge comes from reading papers on them.

[1] http://www.amazon.com/exec/obidos/ASIN/0130319953

Re: Ask HN: I want to start learning about databases, where should I start?

#7
Relational databases are no longer fashionable, but they are backed by some great theory and they remain very important in commercial practice. Read http://philip.greenspun.com/sql/ for a quick introduction, but use http://www.postgresql.org/ rather than Oracle for the exercises/examples because it's much easier to install.

I trust you'll have no shortage of recommendations about CAP, column-based stores, and support for schema flexibility in other comments.

Re: Ask HN: I want to start learning about databases, where should I start?

#8
If you use Firefox or a similar program that makes use of SQLite, that would be the best place to start -- you'll get experience working with a database populated with real data that is relevant to you, and one that has been designed for practical use instead of just a book example.

Copy ~/.mozilla/firefox//*.sqlite into another directory and start playing with those files. It should be easy to come up with things you want to find out. Start with some basic single-table ones like 'what are my 10 most visited pages'. Then expand to use multiple tables ('what are my 10 most visited pages that I have not bookmarked').

Once you have an idea of how queries work, think about the database design and the decisions that led to it -- why did the developers choose to relate tables to each other that way? What kinds of queries are the indexes there to optimize for?

Once you've done this, rinse and repeat with a variety of programs so you can get multiple perspectives. http://www.sqlite.org/famous.html or google around for others.

Re: Ask HN: I want to start learning about databases, where should I start?

#9
I always thought that "Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design" by Michael J. Hernandez was a great starting point. Sometimes it's nice to have a real book and you can't go wrong with a used one from Amazon for under 5 bucks.

http://www.amazon.com/Database-Design-Mere-Mortals-Hands/dp/...

Re: Ask HN: I want to start learning about databases, where should I start?

#10
post #8

If you use Firefox or a similar program that makes use of SQLite, that would be the best place to start -- you'll get experience working with a database populated with real data that is relevant to you, and one that has been designed for practical use instead of just a book example. Copy ~/.mozilla/firefox/ /*.sqlite into another directory and start playing with those files. It should be easy to come up with things y…

SQLite is such a beautiful program. It doesn't do much, but what it does do, it does very well. If I need to analyze some data, say in a logfile, I'll often write a trivial bit of Python to load it into SQLite and do my work in SQL. For a few 10s of Gs of data, this works brilliantly. I'd go so far as to say it's the least-buggy program I use day to day, and that includes the OSs I run it on and "real" commercial databases.
Post reply on HN