Live data from Hacker News

PostgreSQL Exercises

pgexercises.com

41–47 of 47 posts

Re: PostgreSQL Exercises

#42
A suggestion: repeat the table names on every exercise in the description. I had been going trough them casually - and always forgot what the table name was and had to go back or press the "show answer" button.

Re: PostgreSQL Exercises

#43

Earlier quoted context omitted.

It's because the WHERE clause is evaluated before the SELECT. The reason that SQLite allows you to do that is because SQLite is much, much simpler than PgSQL, MySQL and SQL Server (all of which don't allow you to do this). http://tinman.cs.gsu.edu/~raj/sql/node22.html

Yes. I wish SQL select-statements put the select-clause last: from people where name = 'Joe' select upper(name) as bigname 1. It would mirror the other clauses (insert, update, and delete) which all begin with the table name. 2. It would be easier on my head. I skip the select-clause anyway when reading SQL, then come back up to it at the end, when I know the columns' source. 3. It would show that using column aliase…

You just described LINQ

Re: PostgreSQL Exercises

#44
post #2

Great idea, does what it should and can be extended to cover a lot more. Keep up the great work. First time looking at it I thought I was on a official Ubuntu site, what a font and color can do to a branding is fascinating.

Author here: out of curiosity, what would be your priorities for future exercises? Right now my list looks roughly like: - DDL - Advanced datatypes (JSON, arrays, etc) - GIS This order is partly informed by the current support of the site: adding DDL exercises is a relatively minor bit of technical work, and then it's just writing. Everything else involves schema changes (or, possibly, a second database).

First, I appreciate the work you've done. Great stuff. Thanks.

Second, I don't imagine these topics fit well with the exercise based course material, but they are of interest to me:

Window Functions, Logic in the database vs in the code, Serialization, Normalization vs Denormalization, Object Relational Mapping, Concurrency & Transactions, Triggers

Re: PostgreSQL Exercises

#45

Earlier quoted context omitted.

Author here: out of curiosity, what would be your priorities for future exercises? Right now my list looks roughly like: - DDL - Advanced datatypes (JSON, arrays, etc) - GIS This order is partly informed by the current support of the site: adding DDL exercises is a relatively minor bit of technical work, and then it's just writing. Everything else involves schema changes (or, possibly, a second database).

First, I appreciate the work you've done. Great stuff. Thanks. Second, I don't imagine these topics fit well with the exercise based course material, but they are of interest to me: Window Functions, Logic in the database vs in the code, Serialization, Normalization vs Denormalization, Object Relational Mapping, Concurrency & Transactions, Triggers

Glad you've found it useful! FWIW window functions are already covered in the Aggregation section.

The rest of it, yeah, as you say it's not so great a fit.

Re: PostgreSQL Exercises

#46
post #34

Earlier quoted context omitted.

Author here - thanks a lot for the feedback, it's appreciated. You're right on the naming convention, it's very haphazard. I'll raise an issue on Github to revisit that - although it may take me quite a while to get to it as I have a two week old to look after right now :-).

Congratulations!

thanks :)

Re: PostgreSQL Exercises

#47

Earlier quoted context omitted.

Author here - thanks a lot for the feedback, it's appreciated. You're right on the naming convention, it's very haphazard. I'll raise an issue on Github to revisit that - although it may take me quite a while to get to it as I have a two week old to look after right now :-).

Kudos on the new budding programmer you got there. ;-)

Thank you!
Post reply on HN