Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: Practise TSQL

  1. #1
    Join Date
    Jun 2008
    Posts
    35

    Unanswered: Practise TSQL

    I need to practise creating and executing:
    1. stored procedures
    2. triggers
    3. funcitons
    4. view
    s

    Could anyone please advice me of sites/tutorials that may be really quick and easy?


    Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    quick and easy? no.

    it takes a day to learn the basic syntax and a life time to master, and just when you think you have encountered code that is hard as it gets some one comes along and offers you a job that is bigger an more complex.

    http://www.google.com/search?hl=en&q...al&btnG=Search
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    quick and easy: http://sqlzoo.net
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jun 2008
    Posts
    35
    I totally agree Thrasymachus.

    Perhaps I should have mentioned. I do know the basics I need to practise alot more.

    Thanks r937 for the advice but that site does not have any exercises involving the ones i'm looking for.


    regards

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    ah, sorry

    what's keeping you from creating your own database to test out these concepts?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Jun 2008
    Posts
    35
    i definitely need a guide

  7. #7
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Install the sample databases for SQL 2005, and play around with those. Microsoft tries to represent as many features as possible in those.

  8. #8
    Join Date
    Sep 2005
    Posts
    161
    Don't forget to spend years mastering 3rd normal form after you learn the syntax.

  9. #9
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Damn! I knew there was something I forgot to master.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  10. #10
    Join Date
    Sep 2005
    Posts
    161
    Don't beat yourself up. I'm still working on this one. Any year now and I will have it mastered.....

  11. #11
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    piffle

    the real challenge (which i always forgo) is to go to 5th normal form, in which one defines all columns of all tables as NOT NULL
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  12. #12
    Join Date
    Sep 2005
    Posts
    161
    Are you a glutton for punishment? It's ok .... some people have a need to inflict pain on themselves. Some go for cutting or burning, some go for 5th normal form.......

  13. #13
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    .....that's a new definition of 5NF on me. 5NF has nothing to do with attributes - correctify me if I'm wrong.

  14. #14
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    let's play alphonse and gaston -- why don't you correctify me and explain what i really meant

    my sources* fail me, but i'm sure i saw a good explanation somewhere

    i have a feeling that what i was trying to say was 6NF, but i shall bow to your superior knowledge

    * my sources:
    http://www.bkent.net/Doc/simple5.htm
    http://www.inconcept.com/JCM/June1999/becker.html
    http://www.internet.com/icom_cgi/pri...sue/020522.htm
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  15. #15
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by r937
    i shall bow to your superior knowledge
    There's no need to be rude, Rudy

    I can't really explain 5th normal form very well in technical terms without cheating and doing some revision. Here's my understanding of fifth normal form (I tend to think of the normal forms in terms of "If...Then..." where If is a real world action and Then is an undesired consequence in the model):

    You have a Fifth Normal Form problem (handily applies to fourth normal form too):
    If you add a row to a table you ...
    Then, as a consequence, have to add n further rows to that table to have all the pertinent data in your database.

    Decomposition sorts this out. My, again layman, interpretation of this is simply "You f***ed up your primary key" in the first place. It is something that interests me since I think I regularly spot and correct 4 and 5 NF in my dbs. Having said that, I reckon a fair few BCNFs get past me.

    A definition I've seen of 6NF is simply that there is no further decomposition is possible - that perhaps sounds like "no NULLS! no NULLS!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •