I have a situation where I need to create a 'master object' instance by which all others will inherit from, in a project that uses the Entity Framework (4.0).
I could just set up 开发者_C百科this object, and add a record to the database for it, and everything pull from that. But that seems ...like a real waste. An entire table, for one record?
There is high possibility that the 'master' will change over time, and the inheriting objects need to reflect this. But I really want to do this more efficiently. Is there any alternative than just wasting an entire table that'll hold 1 record?
First thing first.
Measure.
Is a "whole table" really such a waste that warrants any further discussion? Does it really consume too much disk space, memory or CPU?
Or is a simpler design and a faster delivery of the code worth the cost of a few bytes?
精彩评论