かつのりの日記2

わんくまでは珍しいJavaを中心とした日記です

目次

Blog 利用状況

書庫

日記カテゴリ

いろいろリンク

仕様変更に強いシステム

最近思うのですが、仕様変更に対する耐性を考えるとエンティティ間の多重度を極力1:1にせず、1:nやn:nにする方がよいのではと。エンティティの構成上物理的に1:1になることが、既に仕様上の制約となってしまいますが、1:nやn:nにしてプログラムで論理的に1:1になるようにすると自然と変更に強くなるのかなと思います。

例えば従業員テーブルと部署テーブルがあり、従業員テーブルに部署IDを持たせると、極論を行ってしまえば従業員は兼任という事が出来なくなります。要件定義の段階で「絶対に兼任はありえない」といわれても、エンティティの構造上では兼任を可能にし、プログラムで縛ることによって要件を満たせばいのです。もし仕様が変わってもエンティティ構造にまで手を入れる必要はありません。

過度に多重化することにより関連エンティティがやたら増えたり、それによるSQLの遅延などの弊害もあります。適度なバランス感が必要ではあるのですが、チューニングのフェーズでどうにかなると思っていたりもします。

投稿日時 : 2007年7月13日 0:54

Feedback

# re: 仕様変更に強いシステム 2007/07/13 1:07 中博俊

んー
難しいかなぁ。
プログラムがバグって変なデータを生成されるリスクのほうが高いと私は見て、できるだけ変なデータの入り込む余地を減らします。

# re: 仕様変更に強いシステム 2007/07/13 2:39 えムナウ

オーバースペックは考え出すときりがありません。
データベース設計の中で関連エンティティは重要ですが過度な設定は問題があります。
適度をどの辺に設定するかですね。

# re: 仕様変更に強いシステム 2007/07/13 9:27 かずくん

T字型ER手法を提唱する佐藤正美氏に感化された?
私はすでに感化されつつある。内容はまだ理解しきれていないけど。

# re: 仕様変更に強いシステム 2007/07/13 9:56 かつのり

羽生章洋さんと佐藤正美さんの影響が強いですね。
どちらかというと、必ずサロゲートキー派なので、
羽生さんの影響が強いかも。

確かにオーバースペックなのは分かっていて、
周りの理解も少ないのが原状・・・

# re: 仕様変更に強いシステム 2007/07/13 12:07 nagise

システムってのは制約することで単純化しているという側面が大きいですからね。
制約を減らそうとすればするほど、次元の悪魔が想定しないといけない問題を爆発的に増やしてくれる…。

工数上の問題から、単一システムの開発でそこまでしようとは考えたくないのですが、汎用システムならあるいは、といったところでしょうか。

実際に採用する/しないはともかく、できるだけ多くの方法論を考えて吟味してストックしておかないと。
ネタ帳のネタは9割はボツになるのですが…

# Heya i am for the first time here. I found this board and I find It truly useful & it helped me out a lot. I'm hoping to give one thing again and aid others like you helped me. 2019/05/04 5:53 Heya i am for the first time here. I found this bo

Heya i am for the first time here. I found this board and I find
It truly useful & it helped me out a lot. I'm hoping to give one thing again and aid others like you helped me.

# Hello, its fastidious post regarding media print, we all be familiar with media is a fantastic source of facts. 2019/06/23 21:22 Hello, its fastidious post regarding media print,

Hello, its fastidious post regarding media print, we all be
familiar with media is a fantastic source of facts.

# Yesterday, while I was at work, my cousin stole my apple ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is totally off topic but I had to share 2019/08/15 9:34 Yesterday, while I was at work, my cousin stole my

Yesterday, while I was at work, my cousin stole my apple
ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad
is now destroyed and she has 83 views. I know this is totally off topic
but I had to share it with someone!

# Yesterday, while I was at work, my cousin stole my apple ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is totally off topic but I had to share 2019/08/15 9:35 Yesterday, while I was at work, my cousin stole my

Yesterday, while I was at work, my cousin stole my apple
ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad
is now destroyed and she has 83 views. I know this is totally off topic
but I had to share it with someone!

# Yesterday, while I was at work, my cousin stole my apple ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is totally off topic but I had to share 2019/08/15 9:36 Yesterday, while I was at work, my cousin stole my

Yesterday, while I was at work, my cousin stole my apple
ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad
is now destroyed and she has 83 views. I know this is totally off topic
but I had to share it with someone!

# Yesterday, while I was at work, my cousin stole my apple ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is totally off topic but I had to share 2019/08/15 9:37 Yesterday, while I was at work, my cousin stole my

Yesterday, while I was at work, my cousin stole my apple
ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My iPad
is now destroyed and she has 83 views. I know this is totally off topic
but I had to share it with someone!

# Hello, i think that i saw you visited my weblog so i came to “return the favor”.I'm attempting to find things to enhance my website!I suppose its ok to use a few of your ideas!! 2022/06/10 7:25 Hello, i think that i saw you visited my weblog so

Hello, i think that i saw you visited my weblog so i came to “return the
favor”.I'm attempting to find things to enhance my website!I suppose its ok
to use a few of your ideas!!

タイトル
名前
Url
コメント