<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wikitechia.top/index.php?action=history&amp;feed=atom&amp;title=ER_and_relational_model</id>
	<title>ER and relational model - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wikitechia.top/index.php?action=history&amp;feed=atom&amp;title=ER_and_relational_model"/>
	<link rel="alternate" type="text/html" href="http://wikitechia.top/index.php?title=ER_and_relational_model&amp;action=history"/>
	<updated>2026-10-26T04:52:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1946&amp;oldid=prev</id>
		<title>Root: /* 1 to 1 relationships (1:1) */</title>
		<link rel="alternate" type="text/html" href="http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1946&amp;oldid=prev"/>
		<updated>2026-02-17T07:22:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;1 to 1 relationships (1:1)&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:22, 17 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to 1 relationships (1:1) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to 1 relationships (1:1) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Each instance of entity A is related to at most one instance of entity B, and vice versa.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Each instance of entity A is related to at most one instance of entity B, and vice versa.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Database 1 to 1.png|none|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Database 1 to 1.png|none|thumb]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To create a unique relationship between entities, we can make use of SQL with the UNIQUE column constraint.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to N relationships (1:N) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to N relationships (1:N) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Root</name></author>
	</entry>
	<entry>
		<id>http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1945&amp;oldid=prev</id>
		<title>Root: /* 1 to 1 relationships (1:1) */</title>
		<link rel="alternate" type="text/html" href="http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1945&amp;oldid=prev"/>
		<updated>2026-02-17T06:31:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;1 to 1 relationships (1:1)&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:31, 17 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to 1 relationships (1:1) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to 1 relationships (1:1) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Each instance of entity A is related to at most one instance of entity B, and vice versa.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Each instance of entity A is related to at most one instance of entity B, and vice versa.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:Database 1 to 1.png|none|thumb]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to N relationships (1:N) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 1 to N relationships (1:N) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Root</name></author>
	</entry>
	<entry>
		<id>http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1925&amp;oldid=prev</id>
		<title>Root at 12:48, 14 January 2026</title>
		<link rel="alternate" type="text/html" href="http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1925&amp;oldid=prev"/>
		<updated>2026-01-14T12:48:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://wikitechia.top/index.php?title=ER_and_relational_model&amp;amp;diff=1925&amp;amp;oldid=1924&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Root</name></author>
	</entry>
	<entry>
		<id>http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1924&amp;oldid=prev</id>
		<title>Root at 12:42, 14 January 2026</title>
		<link rel="alternate" type="text/html" href="http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1924&amp;oldid=prev"/>
		<updated>2026-01-14T12:42:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:42, 14 January 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l286&quot;&gt;Line 286:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 286:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Third Normal Form (3NF): Is in 2NF and no non-prime attribute is transitively dependent on the primary key.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Third Normal Form (3NF): Is in 2NF and no non-prime attribute is transitively dependent on the primary key.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Boyce-Codd Normal Form (BCNF): A stronger version of 3NF where every determinant is a candidate key.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Boyce-Codd Normal Form (BCNF): A stronger version of 3NF where every determinant is a candidate key.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:IT Databases]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Root</name></author>
	</entry>
	<entry>
		<id>http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1923&amp;oldid=prev</id>
		<title>Root: Created page with &quot;= Introductory Concepts =  Where data comes from:  * Real world: This is the part of reality that interests us. It consists of concrete objects. * Logical or conceptual world (knowledge or information): An abstract model of the real world. * Representative world (data): The transition from the abstract model of information to a computer representation.  == The Real World ==  From the real world, we must extract abstractions of what interests us.  == The Conceptual World:...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wikitechia.top/index.php?title=ER_and_relational_model&amp;diff=1923&amp;oldid=prev"/>
		<updated>2026-01-14T12:36:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Introductory Concepts =  Where data comes from:  * Real world: This is the part of reality that interests us. It consists of concrete objects. * Logical or conceptual world (knowledge or information): An abstract model of the real world. * Representative world (data): The transition from the abstract model of information to a computer representation.  == The Real World ==  From the real world, we must extract abstractions of what interests us.  == The Conceptual World:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introductory Concepts =&lt;br /&gt;
