SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Connecting MyISAM and InnoDB?

    I'm not sure but I haven't done this before.

    Let say I have ,

    Table A (MyISAM)
    Table B (InnoDB)

    I want to insert a foreign key into Table B referencing Table A primary index.

    Is this possible?

    If not should I convert Table A to innoDB?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,262
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    myisam is necessary if you want to use fulltext indexing (or geolocation, if i recall correctly)

    or if you're tuning an app for massive read and infrequent update

    otherwise, yes, make it innodb, because the FK won't work otherwise
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    thanks

  4. #4
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I can't believed the InnoDB is not supported by my web hosting.

    Is there an alternative for the InnoDB engine?

  5. #5
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,262
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by solidcodes View Post
    Is there an alternative for the InnoDB engine?
    not that would do you any good

    there is, however, an alternative for your web hosting

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  6. #6
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Can you name it? what engine is a good alternative for InnoDB?

    thanks in advanced.

  7. #7
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,262
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    there are many different types of engines...

    http://dev.mysql.com/doc/refman/5.0/...e-engines.html

    my point was, if your host doesn't support innodb, what are the chances that one of these other engines will be supported?

    not very likely, would be my guess
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  8. #8
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    So what do you think the reason they don't support it r937?
    Because I asked them the reason but they don't let me know.

  9. #9
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,262
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by solidcodes View Post
    So what do you think the reason they don't support it r937?
    it would be sheer speculation on my part, and probably not very complimentary

    for the time being, make both of your tables myisam

    performance should be fine, the only thing you will miss is automatic enforcement of relational integrity constraints
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  10. #10
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thanks again r937

    I'll do that.


Bookmarks

Posting Permissions

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