Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    9

    Red face News Section ~ Please Help

    Hi all,

    I need some advice. I am creating the last part of my website which is a news section. Now i have created the basic tables but i also want my news section to relate to other tables within my database. Now i could take the very narrow approach and put some cells in my table to represent this, but then i am not really future proofing my database with that. I know that a news article will only belong to one of my sites categories so thats not an issue, but a news item may belong to several countries or resorts.

    So here is what i have and i want to know if anyone has any views. I just have added PK and FK to illustrate.

    Table: tblNews
    ID (PK)
    SiteCategoryID(FK From Site Category)
    ...Rest Of Table

    Table: tblResort
    ID (PK)
    ResortName
    ...Rest Of Table

    Table: tblCountry
    ID(PK)
    CountryName
    ...Rest Of Table

    Table: tblNewsCountry
    ID(PK)
    NewsID (FK From News)
    CountryID (FK From Country)

    Table: tblNewsResort
    ID(PK)
    NewsID(FK From News)
    ResortID(FK From Resort)

    if anyone has any ideas, even to say that this is ok i would be extremly grateful for any feedback.

    Thanks,

    Rob

  2. #2
    Join Date
    Nov 2003
    Location
    Bangalore,India
    Posts
    51
    A Table like this....


    Country Id,
    Resort Id,
    News ID

    is just fine. IF you really wish to have a table which is FUTURE Proof then have a table like
    SECTION_ID
    SOME_SECTION ->(It could take values like Resort,country...whaterver)

    and in the transaction table
    NEWSID
    SECTION_ID (references previous table)

    Cheers..........

Posting Permissions

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