KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Let's say you're collecting insider info on upcoming superhero movie releases and your main Movie table looks something like this: Table 1 Title Director Leading Male Leading Female Villain -------------------------------------------------------------------------- Green Lantern Kubrick Robert Redford Miley Cyrus Hugh Grant The Tick Mel Gibson Kevin Sorbo Linda Hunt Anthony Hopkins This should work very well in general and allow very easy queries as well as comparisons between rows. However, you'd like to track the source of each data fact, as well as the name of the journalist who discovered the fact. This seems to suggest some sort of an EAV table like this: Table 2 Movie Attribute Value Source Journalist ---------------------------------------------------------------------------------- Green Lantern Director Kubrick CHUD Sarah Green Lantern Leading Male Robert Redford CHUD James Green Lantern Leading Female Miley Cyrus Dark Horizons James Green Lantern Villain Hugh Grant CHUD Sarah The Tick Director Mel Gibson Yahoo Cameron ... Which, while it easily captures the meta-data that we wanted, makes queries harder. It takes a bit more to simply get all the basic data of a single movie. More specifically, you have to deal with four rows here to get the four important tidbits of information on the Green Lantern while in table 1 it is a single, nicely encapsulated row. So my question is, in light of the complications I just described, and because I know in general EAV tables are to be avoided, is the EAV
Tags (comma-separated)
Save Edits
Cancel