SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Database Terminology

    Hey Sp,

    Just a quick question here from a self taught do-it-yourself.

    I'd like to know if there is a specific names for tables which describe their purpose.

    For example if we have table A like item_categories, and table B like items and then we have table C item_category_relationship which would hold two columns category_id and item_id which houses the data of which items are in which category.

    Is there an name or term that describes A & B, and C?

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,220
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    The biggest hindrance most people have is not naming their tables descriptive names to begin with, so kudos on that, you are doing it right.

    Typically in this situation, I would refer to the group of tables as the "item tables". Then anyone within the conversation would have some idea of what tables I would be referring to and when looking through phpmyadmin or SSMS would be able to quickly see which tables my generalization likely related to.

    If I meant to specify a specific table, I would usually try to reference it by name or use a phrase that I know is very close/similar to the actual table name.

  3. #3
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    The biggest hindrance most people have is not naming their tables descriptive names to begin with, so kudos on that, you are doing it right.

    Typically in this situation, I would refer to the group of tables as the "item tables". Then anyone within the conversation would have some idea of what tables I would be referring to and when looking through phpmyadmin or SSMS would be able to quickly see which tables my generalization likely related to.

    If I meant to specify a specific table, I would usually try to reference it by name or use a phrase that I know is very close/similar to the actual table name.
    So does that mean there isn't actually an official name A, B or C? I'm trying to really wrap my head around what specific purpose these tables represent as I need to make an effective MySQL generator that accompanies a PHP Code generator. I see table A as a object_type, table B as an object and table C as a relationship but I'd like to know their actual names (if such exists)

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,328
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    the name given to the table that implements a many-to-many relationship (e.g. item_categories, between items and categories) is relationship or association or linking or junction table
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    the name given to the table that implements a many-to-many relationship (e.g. item_categories, between items and categories) is relationship or association or linking or junction table
    Awesome. Thank you for clarifying. I swear one of these days I'm going to buy your book.


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
  •