&lt;br /&gt;
Where data comes from:&lt;br /&gt;
&lt;br /&gt;
* Real world: This is the part of reality that interests us. It consists of concrete objects.&lt;br /&gt;
* Logical or conceptual world (knowledge or information): An abstract model of the real world.&lt;br /&gt;
* Representative world (data): The transition from the abstract model of information to a computer representation.&lt;br /&gt;
&lt;br /&gt;
== The Real World ==&lt;br /&gt;
&lt;br /&gt;
From the real world, we must extract abstractions of what interests us.&lt;br /&gt;
&lt;br /&gt;
== The Conceptual World: Entities, Attributes, and Values ==&lt;br /&gt;
&lt;br /&gt;
All information is characterized by three elements: entity, attribute, and value.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Entity&amp;#039;&amp;#039;&amp;#039;: A distinguishable object from others, whose properties interest us. It is the object of information.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Attribute&amp;#039;&amp;#039;&amp;#039;: The properties that describe the object.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Value&amp;#039;&amp;#039;&amp;#039;: The data itself that characterizes the attribute.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Domain&amp;#039;&amp;#039;&amp;#039;: The set of all valid values an attribute can have.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Null&amp;#039;&amp;#039;&amp;#039;: Determines an unknown value.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Key&amp;#039;&amp;#039;&amp;#039;: An attribute or set of attributes that allows individual entities to be identified.&lt;br /&gt;
&lt;br /&gt;
== The World of Representations ==&lt;br /&gt;
&lt;br /&gt;
The computer representation of an elementary piece of information is called data.&lt;br /&gt;
&lt;br /&gt;
To represent data, a tabular representation is usually used, where each row represents an individual entity and each column identifies an attribute of the entity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Register/Record&amp;#039;&amp;#039;&amp;#039;: The representation of an entity, equivalent to a row in the table.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Field&amp;#039;&amp;#039;&amp;#039;: The representation of an attribute of an entity.&lt;br /&gt;
&lt;br /&gt;
The set of fields forms the record, and the set of records forms the file or table.&lt;br /&gt;
&lt;br /&gt;
= Conceptual Design: The Entity-Relationship (ER) Model =&lt;br /&gt;
&lt;br /&gt;
The entity-relationship data model is used to model data for use in a database. ER models are directly translatable to the relational model. These models are represented using ER diagrams.&lt;br /&gt;
&lt;br /&gt;
ER modeling is based on three concepts:&lt;br /&gt;
&lt;br /&gt;
* Entities: Real-world objects of which we want to model some properties, and which are distinguishable from other objects.&lt;br /&gt;
* Relationships: Associations and interactions between entities.&lt;br /&gt;
* Attributes: Properties of interest of entities and some relationships.&lt;br /&gt;
&lt;br /&gt;
== Entities and Attributes ==&lt;br /&gt;
&lt;br /&gt;
In an ER diagram, entity types are represented, defining a collection of similar entities. An entity type is represented with its name in capital letters inside a box.&lt;br /&gt;
[[File:Db entites attributes.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Keys ==&lt;br /&gt;
&lt;br /&gt;
=== Candidate Key ===&lt;br /&gt;
A set of attributes that uniquely identifies an entity.&lt;br /&gt;
&lt;br /&gt;
=== Simple and Composite Keys ===&lt;br /&gt;
A simple key consists of a single attribute. A composite key consists of two or more attributes.&lt;br /&gt;
&lt;br /&gt;
=== Primary Key ===&lt;br /&gt;
The candidate key chosen by the database designer to uniquely identify entities.&lt;br /&gt;
&lt;br /&gt;
=== Alternative Key ===&lt;br /&gt;
Candidate keys that were not chosen as the primary key.&lt;br /&gt;
&lt;br /&gt;
=== Synthetic Keys ===&lt;br /&gt;
An artificial key created when no natural candidate key exists or when they are too complex.&lt;br /&gt;
&lt;br /&gt;
== Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== Degree of Relationships ===&lt;br /&gt;
Refers to the number of entities participating in a relationship.&lt;br /&gt;
[[File:Db relations degree.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== Attributes in Relationships ===&lt;br /&gt;
Relationships can also have attributes that describe the association.&lt;br /&gt;
[[File:Database relations attributes.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Connectivity of Binary Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== 1 to 1 Relationships (1:1) ===&lt;br /&gt;
Each instance of entity A is related to at most one instance of entity B, and vice versa.&lt;br /&gt;
&lt;br /&gt;
=== 1 to N Relationships (1:N) ===&lt;br /&gt;
One instance of entity A can be related to many instances of entity B, but B is related to only one of A.&lt;br /&gt;
[[File:Database relations 1 N.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
=== N to M Relationships (N:M) ===&lt;br /&gt;
Instances of entity A can be related to many instances of entity B, and vice versa.&lt;br /&gt;
[[File:Database relations n m.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Minimum Connectivities ==&lt;br /&gt;
Specifies the minimum number of times an entity instance can participate in a relationship (usually 0 or 1).&lt;br /&gt;
[[File:Database minimum connectivities.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Recursive Relationships ==&lt;br /&gt;
When an entity is related to itself.&lt;br /&gt;
[[File:Database recursive relationship.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Ternary Relationships ==&lt;br /&gt;
Relationships involving three different entities.&lt;br /&gt;
[[File:Database ternary relationships.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Connectivity of Ternary Relationships ==&lt;br /&gt;
Defines the mapping constraints (1:1:1, 1:1:N, 1:N:M, N:M:P) within a three-way association.&lt;br /&gt;
[[File:Database connectivity ternary relationships.png|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Types of Entities ==&lt;br /&gt;
&lt;br /&gt;
=== Strong and Weak Entities ===&lt;br /&gt;
Strong entities exist independently. Weak entities depend on a &amp;quot;parent&amp;quot; entity for their existence and identification.&lt;br /&gt;
&lt;br /&gt;
== Generalization/Specialization ==&lt;br /&gt;
A hierarchy where a &amp;quot;supertype&amp;quot; entity shares common attributes with &amp;quot;subtype&amp;quot; entities.&lt;br /&gt;
&lt;br /&gt;
== Associative Entities ==&lt;br /&gt;
A relationship that is treated as an entity so it can participate in other relationships.&lt;br /&gt;
&lt;br /&gt;
= The Relational Model =&lt;br /&gt;
&lt;br /&gt;
== Fundamental Concepts in the Relational Model ==&lt;br /&gt;
&lt;br /&gt;
=== Domain ===&lt;br /&gt;
The set of valid values for an attribute.&lt;br /&gt;
&lt;br /&gt;
=== Registries ===&lt;br /&gt;
The set of rows in a table.&lt;br /&gt;
&lt;br /&gt;
=== Degree ===&lt;br /&gt;
The degree is the number of attributes in a table.&lt;br /&gt;
&lt;br /&gt;
== Properties of a Table ==&lt;br /&gt;
&lt;br /&gt;
* It has a unique name within the database.&lt;br /&gt;
* No duplicate rows.&lt;br /&gt;
* Column entries are atomic.&lt;br /&gt;
* Column entries are from the same domain.&lt;br /&gt;
* Operations combining different data types are not allowed.&lt;br /&gt;
* Each attribute has a unique name.&lt;br /&gt;
* The order of columns is insignificant.&lt;br /&gt;
* The order of rows is insignificant.&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
Terminology table (Term | Alt 1 | Alt 2):&lt;br /&gt;
* Relation | Table | File&lt;br /&gt;
* Tuple | Row | Record&lt;br /&gt;
* Attribute | Column | Field&lt;br /&gt;
&lt;br /&gt;
= Integrity Rules and Constraints =&lt;br /&gt;
&lt;br /&gt;
Constraints allow a designer to specify the semantics of data. They are rules that force the DBMS to check that data satisfies the semantics.&lt;br /&gt;
&lt;br /&gt;
== Domain Integrity ==&lt;br /&gt;
The domain restricts the values of attributes in the relation.&lt;br /&gt;
&lt;br /&gt;
=== Entity Integrity ===&lt;br /&gt;
Requires that every table has a primary key. Neither the PK nor any of its parts can contain null values.&lt;br /&gt;
&lt;br /&gt;
=== Referential Integrity ===&lt;br /&gt;
Requires that a foreign key must either have a corresponding primary key or be null. It prevents &amp;quot;orphan records&amp;quot; (FK pointing to a non-existent PK).&lt;br /&gt;
&lt;br /&gt;
Note: When configuring referential integrity, the PK and FK must have the same data type and come from the same domain.&lt;br /&gt;
&lt;br /&gt;
=== Rules for Foreign Keys ===&lt;br /&gt;
Additional rules for when a parent record is modified or deleted:&lt;br /&gt;
* Cascade Update: Propagates changes to child records.&lt;br /&gt;
* Cascade Delete: Deletes related child records.&lt;br /&gt;
&lt;br /&gt;
== Business Rules ==&lt;br /&gt;
Additional rules specified by users or administrators.&lt;br /&gt;
&lt;br /&gt;
=== Cardinality and Connectivity ===&lt;br /&gt;
Constraints based on the number of related entities.&lt;br /&gt;
&lt;br /&gt;
=== Types of Relationships ===&lt;br /&gt;
Specific business logic defining how entities interact.&lt;br /&gt;
&lt;br /&gt;
=== Optional and Mandatory Relationships ===&lt;br /&gt;
Determines if an entity must or may participate in a relationship.&lt;br /&gt;
&lt;br /&gt;
= Translating the ER Model to the Relational Model =&lt;br /&gt;
&lt;br /&gt;
== 1 to 1 Relationships ==&lt;br /&gt;
The primary key of one side is placed as a foreign key (FK) in the other.&lt;br /&gt;
&lt;br /&gt;
== 1 to N Relationships ==&lt;br /&gt;
The primary key from the &amp;quot;1&amp;quot; side is passed to the &amp;quot;many&amp;quot; (N) side as a foreign key.&lt;br /&gt;
&lt;br /&gt;
== N to M Relationships ==&lt;br /&gt;
A new table is created containing the primary keys of both entities as a composite primary key.&lt;br /&gt;
&lt;br /&gt;
== Weak Entities ==&lt;br /&gt;
The primary key of the weak entity is composed of the primary key of the strong entity plus a discriminator.&lt;br /&gt;
&lt;br /&gt;
== Recursive Relationships ==&lt;br /&gt;
The primary key is mapped as a foreign key within the same table, using a different name.&lt;br /&gt;
&lt;br /&gt;
== Ternary Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== Example of 1-1-1 Ternary Relationship ===&lt;br /&gt;
Handled by merging keys into one of the entities or creating a junction table depending on specific constraints.&lt;br /&gt;
&lt;br /&gt;
=== Example of N-M-1 Ternary Relationship ===&lt;br /&gt;
The PKs of the &amp;quot;N&amp;quot; and &amp;quot;M&amp;quot; sides are usually moved to a new table along with the &amp;quot;1&amp;quot; side&amp;#039;s PK.&lt;br /&gt;
&lt;br /&gt;
=== Example of N-M-P Ternary Relationship ===&lt;br /&gt;
A new table is created with the PKs of all three entities.&lt;br /&gt;
&lt;br /&gt;
=== Example of Transformation of a Hierarchical Relationship ===&lt;br /&gt;
Conversion of sub-types into either separate tables or a single table with a type indicator.&lt;br /&gt;
&lt;br /&gt;
== Issues in ER to Relational Transformation ==&lt;br /&gt;
&lt;br /&gt;
=== The Deadlock (Circular Reference) ===&lt;br /&gt;
Occurs when Table A references Table B, and Table B references Table A.&lt;br /&gt;
&lt;br /&gt;
Solution 1: Create Table A first without the FK. Create Table B with the FK to A. Then add the FK constraint to Table A.&lt;br /&gt;
Example: &lt;br /&gt;
DEPARTMENTS(Id, ..., idEmployee)&lt;br /&gt;
EMPLOYEES(IdEmployee, ..., idDepartment) where idDepartment references DEPARTMENTS.&lt;br /&gt;
&lt;br /&gt;
Solution 2: Create a third table (Table C) to manage the relationship so that the initial tables do not reference each other directly.&lt;br /&gt;
Example:&lt;br /&gt;
DEPARTMENTS(Id, ...)&lt;br /&gt;
EMPLOYEES(IdEmployee, ..., idDepartment)&lt;br /&gt;
MANAGED_BY(idDepartment, idEmployee)&lt;br /&gt;
&lt;br /&gt;
The second solution is generally better for avoiding insertion problems.&lt;br /&gt;
&lt;br /&gt;
== Summary of ER to Relational Transformations ==&lt;br /&gt;
&lt;br /&gt;
Transformation mappings (ER Model -&amp;gt; Relational Model):&lt;br /&gt;
* Entity -&amp;gt; Table&lt;br /&gt;
* Attributes -&amp;gt; Columns&lt;br /&gt;
* Weak Entity -&amp;gt; New table with owner&amp;#039;s PK&lt;br /&gt;
* Attributes -&amp;gt; Same fields&lt;br /&gt;
* Primary Key -&amp;gt; Primary Key&lt;br /&gt;
* 1:1 Relationship -&amp;gt; Pass the key to one side as FK&lt;br /&gt;
* 1:N Relationship -&amp;gt; Pass the key of the &amp;quot;1&amp;quot; side to the &amp;quot;many&amp;quot; side as FK&lt;br /&gt;
* N:N or Non-binary -&amp;gt; New table&lt;br /&gt;
* N-ary Relationship -&amp;gt; New table&lt;br /&gt;
&lt;br /&gt;
= ER Modeling =&lt;br /&gt;
&lt;br /&gt;
== Relational Design and Redundancy ==&lt;br /&gt;
Redundancy is normally undesirable. Poor designs lead to:&lt;br /&gt;
* Information repetition (Redundancy).&lt;br /&gt;
* Inability to represent information.&lt;br /&gt;
* Insertion Anomaly: Inconsistent information inserted.&lt;br /&gt;
* Update Anomaly: Incorrect existing information changes.&lt;br /&gt;
* Deletion Anomaly: Loss of unintended data when a record is deleted.&lt;br /&gt;
&lt;br /&gt;
A good design must:&lt;br /&gt;
* Store necessary info with minimum redundancy.&lt;br /&gt;
* Maintain minimum links between relations for ease of use.&lt;br /&gt;
* Improve query performance.&lt;br /&gt;
* Minimize update problems.&lt;br /&gt;
&lt;br /&gt;
This is achieved through Normalization and understanding Functional Dependencies (FD).Normalization&lt;br /&gt;
&lt;br /&gt;
The process of determining how much redundancy exists in a table.&lt;br /&gt;
&lt;br /&gt;
=== Normal Forms ===&lt;br /&gt;
The primary key of a relation always functionally determines the rest of the attributes.&lt;br /&gt;
&lt;br /&gt;
Intention: What we want to store (attributes).&lt;br /&gt;
Extension: The set of values (records).&lt;br /&gt;
&lt;br /&gt;
Functional Dependency (FD): A constraint {X} → {Y} where the value of X uniquely determines the value of Y.&lt;br /&gt;
Full Functional Dependency: When no subset of {X} can determine {Y}.&lt;br /&gt;
&lt;br /&gt;
=== Design Anomalies ===&lt;br /&gt;
Modification Anomalies: Forcing changes in all tuples containing a fact.&lt;br /&gt;
Deletion Anomalies: Losing elementary facts unintentionally.&lt;br /&gt;
Insertion Anomalies: Being unable to record a fact because other data is missing.&lt;br /&gt;
&lt;br /&gt;
=== Theory of Normalization ===&lt;br /&gt;
&lt;br /&gt;
* First Normal Form (1NF): All attributes are atomic (no repeating groups).&lt;br /&gt;
* Second Normal Form (2NF): Is in 1NF and every non-prime attribute is fully functionally dependent on the primary key.&lt;br /&gt;
* Third Normal Form (3NF): Is in 2NF and no non-prime attribute is transitively dependent on the primary key.&lt;br /&gt;
* Boyce-Codd Normal Form (BCNF): A stronger version of 3NF where every determinant is a candidate key.&lt;/div&gt;</summary>
		<author><name>Root</name></author>
	</entry>
</feed>