Results 1 to 2 of 2

Thread: DB concept

  1. #1
    Join Date
    Nov 2013
    Posts
    1

    DB concept

    Hello

    I have two databases: table and user.

    table: pics
    pic_id (PK)
    pic
    uid (FK)

    table: user
    uid (PK)
    username
    adress

    pics --- n:1 --- user

    If the user-A have seen the pic-X, the pic-X should be marked in the database. How can I do that?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    One possible answer would be to create a separate pics table for each user. Then you could add a column to the table showing if the user had seen a given picture, or delete the picture row after the user has seen it.

    There are other solutions to this problem.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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