Results 1 to 5 of 5
  1. #1
    deniedaccess is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    May 2015
    Posts
    3

    Media Relationships

    Hi, I hope this is in the right section.



    I've just started using Access 2010 and I'd like to create a media database for all my movies, TV, and music. Now I just need to work out the best way to link relationships between 3 tables.

    movieid (primary) Title Format Year Notes
    tvid (primary) Title Format Year Season Episodes Notes
    albumid (primary) Artist Album Tracks Format Year Notes

    I've never done this before so can someone help out please?

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,451
    have you worked out what the relationship is between say an album and a movie?

  3. #3
    deniedaccess is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    May 2015
    Posts
    3
    I guess it would be something like the year or format?

    What I'd like is if I use a query on say title, it would display both Movies and TV entries etc.

  4. #4
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,451
    In that case, I would have one table for all three categories with an additional column for mediatype (movie, tv, album). I would also add a further column MediaPK which would be an autonumber to uniquely identify the record - this will normalise your data. OK, I agree a movie does not use season, episodes or tracks, but they can be left blank. The benefit is ease of use.

    For example you might decide that you want to also store artiste details (e.g. consider your album table) - they may have been in a movie and tv and perhaps made an album.

    To do this you would have two tables

    tblArtistes
    ArtistePK
    ArtisteName
    ArtisteDOB
    ...
    ...


    tblBeenIn
    BeenInPK
    MediaFK
    ArtisteFK

    this latter table is a link table so you can see for any movie, tv or album, which artistes were involved. Conversely you can also see for any artiste which movie, tv, album they were involved with.

    If you keep your three separate tables, you will have to do this query three times (once for each media type) and then union them together.

    With your current setup and to find a name your union query would be something like

    SELECT title, format, year
    FROM tblMovies
    WHERE title=[Enter Title]
    UNION SELECT title, format, year
    FROM tblTV
    WHERE title=[Enter Title]
    UNION SELECT Album, format, year
    FROM tblAlbums
    WHERE Album=[Enter Title]

    Note that title, format and year are the only two fields you could bring though because they are the only ones that appear in each table

    Note also that format and year are reserved words (they are the names of functions) so recommend you change them to something else like mediaformat, releasedate
    Last edited by CJ_London; 05-26-2015 at 06:06 AM. Reason: missed a UNION

  5. #5
    deniedaccess is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    May 2015
    Posts
    3
    Okay thanks for your help Ajax.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Windows media player Add to playlist
    By anchamal in forum Forms
    Replies: 0
    Last Post: 10-09-2013, 06:34 AM
  2. Explicit Relationships and Implicit Relationships
    By Dazza666 in forum Database Design
    Replies: 2
    Last Post: 07-17-2013, 02:11 AM
  3. Windows Media Player Control
    By dalematt in forum Forms
    Replies: 1
    Last Post: 11-18-2011, 06:20 PM
  4. windows media player
    By ksmith in forum Programming
    Replies: 3
    Last Post: 09-20-2011, 12:44 PM
  5. Replies: 1
    Last Post: 08-05-2010, 12:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums