#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171

    Is it important to memorize the synthax of DDL statements.


    Hello;

    I believe the whole point of query writting is to be able to write dynamic DML statements and select or update data based on the needs

    But what about CREATE and ALTER?

    Is it neccesarry to memorize them or is it good enough to rely on phpmyadmin to do so?
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    It's disappointing that you even have to ask.

    Learn them.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    Hi,

    will you do a lot of database administration and raw SQL? Learn the syntax. Is all your application SQL hidden behind an ORM, and does you company have its own DBAs? Don't learn the syntax.

    There's no general answer. Learn what you need. Yeah, it's probably a good idea to at least know the basics and be able to look up the rest. But if you never actually need to do CREATE and ALTER queries, knowing all possible syntax details inside out won't help you a lot in your life.

    I mean, this is like "Do I need to know exactly how my computer works in order to be a good programmer?". If you're going to do assembler, yes. If you gonna work with some high-level scripting language and no specific performance requirements, no.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    I haven't memorized the syntax and have no plans to do so; I use phpMyAdmin to generate all of my DDL statements.

    I don't write DDL statements often enough to have learned them by memory; thus, I don't use them often enough to make memorizing them worthwhile.

    I can read and completely understand any DDL statement, I just can't write them from scratch without a reference.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,120
    Rep Power
    4274
    Originally Posted by zxcvbnm
    Is it neccesarry to memorize them or is it good enough to rely on phpmyadmin to do so?
    i would just like to point out that those are not your only two options

    if you can memorize DDL, more power to you

    i've been writing sql since 1987 and i still need to use da manual

    as for phpmyadmin, that's a piece of crap, and i would not stake my job on what it produces
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,781
    Rep Power
    348
    Originally Posted by E-Oreo
    I use phpMyAdmin to generate all of my DDL statements.
    You live by the GUI, you die by the GUI.

    What if you don't have that available and still need to administrate your DB?
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
    http://forums.devshed.com/misc.php?do=bbcode#code

    Tips on how to ask better questions:
    http://tkyte.blogspot.de/2005/06/how-to-ask-questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html
  12. #7
  13. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    What if you don't have that available and still need to administrate your DB?
    If I don't have it available then I use the command line. This is almost always the case on production servers; however, I rarely run structure altering queries by hand on production servers as most of the time the projects I'm working on have some form of migration utility that does it.

    I'm not a database administrator; 90% of the database administrator work that I do is on development servers, and is only done in support of development work.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo