开发者

Design Problem : Single Record Might Change - Don't want to waste a table

开发者 https://www.devze.com 2023-01-13 06:57 出处:网络
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 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?

0

精彩评论

暂无评论...
验证码 换一张
取 消