Results 1 to 4 of 4

Thread: mapping problem

  1. #1
    Join Date
    Oct 2004
    Posts
    3

    mapping problem

    Hello,

    currently, I have two tables: newsitems, and users.

    I want to be able to do two things:
    1 - to be able to indicate whether a given user has read a news item
    2 - to be able to hide a news item from a user (which will result from a user deleting a news item in the UI, but I would still want that news item to be visible to other users.

    I was going to add a newsitem-to-user mapping table, but I am worried about performance issues, as every news item added to the system will result in a mapping record per user.

    any ideas of what is the best way to go about this?

    thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Quote Originally Posted by eyalk
    I was going to add a newsitem-to-user mapping table, but I am worried about performance issues, as every news item added to the system will result in a mapping record per user.
    No way around that given you requirements, though you may be able to get away with just storing records of news-items the user has deleted, rather than a record for every news-item.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by blindman
    No way around that given you requirements, though you may be able to get away with just storing records of news-items the user has deleted, rather than a record for every news-item.
    whoa, that's sweet

    no, sincerely

    keep a record of the ones they've deleted

    because it's a smaller number of rows

    brilliant!


    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255
    Actually, it is ordinary Normalisation. The "delete news item" action for an user is a Fact, and should be recorded.

    The massive table "every news item added to the system will result in a mapping record per user" was not a Fact, it was an Unnormalised (duplication) of possibilities. (And if you really wanted that, there are better ways to do it.) If you were "mapping", what fact would have been mapped ?

    Cheers
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

Posting Permissions

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