🔶 Attribute Inheritance
Definition: In generalization/specialization hierarchies, attribute inheritance refers to the idea that subclasses (sub-entities) inherit the attributes of their superclass (super-entity).
🔹 Example:
Consider the following hierarchy:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Domain Tree Hierarchy</title>
<style>
.infographic-domtree {
--ink: #1a1a1a;
--ink-soft: #5c5c5c;
--paper: #ffffff;
--paper-alt: #f0ece4;
--accent: #2563eb;
--accent-soft:#e3ebfd;
--line: #ddd6c9;
--display-font: Georgia, 'Iowan Old Style', serif;
--body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--mono-font: 'SF Mono', Consolas, monospace;
background: var(--paper);
color: var(--ink);
font-family: var(--body-font);
max-width: 1180px;
margin: 0 auto;
box-sizing: border-box;
}
.infographic-domtree[data-theme="dark"] {
--ink: #e8e6e1;
--ink-soft: #9a968c;
--paper: #121212;
--paper-alt: #1e1e26;
--accent: #5b8def;
--accent-soft:#202942;
--line: #2c313d;
}
.infographic-domtree * { box-sizing: border-box; }
.dt-head { text-align: center; margin-bottom: 0.25rem; }
.dt-head h2 {
font-family: var(--display-font);
font-size: 2.1rem;
margin: 0 0 0.5rem;
letter-spacing: -0.01em;
}
.dt-head p {
color: var(--ink-soft);
font-size: 1.08rem;
margin: 0 auto;
max-width: 560px;
}
.dt-body {
display: grid;
grid-template-columns: 1fr 260px;
gap: 2.25rem;
align-items: start;
margin-top: 2.25rem;
}
@media (max-width: 780px) {
.dt-body { grid-template-columns: 1fr; }
}
.dt-svg-wrap {
background: var(--paper-alt);
border: 1px solid var(--line);
border-radius: 10px;
padding: 1.5rem 1rem 1rem;
}
.dt-node circle {
fill: var(--paper);
stroke: var(--line);
stroke-width: 1.5;
cursor: pointer;
transition: stroke 0.15s, fill 0.15s, opacity 0.15s;
}
.dt-node text {
fill: var(--ink);
font-size: 16px;
font-family: var(--body-font);
pointer-events: none;
transition: fill 0.15s, opacity 0.15s;
}
.dt-node .dt-sub {
fill: var(--ink-soft);
font-size: 12.5px;
}
.dt-edge {
stroke: var(--line);
stroke-width: 2;
transition: stroke 0.15s, stroke-width 0.15s, opacity 0.15s;
}
.dt-node.is-dim circle,
.dt-node.is-dim text { opacity: 0.35; }
.dt-edge.is-dim { opacity: 0.3; }
.dt-node.is-active circle {
stroke: var(--accent);
stroke-width: 3.5;
fill: var(--accent-soft);
}
.dt-node.is-active text { fill: var(--accent); }
.dt-node.is-root.is-active circle { fill: var(--accent); }
.dt-node.is-root.is-active text { fill: var(--paper); }
.dt-edge.is-active {
stroke: var(--accent);
stroke-width: 3.5;
}
.dt-node.is-root:not(.is-active) circle { fill: var(--paper-alt); stroke-width: 2; }
.dt-panel {
background: var(--paper-alt);
border: 1px solid var(--line);
border-radius: 10px;
padding: 1.1rem 1.2rem;
min-height: 240px;
}
.dt-panel .dt-panel-title {
font-family: var(--display-font);
font-size: 1.15rem;
margin: 0 0 0.2rem;
color: var(--accent);
}
.dt-panel .dt-panel-role {
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--ink-soft);
margin: 0 0 0.85rem;
}
.dt-panel .dt-panel-chain {
font-family: var(--mono-font);
font-size: 0.85rem;
color: var(--ink);
background: var(--paper);
border: 1px solid var(--line);
border-radius: 6px;
padding: 0.55rem 0.7rem;
margin: 0 0 0.85rem;
line-height: 1.5;
word-break: break-word;
}
.dt-panel .dt-panel-desc {
font-size: 0.88rem;
color: var(--ink-soft);
line-height: 1.5;
margin: 0;
}
.dt-panel .dt-hint {
font-size: 0.88rem;
color: var(--ink-soft);
line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
.infographic-domtree *, .infographic-domtree *::before, .infographic-domtree *::after {
transition-duration: 0.001ms !important;
animation-duration: 0.001ms !important;
}
}
</style>
</head>
<body>
<div class="infographic-domtree" id="domtree">
<div class="dt-head">
<h2>Domain Tree Hierarchy</h2>
<p>Click any domain to trace its trust path back to the forest root.</p>
</div>
<div class="dt-body">
<div class="dt-svg-wrap">
<svg viewBox="0 0 900 440" width="100%" role="img" aria-label="Domain tree diagram">
<!-- edges -->
<line class="dt-edge" data-edge="A-B" x1="450" y1="90" x2="270" y2="215"></line>
<line class="dt-edge" data-edge="A-F" x1="450" y1="90" x2="640" y2="215"></line>
<line class="dt-edge" data-edge="B-C" x1="270" y1="215" x2="110" y2="350"></line>
<line class="dt-edge" data-edge="B-D" x1="270" y1="215" x2="305" y2="350"></line>
<line class="dt-edge" data-edge="F-G" x1="640" y1="215" x2="760" y2="350"></line>
<!-- Domain A / root -->
<g class="dt-node is-root" data-id="A" tabindex="0" role="button" aria-label="Domain A, My underscore MSP, forest root">
<circle cx="450" cy="90" r="55"></circle>
<text x="450" y="85" text-anchor="middle">Domain A</text>
<text x="450" y="104" text-anchor="middle" class="dt-sub">My_MSP</text>
</g>
<!-- Domain B -->
<g class="dt-node" data-id="B" tabindex="0" role="button" aria-label="Domain B">
<circle cx="270" cy="215" r="49"></circle>
<text x="270" y="221" text-anchor="middle">Domain B</text>
</g>
<!-- Domain F -->
<g class="dt-node" data-id="F" tabindex="0" role="button" aria-label="Domain F">
<circle cx="640" cy="215" r="49"></circle>
<text x="640" y="221" text-anchor="middle">Domain F</text>
</g>
<!-- Domain C -->
<g class="dt-node" data-id="C" tabindex="0" role="button" aria-label="Domain C">
<circle cx="110" cy="350" r="45"></circle>
<text x="110" y="356" text-anchor="middle">Domain C</text>
</g>
<!-- Domain D -->
<g class="dt-node" data-id="D" tabindex="0" role="button" aria-label="Domain D">
<circle cx="305" cy="350" r="45"></circle>
<text x="305" y="356" text-anchor="middle">Domain D</text>
</g>
<!-- Domain G -->
<g class="dt-node" data-id="G" tabindex="0" role="button" aria-label="Domain G">
<circle cx="760" cy="350" r="45"></circle>
<text x="760" y="356" text-anchor="middle">Domain G</text>
</g>
</svg>
</div>
<div class="dt-panel" id="dtPanel">
<p class="dt-hint">Select a domain node to see its position in the tree and its trust chain up to the root.</p>
</div>
</div>
</div>
<script>
(function () {
// Dark mode detection — priority: body attribute, then cookie
const wrapper = document.getElementById('domtree');
const bodyAttr = document.body.getAttribute('data-darkmode');
let dark;
if (bodyAttr === 'true') {
dark = true;
} else if (bodyAttr === 'false') {
dark = false;
} else {
const match = document.cookie.match(/(?:^|;\s*)darkMode=([^;]+)/);
dark = match ? match[1] === 'true' : false;
}
if (dark) wrapper.setAttribute('data-theme', 'dark');
})();
(function () {
// Tree structure: parent map + info per domain
const parent = { A: null, B: 'A', F: 'A', C: 'B', D: 'B', G: 'F' };
const info = {
A: { role: 'Forest root domain', desc: 'Top of the namespace. Every domain in the forest ultimately trusts A. Managed as My_MSP.' },
B: { role: 'Child domain of A', desc: 'Shares a two-way transitive trust with A. Parent to C and D.' },
F: { role: 'Child domain of A', desc: 'Shares a two-way transitive trust with A. Parent to G.' },
C: { role: 'Child domain of B (grandchild of A)', desc: 'Trusts B directly, and A transitively through B.' },
D: { role: 'Child domain of B (grandchild of A)', desc: 'Trusts B directly, and A transitively through B.' },
G: { role: 'Child domain of F (grandchild of A)', desc: 'Trusts F directly, and A transitively through F.' }
};
const nodes = document.querySelectorAll('.dt-node');
const edges = document.querySelectorAll('.dt-edge');
const panel = document.getElementById('dtPanel');
function pathToRoot(id) {
const chain = [id];
let cur = id;
while (parent[cur]) {
cur = parent[cur];
chain.push(cur);
}
return chain.reverse(); // root first
}
function edgeKeyBetween(a, b) {
return [a + '-' + b, b + '-' + a];
}
function select(id) {
const chain = pathToRoot(id); // e.g. ['A','B','C']
const chainSet = new Set(chain);
nodes.forEach(n => {
const nid = n.dataset.id;
n.classList.toggle('is-active', chainSet.has(nid));
n.classList.toggle('is-dim', !chainSet.has(nid));
});
edges.forEach(e => {
const [x, y] = e.dataset.edge.split('-');
const onPath = chain.includes(x) && chain.includes(y) &&
Math.abs(chain.indexOf(x) - chain.indexOf(y)) === 1;
e.classList.toggle('is-active', onPath);
e.classList.toggle('is-dim', !onPath);
});
const meta = info[id];
const chainLabel = chain.map(c => c === 'A' ? 'A (My_MSP)' : c).join(' → ');
panel.innerHTML =
'<p class="dt-panel-title">Domain ' + id + '</p>' +
'<p class="dt-panel-role">' + meta.role + '</p>' +
'<p class="dt-panel-chain">' + chainLabel + '</p>' +
'<p class="dt-panel-desc">' + meta.desc + '</p>';
}
nodes.forEach(n => {
n.addEventListener('click', () => select(n.dataset.id));
n.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
select(n.dataset.id);
}
});
});
})();
</script>
</body>
</html>.demo {
font-family: system-ui, sans-serif;
padding: 16px;
}
.demo h1 {
color: #2563eb;
margin: 0 0 8px;
}
.demo p {
color: #4b5563;
margin: 0;
}document.querySelector('.demo h1')?.addEventListener('click', () => {
alert('Hello from live preview!');
});Domain A is the superclass.
Domain B and D Domain F are subclasses.
They can also have their own specialized attributes Domain C, Domain D and Domain G
✔️ Key Point: Subclasses have all attributes of the superclass, plus any specific ones they define.
🔶 Participation Inheritance
Participation inheritance refers to how a subclass (child entity) inherits participation in relationships of the superclass (parent entity).
✅ Total Participation Inheritance
If the superclass participates in a relationship, all its subclasses also participate.
Example: If every Employee must be assigned to a Department, then Manager and Engineer also must be assigned to a Department.
✅ Partial Participation Inheritance
If the superclass participates optionally in a relationship, subclasses may or may not participate.
Example: If only some Employees are assigned to a Project, then Manager or Engineer may or may not be assigned.
🧩 Summary Table
Concept | Description | Example |
|---|---|---|
Attribute Inheritance | Subclass inherits attributes from superclass |
|
Participation Inheritance | Subclass inherits the participation in relationships of superclass |
|