Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Unanswered: interview question?

    How many tables can be updated with a single update ?

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: interview question?

    I would answer only one
    but I'm curious of the exact answer

  3. #3
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Re: interview question?

    even i support one ,but it is correct

  4. #4
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    One
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  5. #5
    Join Date
    Jan 2003
    Location
    India
    Posts
    523

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    zero (where clause finds no rows)

    one (duh)

    many (updated row cascades to related tables)
    Last edited by r937; 02-23-04 at 10:20.
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  7. #7
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Cascading updates ... hmm ... why didnt I think of that ...

    Well .. seems like I lost any chance of getting this job
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    n
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  9. #9
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    What does n mean ... Mr BK
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  10. #10
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    brett probably means m, not n

    m is n + 1

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  11. #11
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I thought n meant any number...

    m to me means many, but infers a relationship as in 1-m

    either way...

    However, here's a poll type question...how many people use cascade...

    I've never...always wanted more control...prefer to delete and insert...

    (And keep history)
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  12. #12
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Never !!!
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  13. #13
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    when updates are performed, if you're writing audit records or something, those triggers should fire no matter whether the table being updated is the target table or a related table, right?

    oh, and to me, m implies 0 to many, not 1 to many

    my answer to the question was "zero, one, or many"

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  14. #14
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by r937
    when updates are performed, if you're writing audit records or something, those triggers should fire no matter whether the table being updated is the target table or a related table, right?

    oh, and to me, m implies 0 to many, not 1 to many

    my answer to the question was "zero, one, or many"

    fair enough...but now we trapse down the logical data modeling path...

    things are not always 0-m...could be required to be 1-m...

    EDIT: And you didn't answer the cascade question...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  15. #15
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    sorry, i assumed my answer to the cascade question would be obvious

    i use as much RI as the database supports

    unless i'm doing consulting work at a cllient site where there's a DBA with veto on changes or exceptions to his database guidelines...

    but that's politics
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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