In the healthcare scenario, I don't foresee much of an intersection
between Employees and Customers i.e. what percentage of patients are
employees of the healthcare provider?
Here's another way to look at it. Every patient is a person, and
every employee is a person. So is every doctor. That gives you 100%
intersection between patients and employees, between patients and
doctors, and between employees and doctors.
how much information is common
to both at the base level?
All of it--all information that applies to persons. For example,
mailing addresses and home phone numbers. Height and weight.
Driver's license numbers. SSANs.
Employees and Customers are modelled as
separate entities in the Northwind example database supplied with MS
Access and I would expect a typical newsgroup post to aspire to a
similar level of abstraction.
Northwind doesn't demonstrate good database design; it demonstrates
some of Access's features.
Employees and customers are concrete; "person" is also concrete.
"Parties" is an abstraction encompassing persons and organizations,
but I get ahead of myself. (Think "Some customers are persons, and
other customers are businesses".)
The approach to which you elude is more
suited to OOP in the front end application than the relational model.
Doable but what is gained, I wonder.
No, it simply reflects the reality that every person has zero or more
mailing addresses, regardless of their profession or health. That
reality is independent of a programming methodology. It's even
independent of computers.
An alternative conceptual model can be expressed as
1) Every doctor has zero or more mailing addresses.
2) Every patient has zero or more mailing addresses.
3) Every employee has zero or more mailing addresses.
4) Doctors, patients, and employees have nothing in common.
If you're doing database design for a living, don't present that to
your clients.
Are a doctor's address and a patient's Address the same entity? Yes in
the physical sense but perhaps not in the data model.
At the conceptual level (that is, in the real world), a doctor and a
patient are both persons; they both have zero or more mailing
addresses; their mailing address are drawn from the same domain; and
their mailing addresses have the same semantics (that is, they mean
the same thing).
It doesn't often get easier to understand than that.
In my country, I
suspect Data Protection legislation (i.e. right of access to
information rather than database security) would require a greater
degree of physical separation.
I've read a lot of statutes. I've seen statutes that constrain who is
allowed to see what. I've never seen a statute that says "You can't
store doctor's addresses in the same table as patient's addresses."
I'd be a little surprised to find legislation that said "Accounts
receivable can send bills to patients (see their addresses), but if
the patient is an employee, then accounts receivable can't send them a
bill (see their address)". But even legislation that stupid can be
accommodated with a simple view.
You approach is interesting and thorough, though. Please post your
basic DDL so we can see how if measures up.
If you can't understand "Every doctor is a person, and every person
has zero or more mailing addresses", the odds you'll understand DDL
are slim. Maybe later.