Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2007
    Posts
    5

    Red face Unanswered: DBDesigner4 and Circular Relations

    Okay, I decided I'd plan my database for once.

    I've modelled it in DBDesigner4, when I go to export the SQL code, however, it gives me a "There are circular relations." error.

    I know that I can get away with having a circular relation, but the program won't let me have the code!

    So where is this circular relation occuring, and how can I fix it? (Model is attached)

    Your help will be appreciated very much!

    Attached Thumbnails Attached Thumbnails rm_dbmodel.png  

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    i guess you get what you pay for, eh

    try removing the relationships one at a time, exporting after each attempt, and eventually you should be able to generate your script
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2007
    Posts
    5
    No luck

    I've tried removing entire tables and still can't figure it out!

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    do not remove tables, remove relationships
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2007
    Posts
    5
    Yeah, neither solves the problem. (Removing the tables takes the relationships anyway).

  6. #6
    Join Date
    Jan 2007
    Posts
    5
    I think the software might be playing up... The error still occurs when there's no relationships at all there, and when there's no tables!!! That's not possible is it?!

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    umm... see first line in post #2

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

  8. #8
    Join Date
    Jan 2007
    Posts
    5
    Yay....................

  9. #9
    Join Date
    Jan 2008
    Posts
    1
    Try this... zoom out so you have all the tables in view. Select every table, and then try to export. For some reason you have to have the tables selected that you want to import.

  10. #10
    Join Date
    Feb 2008
    Posts
    1
    In the "Export SQL Script" Dialog, uncheck the "Order Tables by Foreign Keys" Option. And remember add to the script the next two lines in this way:

    SET FOREIGN_KEY_CHECKS = 0;

    .
    .
    .<here you script>
    .

    SET FOREIGN_KEY_CHECKS = 1;


    this works for me. Good Bye.

  11. #11
    Join Date
    Jan 2008
    Location
    Kingdom of Sweden
    Posts
    11
    Why not "upgrade" to MySQL Workbench (assuming you run Windows)?
    http://dev.mysql.com/workbench/

  12. #12
    Join Date
    Oct 2009
    Posts
    1
    Quote Originally Posted by benjwalker View Post
    Okay, I decided I'd plan my database for once.

    I've modelled it in DBDesigner4, when I go to export the SQL code, however, it gives me a "There are circular relations." error.

    I know that I can get away with having a circular relation, but the program won't let me have the code!

    So where is this circular relation occuring, and how can I fix it? (Model is attached)

    Your help will be appreciated very much!

    Okay you must select all the tables. Hold Ctrl and clic each one of them or press Ctrl+A to select all then export them again. Circular error ocurrs becase you are exporting only one table wich has relations. If the problem persist delete the relations and start over.

Posting Permissions

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