Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Database Design

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32751
    paperrobots
    Participant

    So I’ve been told the way I use databases is very “flat”. So I’m just curious if there’s any rules or best practices to follow when setting up my tables.

    When is it best to break out info into multiple databases and use joins? Are joins more of a performance hit then using a single database?

    Any helpful information would be greatly appreciated.

    #75980
    mixxmac
    Member

    You may have to read up on normalization to learn about best practices for database design… http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html

    #75925
    paperrobots
    Participant

    When using a join on two tables, what if I have fields that are named the same thing but aren’t what I’m using as a foreign key? Like “date_added”. Do I have to give each field in my tables a unique name then? Is there another solution?

    #75926
    mixxmac
    Member

    You could have a “date_added” field in both tables. The field names don’t affect anything. When you join two tables in a query you choose two fields of the same datatype (usually integers) to define the relationship between the tables… e.g. primary key to primary key, or foreign key to primary key.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.