Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    SQL for Web NerdsPhilip Greenspun

    SQL for Web Nerds

    Philip Greenspun · 2000

    Systems & OS
    Open LibraryAmazon
    Stats for nerds
    7recommend
    11mentions
    7people
    2008–2013years
    82% recommend18% neutral

    Mentions per year

    200820092010201120122013

    What Hacker News says

    1. andymoeJan 2013
      Start with sqlite (Easy to set up, file based, good for playing and for embedded systems) then PostgreSQL or MSSQL if you are going to be in Windows land. MySQL later if you have to. It's fallen out of favor in some communities since Oracle bought it and it's just not as powerful as PostgreSQL though it does the job.

      Also go buy the book "Joe Celko's SQL for Smarties" [1] (And everything else he wrote on SQL...) and actually learn what SQL and DDL is really all about how to properly model data. Lean some SQL and DDL before you start messing with ORMs like Rails Active Record or SQLAlchemy and all that stuff.

      [1] http://www.amazon.com/Joe-Celkos-SQL-Smarties-Fourth/dp/0123...

      Also, maybe just go read "SQL For Web Nerds" right now but take it with a grain of salt and again forget Oracle for now. It's old but good... http://philip.greenspun.com/sql/

      thread
    2. gautamcDec 2012
      My first real programming job involved building web apps using OpenACS - http://openacs.org/. OpenACS was all Tcl executing in AOLServer and used postgres or oracle. It was awesome.

      I Learned a lot from "Tcl for Web Nerds" and its companion "SQL for web nerds" (all links listed here: http://openacs.org/doc/ ). Back when I started Tcl, I was more like a emacs-lisp script kiddie. Because Tcl was so easy to learn and because OpenACS was such a great MVC style framework, it didn't take long to master the framework itself and dive into the interesting things that were related more with the architecture of a web-app and not just the syntax of a programming language.

      The "whereas" poem, as I like to call it, that announced Miguel Sofer's inclusion in the Tcl Core team was real fun to read too - http://code.activestate.com/lists/tcl-core/1983/

      Miguel Sofer had described an algorithm for representing hierarchical data in a RDBMS. What he put forward could be thought of as a different kind of a nested set representation. Whereas the nested-set approach involved keeping track of two numeric values (left & right) for each node in our relational records based tree, Miguel Sofer's algorithm would use the ability to lexically sort a base159 encoded string. This way, tree operations could be implemented via sub-string matching and sorting.

      His algorithm was implemented in OpenACS because it allowed an efficient implementation of the OpenACS nodes table. Each URI in OpenACS has a node record associated with it and all these nodes are hierarchical records - http://openacs.org/forums/message-view?message_id=16799

      The OpenACS nodes system allows the implementation of a fine grained permissions system which enables a child node to auto-magically inherit the permissions of its parent node - this is, if the child node didn't have any specific permissions set on itself - http://openacs.org/doc/permissions-tediously-explained.html

      When I was learning ruby I implemented this algorithm using active-record - https://github.com/gautamc/hierarchical_objects The utdt.edu link hosting the pdf that Miguel Sofer created is broken now; I found a copy here: http://www.tetilab.com/roberto/pgsql/postgres-trees.pdf

      thread
    3. ispiveyJun 2012
      SQL For Web Nerds is a terrific resource for learning SQL. http://philip.greenspun.com/sql/

      If your data model is built on top of an RDBMS, learning how one works is the best first step to designing good data models!

      thread
    4. mechanical_fishMar 2012
      The course covered relational algebra and calculus before even talking about SQL

      This is the peril of leaving programming education to the computer scientists: People are routinely forced to rebuild a car's engine before being told what a stoplight is or how to merge onto the freeway.

      And it might help explain why my coworkers think I'm some sort of RDBMS genius when all I've ever done was read SQL for Web Nerds:

      Database researchers love to talk about relational algebra, n-tuples, normal form, and natural composition, while throwing around mathematical symbols. This patina of mathematical obscurity tends to distract your attention from their bad suits and boring personalities, but is of no value if you just want to use a relational database management system.

      In fact, this is all you need to know to be a Caveman Database Programmer: A relational database is a big spreadsheet that several people can update simultaneously.

      A caveman I may be, but I tell you, if you can type SHOW PROCESSLIST, EXPLAIN PLAN, and CREATE INDEX with effect, write a self-join, and use the GROUP BY… HAVING syntax, many people will speak of you as they would of Gandalf. It's embarrassing, really.

      thread
    5. espeedFeb 2012
      Flask is another Python Web framework. It's simpler and easier get started with.

      Try going through the Flask tutorial (http://flask.pocoo.org/docs/) and see if it's easier to follow.

      Here's some resources for getting started with Python (http://www.quora.com/How-can-I-learn-to-program-in-Python/an...).

      And if you're a total newb and need to go over basic programming concepts in a simple language, try "Tcl for Web Nerds" (http://philip.greenspun.com/tcl/) -- it's what many Web developers cut their teeth on in the late 90s.

      For database stuff, check out "SQL for Web Nerds" (http://philip.greenspun.com/sql/).

      thread
    6. mechanical_fishJun 2011
      The glory of being in your position is that you really can't make a mistake here. I'll dispense some random suggestions.

      -- it takes a ridiculous amount of time to do something that seems so easy.

      Yes, this is a sign that you are doing it right. ;) Programming always takes a ridiculous amount of time. The only saving grace is that, once the program is done, a ridiculous number of people will be able to use it a ridiculous number of times. So, if you find that you're not motivated to finish stuff, you need customers. Customers are very motivational, and not just because they give you money. Happy customers are very morale-boosting.

      -- The reason why you can know HTML, CSS, JS, and Python and still do not feel that you know web programming is that none of those things is a database. The database is the important part of web programming. Everything else is frosting. Try SQL for Web Nerds:

      http://philip.greenspun.com/sql/

      It's getting more dated by the second, half the links are broken, and you will not want to actually use Oracle (try Postgres instead, or do what everyone else does and use MySQL with InnoDB) but I know of nothing more readable and certainly nothing cheaper; most published books on SQL are drier than dirt, and I fear that the online tutorials may be all syntax and no substance. Then maybe look at a framework or two. Other folks have recommended Django, or you could look at Rails. Nothing glues all the parts together like a framework.

      -- There is nothing wrong with teaching yourself basic CS before you get to Stanford. You will not run out of potentially interesting things to study at Stanford -- either you can study more advanced CS, or you can (hint! hint!) study something that is not CS, like science or other branches of math. If you like reading SICP and CLRS for fun, by all means read SICP and CLRS for fun. Don't neglect other potentially fun things, though.

      -- If you find that you know language syntax and simple statements but don't know how a whole app goes together, find someone else's app and tinker with that. Read other people's apps, take them apart, fix bugs in them, find bugs in them.

      -- Find someone else to work with. Get some small but honest jobs on an online consulting site and fix other people's code. Join an open-source project and hack on stuff with a community. The Drupal project is always looking for people... (/shameless plug)

      thread

    Related

    Cover of Pro Drupal development
    2007–2022

    Pro Drupal development

    John K. VanDyk
    2 recommend · 4
    Cover of Philip and Alex's Guide to Web Publishing
    2008–2026

    Philip and Alex's Guide to Web Publishing

    Philip Greenspun
    15 recommend · 27
    Cover of Joe Celko's SQL for Smarties
    2009–2020

    Joe Celko's SQL for Smarties

    Joe Celko
    10 recommend · 13
    Cover of PHP and MySQL Web development
    2009–2026

    PHP and MySQL Web development

    Luke Welling
    5 recommend · 8
    Cover of High Performance MySQL
    2007–2026

    High Performance MySQL

    Jeremy D. Zawodny
    27 recommend · 44
    Cover of Learning SQL
    2014–2024

    Learning SQL

    Alan Beaulieu
    3 recommend · 4
    Cover of SQL Queries for Mere Mortals
    2020–2025

    SQL Queries for Mere Mortals

    John L. Viescas
    2 recommend · 4
    Cover of The art of SQL
    2008–2021

    The art of SQL

    Stephane Faroult
    8 recommend · 10