How are sql queries implemented?

Cisco
Yuot22

Go to company page Cisco

Yuot22
Apr 2 12 Comments

Hey any papers/resouces that explain how sql queries are implemented beneath the covers? The data structures, patterns used etc.?
YOE 14 TC 300k

comments

Want to comment? LOG IN or SIGN UP
TOP 12 Comments
  • Oh, love this. Finally, something related to my thesis.
    So SQL has a grammar. The query engine uses this grammar to check syntax.
    It concerts it into a parse tree, does optimizations based on statistics and then decides how query actually is run. It is a complex process.
    I read this book for my thesis, awesome stuff
    Database management systems
    Apr 2 2
  • Datadog
    aiendkziwn

    Go to company page Datadog

    aiendkziwn
    You probably want to take a course on databases or something because this is not something that can be explained in a comment.

    There are many different ways the queries are implemented and the database actually decides this at runtime (ie whether to use a hash join vs nested loop when you use JOIN) and further this depends on the database engine and how the data is stored internally.
    Apr 2 1
    • Cisco
      Yuot22

      Go to company page Cisco

      Yuot22
      OP
      I thought so, but are there some common/famous approaches/patterns? Asking to quickly glance through for an upcoming interview where I could be asked..
      Apr 2
  • Look at oracle documentation. They have given detailed process how queries are processed
    Apr 2 0
  • There's a course on YouTube by Andy Pavlo. You might want to take that course.
    Apr 2 0
  • Google
    wUyR14

    Go to company page Google

    wUyR14
    There's a good book titled Database Internals. It covers common practice in most database implementations. Highly recommend it.
    Apr 2 0