• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Zen and the art of SQL

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Zen and the art of SQL

    Hi there,

    I know SQL isn’t up there with the money-earning IT skills, but can anyone recommend any books/websites that actually teach how to THINK in SQL, rather than just explaining what the commands do and giving a few examples? I know my way around the SQL functions, but can still struggle working out exactly what has to be joined to what and when and with what conditions, e.g. always seem to get tied in knots when any table needs joining to itself, and end up with a query that looks twice as long as it needs to be. Is it just experience, or are there some decent tutorials/practice sites out there?

    By the way, I’ve been reading CUK in conjunction with HousePriceCrash.co.uk, and don’t think I’ve ever had a more, shall we say, ‘grounded’ view of the world. Thank you.

    Tony

    #2
    Which implementation of SQL?

    Different SQL engines parse and process the language in different ways. So besides there being different dialects of SQL, you also need to be aware of how the engine joins tables and the sequence it processes conditions and a bunch of other stuff I've managed to forget.
    My all-time favourite Dilbert cartoon, this is: BTW, a Dumpster is a brand of skip, I think.

    Comment


      #3
      Originally posted by Twilkes View Post
      Hi there,

      I know SQL isn’t up there with the money-earning IT skills, but can anyone recommend any books/websites that actually teach how to THINK in SQL, rather than just explaining what the commands do and giving a few examples? I know my way around the SQL functions, but can still struggle working out exactly what has to be joined to what and when and with what conditions, e.g. always seem to get tied in knots when any table needs joining to itself, and end up with a query that looks twice as long as it needs to be. Is it just experience, or are there some decent tutorials/practice sites out there?

      By the way, I’ve been reading CUK in conjunction with HousePriceCrash.co.uk, and don’t think I’ve ever had a more, shall we say, ‘grounded’ view of the world. Thank you.

      Tony
      Not sure that it's not up there with money earning skills.

      Like anything you can have a basic understanding of a language. I can write 'Hello World' programs in lots of languages, but doesn't give me an appreciation to develop a product.

      SQL is the same. T-SQL or PL-SQL expertise as a developer pays well, as does database administration. Just depends on your level of expertise.
      What happens in General, stays in General.
      You know what they say about assumptions!

      Comment


        #4
        Originally posted by Twilkes View Post
        I know SQL isn’t up there with the money-earning IT skills
        If its such a low cost resource then why don't you simply hire a cheapo SQL contractor to do it for you
        Coffee's for closers

        Comment


          #5
          Originally posted by Spacecadet View Post
          If its such a low cost resource then why don't you simply hire a cheapo SQL contractor to do it for you
          Because there is no 'it', I'm just trying to improve my skills. By not-high-earning I meant if someone went into an agency and said 'I know SQL', the agent would probably say 'Great, so do I, what else can you do?' It's not that valuable on its own without other tech or e.g. analyst skills.

          If you had a non-IT colleague who knew a bit of SQL but wanted to get up to speed, what would you tell them to do? [/feedline for insults]

          Tony

          Comment


            #6
            Originally posted by Twilkes View Post

            If you had a non-IT colleague who knew a bit of SQL but wanted to get up to speed, what would you tell them to do?
            Get an Access database which holds some complex queries (or build your own), open them in SQL view, make a note of what's happening. Try to recreate the queries in SQL (GUI not allowed). Buy a book. Buy SQL SERVER developer edition (quite cheap).

            Comment


              #7
              Originally posted by Twilkes View Post
              Because there is no 'it', I'm just trying to improve my skills. By not-high-earning I meant if someone went into an agency and said 'I know SQL', the agent would probably say 'Great, so do I, what else can you do?' It's not that valuable on its own without other tech or e.g. analyst skills.

              If you had a non-IT colleague who knew a bit of SQL but wanted to get up to speed, what would you tell them to do? [/feedline for insults]

              Tony
              try this book:
              Inside Relational Databases with Examples in Access eBook: Mark Whitehorn, Bill Marklyn: Amazon.co.uk: Books

              and this artiicle:
              SQL and the JOIN Operator - SQLServerCentral
              (will need registration)

              Next time you want help on a subject, try not to insult those who are best in a position to help you, it just makes you look like an ungrateful idiot
              Coffee's for closers

              Comment


                #8
                To 'think' in code, it helps to know how computers work a bit - assembly and bits and bytes and so on. To 'think' in SQL, I think knowing the basics of how an RDBS works - it involves specific bits of computer science.
                Trying to write SQL as a programmer means you mightn't be very efficient. PL/SQL for instance I really like because it's like 'real' programming... but that means I can abuse it to break Oracle's parallelism and end up with slow, procedural stuff rather than smart queries operating on datasets.
                Originally posted by MaryPoppins
                I'd still not breastfeed a nazi
                Originally posted by vetran
                Urine is quite nourishing

                Comment


                  #9
                  Originally posted by Spacecadet View Post
                  try this book:
                  Inside Relational Databases with Examples in Access eBook: Mark Whitehorn, Bill Marklyn: Amazon.co.uk: Books

                  and this artiicle:
                  SQL and the JOIN Operator - SQLServerCentral
                  (will need registration)

                  Next time you want help on a subject, try not to insult those who are best in a position to help you, it just makes you look like an ungrateful idiot
                  Thanks for the suggestions, that's what I was looking for. And I wasn't sure that I had insulted anyone, certainly not intentionally. I just wanted to clarify what I was looking for because the first few posts were focussing on other things, i.e. I have no idea what version of SQL I'm going to be using, and the cheapo-ness or otherwise of SQL contracting wasn't really the issue.

                  Ta,

                  Tony

                  Comment


                    #10
                    Originally posted by Twilkes View Post
                    Hi there,

                    I know SQL isn’t up there with the money-earning IT skills, but can anyone recommend any books/websites that actually teach how to THINK in SQL, rather than just explaining what the commands do and giving a few examples?

                    Tony
                    Your question is strikingly similar to some of the reviews here Amazon.com: Customer Reviews: The Art of SQL

                    Comment

                    Working...
                    X