News for hackers. Stuff that matters.
Re:Our SQL interview questions by LekkoscPiwa on Tuesday May 28, 2013 @09:05AM (#5779700)
I would imagine questions that are good to start with: how you as a developer usually start a design of a database? How do you plan it? I got this question once, I thought it was really good. On the spot I could tell the engineer who asked me that is experienced. Can't answer that after reading sql book two days earlier. In contrast to the questions from the post.
Re:Our SQL interview questions by jacques_chester on Tuesday May 28, 2013 @09:08AM (#5779723)
In a business setting, the conceptual/relational, logical and physical design of a database happens far less often than querying such databases.

Indeed, one of the reasons normalisation is such a Big Deal to relational bigots like me is that it makes SQL's querying tools much more useful and versatile.

Re:Our SQL interview questions by k__ on Tuesday May 28, 2013 @09:17AM (#5779773)
True story, but such questions are just senseless.

If someone knows about set-theory and the ideas behind query-languages, knowing SQL isn't a deal breaker, it's just a nice to have.

Re:Our SQL interview questions by jacques_chester on Tuesday May 28, 2013 @09:20AM (#5779788)
Folk generally don't study relational algebra, on its own, for fun.
Re:Our SQL interview questions by jfb on Tuesday May 28, 2013 @09:36AM (#5779900)
SQL is one of those technologies that caps how much enjoyment you can derive from understanding the related theory. Scheme, for instance, never stops giving, but you can hit a point with SQL where you start to wonder: where's my Tutorial D?
Re:Our SQL interview questions by jacques_chester on Tuesday May 28, 2013 @09:42AM (#5779942)
And where are my proper temporal primitives?

It sucks, but it's what we have for now.

Re:Our SQL interview questions by chris_wot on Tuesday May 28, 2013 @09:30AM (#5779868)
They really should.
Re:Our SQL interview questions by jfb on Tuesday May 28, 2013 @09:27AM (#5779843)
If someone knows set theory, they're likely not interviewing for a LOB CRUD job banging out Rails models.
Re:Our SQL interview questions by pessimizer on Tuesday May 28, 2013 @11:28AM (#5780575)
What if you're not looking for an experienced data modeller, but someone who can write SQL?

Also: If you can read the SQL book two days earlier and answer these questions in a reasonable amount of time - sounds like an insta-hire to me. There's certainly nothing so hard about SQL that you couldn't do that - but some people who spend a lot of time working with databases seem to find the climb insurmountable.

Re:Our SQL interview questions by jacques_chester on Tuesday May 28, 2013 @07:50PM (#5783644)
When I learnt SQL, the part that took me the longest to square away was the distinction between WHERE and HAVING. It was thoroughly confusing at the time.

Once you grasp that conceptually, SQL generally executes left-to-right, it's easier.

Re:Our SQL interview questions by siddboots on Friday May 31, 2013 @06:28AM (#5797733)
I avoid `having` wherever possible these days. There are data analysts in my team that I know would have to think twice about it if they encountered it in my code, and to be honest, it's a bit of an wart in the SQL grammar anyway.

In (almost) all cases, a subquery with an extra `where` clause will have equal performance to a `having` clause in the main query.

See the final example in: http://en.wikipedia.org/wiki/Having_(SQL)

Re:Our SQL interview questions by jfb on Tuesday May 28, 2013 @12:13PM (#5780874)
If my datastore is a SQL database, I don't want you modeling anything if you can't answer these questions.