Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Simple structure:

have a table PAGES - which stores information about specific landing pages working on developing a GROUPing concept for the pages, where we are saying that a page may or may not belong to a group, and it will only belong to a single group.

Would a linking table group_page.group_id,group_page.page_id be the proper way to go? Or pages.group_id ?

share|improve this question
up vote 3 down vote accepted

This is rather subjective based on the nature of the data, potential for change, deadlines, longevity of the project, storage space, performance requirements, etc.

However, the determining factor will likely be the probability that you will ever need multiple groupings for pages. If you will, then implement a join table now. If not, putting Group_Id inside the pages table is faster to build, less complex, will perform better, and uses less space.

share|improve this answer
Thanks -- yes, if multiple grouping will be a case, then I see that requirement (or future proofing) a huge factor ... – cgmckeever Jun 1 '12 at 16:09
And you can have a UNIQUE constrait now, on group_page (page_id) to ensure one group per page. Which you can lift when that requirement arrives. – ypercubeᵀᴹ Jun 2 '12 at 11:52
@ypercube I like that idea as well! – cgmckeever Jun 8 '12 at 0:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.