Difference between Entity attribute value model and data warehousing
i am reading about the "entity attribute value model" which sort of reminds me of an star-schema which you use in data warehousing.
One table has all the facts (even if you mix apples,bananas e.g. date of farming, weight, price, color,type,name) and a bunch of tables hold开发者_如何学JAVAing the details (e.g. infected_with _banana_virus_type, apple_specific_acid_level)
I do this in both aproaches, so I can't see a difference in these to words?
Please enlighten me. CHEERS
In all approaches you have entities, attributes and values. Everything reduces to this logically. Since everything has entities, attributes and values, you can always claim that everything is the same. All data structures are -- from that point of view -- identical.
Please draw a diagram of a star schema. With a fact (say web site GET requests) and some dimensions like Time, IP Address, Requested Resource Path, and session User.
Actually draw the actual diagram, please. Don't read the words, look at the picture of five tables.
After drawing that picture, draw a single EAV table.
Actually draw the picture with entity, attribute and value columns. Don't read the words. Look at the picture of one table.
Okay?
Now write down all the differences between the two pictures. Number of tables. Number of columns. Data types of each column. All the differences.
We're not done.
Write a SQL query to count GET requests by day of the week for a given user using the star schema. Actually write the SQL. It's a three-table join. With a GROUP BY and a WHERE
Try and write a SQL query to count GET requests by day of week for the EAV table.
Okay?
Now write down all the differences between the two queries. Complexity of the SQL, for example. Performance of the SQL. Time required to write the SQL.
Now you know the differences.
精彩评论