Generic Browsing in MP? Database Re-Design? (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Hi All,

    I am just wondering that MP has code for Browsing Videos, Music, Pictures etc. which are all seperatley coded, stored in a seperate database etc. I know this may sound a bit like (unfortunatley dead) WinFS idea, but why not set up code that browses "media" by it's properties (e.g. Artist, Album, Actor, Genre, Date, Folder, Source / Program, Favorites, Playlists etc.)?

    This would implicate a complete new design of database (away from the multiple DB version to a single DB storing all "Items")

    That would save a hell of a lot of code, allows for more integrated searching for "things" (e.g. Music Videos could be part of My Music instead of Video).

    The database I am picturing at the moment would have a starting table for everything you could play (item like, Song, TV Show, Movie etc.) and another table for everything "containing" items (like Gernres, Folders, etc.). Some things would probably end up in both (TV Station contains TV Shows, but can also be an item for play this channel).

    Sorry for the long post, but I just wanted to ask the dev community if it would be worthwhile putting some effort into DB design, mapping classes etc for such a setup?

    Thnx!
     

    Smirnuff

    Portal Pro
    December 7, 2004
    630
    3
    United Kingdom
    I would really like to see something like this happening in the future and have tried coming up with a few schemas but never got one that was either good enough or clean/simple enough :(.

    I'm quite a fan of the death to hierarchies approach of Google's label system, the ability to label any item in your library as 'Holiday May 2006' and being able to access all those items by navigating a label hierarchy (didn't I say earlier that I support death to hierarchies?!?!?) or by searching would be really cool IMO.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    This is a sample datamodel I designed which might fit the space between good enough and clean enough.



    I would represent:
    an artist (e.g. Music or Movie) as
    LabelType = "Artist"
    Label = "R.E.M."
    additional info might be in the Artist Table (Biography etc.)

    a genre as
    LabelType = "Genre"
    Label = "Grunge"
    ParentLabel = "Rock" (sample!)

    an album as
    LabelType = "Album"
    Label = "Automatic for the people"
    ParentLabel = "R.E.M." (The Album Artist)

    a directory as
    LabelType = "Directory"
    Label = "d:\Music\R.E.M.\Automatic for the people"
    Directory.strPath = "d:\Music\R.E.M.\Automatic for the people"

    a playlist as
    LabelType = "Play List"
    Label = "My Summer"
    --> Might need a reference to a file as well for storage or also be an item
    LabelMap contains:
    map to song "Drive"
    map to picture "SomePicture_002" --> Can mix media in playlists!

    a song as
    Item.strName = "Drive"
    File.strFileName = "01 Drive.mp3"
    File.idPath.strPath = "d:\Music\R.E.M.\Automatic for the people"
    LabelMap contains:
    map to Album "Automatic for the people" (Role Empty)
    map to Genre "Rock" (Role Empty)
    map to Directory "d:\Music\R.E.M.\Automatic for the people" (Role Empty)
    map to Artist R.E.M (Role Artist)
    map to Artist "Bill Berny" (Role Composer)
    map to Artist "Peter Buck" (Role Composer)
    map to Playlist "My Summer" (Role 00001), forgot to add iPosition to LabelMap

    a movie as
    Item.strName = "The Rock"
    file.strFileName = "the_rock_cd1.iso" (File 1)
    file.strFileName = "the rock_cd2.iso" (File 2)
    LabelMap contains:
    map to Genre "Whatever"
    map to Artist "Michael Bay" (Role Director)
    map to Artist "Sean Connery" (Role Actor)
    ...

    a TV Channel as
    Item.strName = "CNN International"
    Label.strLabel = "CNN International"
    LabelType = "TV Channel"
    Channel.iChannelNr = 123
    ...

    a program series (epg) as
    Label.strLabel = "The Simpsons"
    LabelType = "Series"

    a TV Program (epg) as
    Item.strName = "The Simpsons - Homer in Space"
    Item.ParentItem = "Pro 7" (The Channel, maybe)
    LabelMap contains
    map to Channel "Pro 7"
    map to Series "The Simpsons"
    map to Artist "Matt Groening" (Role Author)
    map to Artist "Bart Simpson" (Role Actor)
    map to Directory "d:\My Recordings"
    File.strFileName = "Pro7_TheSimpsons_HomerInSpace_2006010122222.dvr-ms"
    File. (Either allready there or scheduled for recording)

    an Internet TV Stream as
    Item.strName = "BBC World Stream"
    Stream.strURL = "http://bbc.co.uk/123456.123.asx"
    LabelMap contains
    map to Country "UK" (Sample)

    a Picture
    Item.strName = "SomePicture_002"
    file.strFileName = "SomePicture_002.jpg"
    Directoy.str_Path = "d:\My Pics\Summer of 2006"
    LabelMap contains
    map to Directory "d:\My Pics\Summer of 2006"
    map to CustomLabel "Holiday 2006"
    map to Playlist "My Summer" (Role 000002)
    map to PrintedLabel "Printed on 15th July 2006"

    I guess I added most of the important types. I am willing (but time limited) to help out on this further.
     

    Callifo

    Retired Team Member
  • Premium Supporter
  • December 7, 2004
    1,439
    21
    Adelaide, Australia
    Home Country
    Might be a bit nieve but wouldnt such a setup make it slower? You would have to resort to searching a massive (5 in 1 DBs) DB every single time you had to display a list of something.

    Also that many optional schema would result in a lot of wasted tuple entries (NULL in a lot of cases)?
     

    Lyxalig

    MP Donator
  • Premium Supporter
  • January 30, 2005
    276
    1
    40
    Norway
    Home Country
    Norway Norway
    This looks like a good idea!

    I don't think I agree that you sholud make it "simple". Of course the db-structure has to be simple,and I think you nailed it pretty well on the model.

    Why not incorporate Artist info (allmusic?), and IMDB and so on.

    Actor/artist might bee the same deal? maybe a "person" entity might be in place? This would lead to a cross-section between music, musicvideos, and movies..
    (Britney spears-> Greatest hits, hit me baby one more time, crossroads)
    =
    (Person-> Artist, Artist (Music video), Actor)

    PS:.. One directory should be able to have more then one label..
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Callifo said:
    Might be a bit nieve but wouldnt such a setup make it slower? You would have to resort to searching a massive (5 in 1 DBs) DB every single time you had to display a list of something.

    Also that many optional schema would result in a lot of wasted tuple entries (NULL in a lot of cases)?
    With good db design and indexing that should not be a problem. It should not grow to a region where a proper db engine could not handle it anymore (even with large mp3, movie etc collections).

    In the design I put up, there should not be to much empty stuff. I kept some very special things to their own tables, like Channel Configuration (that requires quite some info) or additional Artist information.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Lyxalig said:
    Why not incorporate Artist info (allmusic?), and IMDB and so on.
    That type of info should belong into the Artist Table. I especially made an extra table, since only the "artist" type labels would need the info.

    Lyxalig said:
    Actor/artist might bee the same deal? maybe a "person" entity might be in place? This would lead to a cross-section between music, musicvideos, and movies..
    (Britney spears-> Greatest hits, hit me baby one more time, crossroads)
    =
    (Person-> Artist, Artist (Music video), Actor)
    Yes, we might just call it Person (I thought that artist does include actor, basically both is a form of art...)

    If it is person, we might add person relations to picture as well (this is my mum kind of sorting ;) )

    Lyxalig said:
    PS:.. One directory should be able to have more then one label..
    Why? Remember Labels are Hierachial, so labels can contain other labels (so you still have parent directories for browsing). Or do you want to have aliases for the same directory?
     

    Lyxalig

    MP Donator
  • Premium Supporter
  • January 30, 2005
    276
    1
    40
    Norway
    Home Country
    Norway Norway
    You are right :oops:

    I didn't read your chart correctly.

    Anyhow I think this is a great idea.

    Did you have a specific DBMS in mind?

    You might also want to include "location", as this db could be placed as a part of the new "backend" part of mp?
     

    mzemina

    Retired Team Member
  • Premium Supporter
  • February 23, 2005
    2,065
    14
    Tulsa, OK
    Home Country
    United States of America United States of America
    I think you really should look at using Microsoft SQL Server 2005 Express Edition, it will be useful when version 0.3 starts to roll out.
     

    Users who are viewing this thread

    Top Bottom