my basic question is how to insert data into DB as a serialized object and how to extract and use it then ... any suggestion !!?
e.g :
{id:1, userId:1, type:PHOTO, time:2008-10-15 12:00:00, data:{photoId:2089, photoName:A trip to the beach}}
as you see how could I insert data into column Data
and then to use it !?
another question is that if I stored the photoName
inside Data
instead of using JOINS and get the name from it's table (photos
) according to it's Id
thats will not implement the last update on the photoName
(right !?) besides that I'll not be able to make a relation between table photos and the Current table - (Id
=>
photoId)
- if I stored data like that .. so part of the problem is that I don't know exactly what kind of information are going to be stored in colum Data
So I can't customize a separate column for every type of these information ...
help !? :/