Ask HN: I want to start learning about databases, where should I start?
21–30 of 38 posts
Re: Ask HN: I want to start learning about databases, where should I start?
#222) read up on some database theory
3) check out a few popular options: sqlite, mongodb, couchdb and play around a bit more.
4) find a big dataset that interests you, load it into one or more of the databases you want to experiment with, and experiment away by trying to extract interesting data, etc. Notice how each one performs, etc.
Re: Ask HN: I want to start learning about databases, where should I start?
#23Relational 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…
Re: Ask HN: I want to start learning about databases, where should I start?
#24The only thing you really need to understand about databases is that they store data for you, ie. they persist data. So once you get that then you start asking questions like "where" and "how". The "where" is on hard drives. Don't let anyone tell you that a purely memory resident data store is a database, it's not. It's a cache. If you aren't writing to disk you are not a persistent database. Think memcached and redi…
First, databases are not "just" about persistence, and I don't mean that in a pedantic way. The point of a database management system is to manage your data over time and allow you to make use of it. This includes things like stating constraints to ensure that the data in the database is always correct and providing methods for querying your data at varying levels of complexity.
Second, there are a number of in-memory databases. Oracle sells one. SQLite is often used as one. The fact that they are in-memory does not make them not databases.
Third, relational versus non-relational is not really an argument about "how the data is stored on disk" or about being "standards compliant." A database traditionally consists primarily of three things: a data model, a query language, and an implementation. A data model, like "everything is a table with column headers and rows" can be written to disk in many different ways and queried in many different ways. (It's an abstraction.) Indexing structures and data formats may be mostly the same even when the data model is different. The (current) "relational vs non-relational" debate, such as it is, is usually about whether it makes sense to change the data model and query language in order to ensure that the implementation is scalable on "cloud-like" platforms with specific data access needs. (That said, there are many different types of non-relational models and query languages designed for different purposes.)
Fourth, there isn't one SQL. There are in fact a number of standards, SQL-86, SQL-89, SQL-92, and so on. It makes sense to learn the standard first (at least up to 92 or so), rather than learning particular implementation specifics. Most databases implement SQL-92 or above, though there is somewhat wide variance in additional features like indexing structures and functions and in data modeling languages.
Re: Ask HN: I want to start learning about databases, where should I start?
#25There are three main free software SQL databases: MySQL, PostgreSQL, and SQLite. Don't use MySQL, it'll get you into a great deal of bad habits, is missing an ass-ton of useful features (the default engine doesn't even support transactions), and likes to corrupt data. It also has questionable licensing and is owned by Oracle (a commercial database vendor) which as you can imagine doesn't have a lot of incentive to improve it.
SQLite is a very robust database that is great for read-mostly sites (like blogs) and for embedding into applications (Firefox for example). Its primary limitation is that there can only be one writer at a time. It is very easy to pick up and get going with since there's no persistent daemon, you just point it at a file and start writing. I'd recommend starting here.
PostgreSQL is the more featureful database and supports hundreds of concurrent connections, locking, access control, etc. This is the real "workhorse" database you're likely to find in production at large sites that do make use of free-software RDBMS. Eventually you will need to use something more powerful than SQLite, and this is probably it.
Re: Ask HN: I want to start learning about databases, where should I start?
#26Re: Ask HN: I want to start learning about databases, where should I start?
#27If 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…
Re: SQLIte, OReilly is coming out with a new book, Using SQLite , in August. It's not clear to me how much of an introduction it offers to SQL (versus SQLite specifics), but I'm guessing there's some introductory material in there as well. http://oreilly.com/catalog/9780596521196/
If you want a more academic treatment, I would recommend C. J. Date's _An Introduction to Database Systems_.
Also, it's been my experience that books which claim to cover relational databases in general, but which actually assume MySQL throughout, are usually pretty bad.
Re: Ask HN: I want to start learning about databases, where should I start?
#28First learn Relational fundamentals correctly from Chris Date and Fabian Pascal, then branch out into other more trendy stuff like NOSQL. http://en.wikipedia.org/wiki/Christopher_J._Date http://en.wikipedia.org/wiki/Fabian_Pascal
Be warned that he's got an axe to grind - He's often critical of SQL because it doesn't live up to the mathematical elegance of the relational model. (I happen to agree with him.) He knows his stuff, though.
Re: Ask HN: I want to start learning about databases, where should I start?
#29The only thing you really need to understand about databases is that they store data for you, ie. they persist data. So once you get that then you start asking questions like "where" and "how". The "where" is on hard drives. Don't let anyone tell you that a purely memory resident data store is a database, it's not. It's a cache. If you aren't writing to disk you are not a persistent database. Think memcached and redi…
I want to be careful in how I phrase this, because I feel like this was a good effort, but I disagree with many parts of this description. First, databases are not "just" about persistence, and I don't mean that in a pedantic way. The point of a database management system is to manage your data over time and allow you to make use of it. This includes things like stating constraints to ensure that the data in the data…
For books, I've heard good things about http://www.amazon.com/Fundamentals-Database-Systems-Ramez-El..., though I haven't read it myself.
Re: Ask HN: I want to start learning about databases, where should I start?
#30First learn Relational fundamentals correctly from Chris Date and Fabian Pascal, then branch out into other more trendy stuff like NOSQL. http://en.wikipedia.org/wiki/Christopher_J._Date http://en.wikipedia.org/wiki/Fabian_Pascal
A more specific recommendation: _An Introduction to Database Systems_ by C. J. Date. Be warned that he's got an axe to grind - He's often critical of SQL because it doesn't live up to the mathematical elegance of the relational model. (I happen to agree with him.) He knows his stuff, though.