Hello,How to Store lot's of Relations with Objects?

Apr 28, 2013 at 6:39 PM
my question as the Title,for example:
public class user
{
       public int id{get;set;}
       public string name{get;set;}
}

public class music:things
{
       public int id{get;set;}
       public string name{get;set;}
       public ushort timelength{get;set;}
}

public class movie:things
{
       public int id{get;set;}
       public string name{get;set;}
       public ushort timelength{get;set;}
}


public class book:things
{
       public int id{get;set;}
       public string name{get;set;}
       public ushort timelength{get;set;}
}

public interface things
{
       public int id{get;set;}
       public string name{get;set;}
}
my question is if:

we have lots of users.
every one has lots of collections.maybe there are some books,movie or music or other things.
and,
we hope we can find out the all of the users who collect the book name is "xxx";
and find all of the collect of one which the collect things's type is music.

we must keep there's no any duplicate information all of the objects.
but i don't know how?
Coordinator
Apr 29, 2013 at 7:24 AM
Hello,
I propose to use indexes - in this case the add unique index method on the id of class/interface.

Regards,
Jacek