Skip to content

Instantly share code, notes, and snippets.

@mickelsonm
Last active August 29, 2015 14:06
Show Gist options
  • Save mickelsonm/1c9de91d31f283f6b369 to your computer and use it in GitHub Desktop.
Save mickelsonm/1c9de91d31f283f6b369 to your computer and use it in GitHub Desktop.

Category Brainstorm

Category

  • ID - int(11)
  • ParentID - int(11)
  • Name - varchar(255)
  • Sort - int(11)

Categories and sub-categories.

CategoryImages

  • ID - int(11) AI PK
  • CatID - int(11) FK
  • Image - varchar(255)
  • Thumbnail - varchar(255)

Images and thumbnails associated with categories and their respective sub-categories.

CategoryDescriptions

  • ID - int(11) AI PK
  • CatID - int(11) FK
  • ShortDesc - text
  • LongDesc - longtext

Descriptions...you know descriptions.

CategoryMetaData

  • ID - int(11) AI PK
  • CatID - int(11) FK
  • Title - text
  • Description - text
  • Keywords - text

Meta data for each categories.

CategoryAttributes

  • ID - int(11) AI PK
  • CatID - int(11) FK
  • Field - varchar(255)
  • Value - varchar(255)
  • Sort - int(11)

Category attributes would be useful in search, filter mechanisms, etc. There might be a way to set this up so where there are system-level attributes that apply to all categories, a specific category, or an entire category tree (category and all associated sub-categories).

All

Obviously categories would be broken up into multiple tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment