How to handle these types of data formats?

Hey,

Have a look at this thread: Working with data on relationships.