Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Location
    Cork, Ireland
    Posts
    4

    TRying to come up with relationships for tags

    Hey everyone,

    Bit of a problem coming up with the relationships for some tags tables I'm using and was wondering if anyone could help please?

    By tags I mean word's describing bookmarks, etc.

    I plan on using tags in my web app for files and bookmarks, it's gonna be an online file & bookmark manager. The tables I've come up with are as follows:

    tblTag
    - tagName (pk)


    //File info
    tblFileTags
    - tagName (pk)(fk)
    - fileID (pk)(fk)

    tblFile
    - fileID(pk)
    - userID (fk)
    - ...

    //Bookmark info
    tblBookmarkTags
    - tagName (pk)(fk)
    - bookmarkID (pk)(fk)

    tblBookmark
    - bookmarkID (pk)
    - userID (fk)
    - ...

    I've attached a picture of the object model so it may be clearer to see what I'm on about. I believe the relationship between the tblBookmarkTags and tblBookmark needs to be a many to many same with the files. I'm not too good with the database stuff, obviously a student , does the relationship shown in the attachment show 1 to many relationships? I'm using SQL Server and I was trying to show the multiplicity but I'm guessing the key symbol means 1 and the infinity symbol means many?

    Thanks for any help, if I'm been too vague please let me know and I'll try to explain more.

    Click image for larger version. 

Name:	tables.jpg 
Views:	41 
Size:	99.7 KB 
ID:	6854

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    I'm guessing the key symbol means 1 and the infinity symbol means man

    It does. Your model makes sense, as far as I can see.

    Try putting some data in there manually and see what happens.

Posting Permissions

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