开发者

Supertype/subtype database schema question

I have 开发者_运维技巧a database of resources with the typical address, email and all that jazz. One resources can be used by one or more counties. The resources are categorized by Education, Health Care and a couple others. A resource will only ever have one category so it cannot be education and health care, for instance. I would like to use the supertype/subtype relationship. Currently, no category (health care, education etc.) do not have any differing attributes. How could I amend my schema to accommodate that?

below is a screen cap of my current schema. http://imgur.com/fbrFB


The whole point of a supertype/subtype structure is to gather the attributes common to all subtypes together in one table, the supertype, and to isolate the attributes unique to each subtype in separate tables.

If all your subtypes have the same attributes, what's the point?

I think you'll get more benefit from reconsidering how you're going to handle addresses. Anyone who has a PO box for mail is liable to have different ZIP codes for their physical and mailing addresses.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