#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    59
    Rep Power
    2

    Normalization check


    Dear Developers,

    I have two tables 'A' and 'B'.

    A table has three fields.Listed below.

    one_id (primarykey)
    name
    address

    B table has three fields.

    two_id (primarykey)
    one_id (foreignkey)
    phone

    I set field name of foreingkey is same as field name of primarykey, is it correct to use same fieldname?

    Thanks
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,026
    Rep Power
    4210
    yes, you can use the same column name, but you don't have to
    r937.com | rudy.ca
    please visit Simply SQL and buy my book
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    59
    Rep Power
    2
    Originally Posted by r937
    yes, you can use the same column name, but you don't have to

    I mean, field name of second table foreingkey is same as field name of first table primarykey, is it correct to use same fieldname?
  6. #4
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,026
    Rep Power
    4210
    Originally Posted by Sarath_PHP
    is it correct to use same fieldname?
    yes, you can use the same column name, but you don't have to
    r937.com | rudy.ca
    please visit Simply SQL and buy my book

IMN logo majestic logo threadwatch logo seochat tools logo