I have a database design issue.
I have one table called page. Page contains pageItems but a pageItem can be a photo, a gallery, a newsfeed, an article etc...
all of them have different tables. so in pageitem I have no real key to what item it has to show. It has a field that tells me in what table I have to look and a field that tells me what ID to look for in that table.
I know this is not a normalized mysql database. What can I do to normalize this situation? What is the best solution for doing this. This is like an object oriented databse. photo, gallery, newsfeed inherrit from pageItem. But that does not excists in database design.
pageItemID = 1
pageID = 5 (what page do I belong to?)
itemTable = "newsfeed" (look in table newsfeed)
itemID = 50 (take the record with ID 50 in newsfeed)