Relation approval

Results 1 to 2 of 2

Thread: Relation approval

  1. #1
    Join Date
    Dec 1969

    Default Relation approval

    Can anyone tell me if there is a better way to do this?<BR><BR>My appication allows users to make "posts" to one of many catagories. I am trying to figure out the category system right now. Here is what I have, will you please give me some feedback.<BR><BR>CategoryName Table&#062;---&#060; CategoryRelations Table<BR><BR>CategoryName Table<BR> catID<BR> catName<BR><BR>CategoryRelations Table<BR> ParentID<BR> ChildID<BR><BR>Some categories (ie. state&#039;s names) will be used with many other categories. I figure it will take a many to many relationship between the two tables. Please, give me any suggestions if there is an easier way.

  2. #2
    Join Date
    Dec 1969

    Default Seems confusing...

    So you are saying a user might post something to "Company.Headquarters.State", so that you&#039;d use a set of relationships such as:<BR><BR>Parent: Company, Child: Headquarters<BR>Parent: Headquarters, Child: State<BR><BR>But then you might also have a category like "BirthPlace.State.City"<BR><BR>Parent: BirthPlace, Child: State<BR>Parent: State, Child: City<BR><BR>I think that would be too hard to manage. Somebody "descends" from Company to State and then "ascends" up to BirthPlace????<BR><BR>Despite the fact that the list of states is the same in each case, I think you really need to have a separate type:<BR><BR>HeadquartersState<BR>BirthPlaceState< BR><BR>so that the relationships can&#039;t get crossed.<BR><BR>It would be fine to have the primary key of HeadquartersState match the primary key of State [presumably, the two letter abbreviation?] and thus effectively be a foreign key to State so you could look up generic info (e.g., the spelling of the state). <BR><BR>But maybe I&#039;m just being too paranoid? Maybe you have a secondary system that will keep it all straight?<BR><BR>

Posting Permissions

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