<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Functional Dependency | Psyops Prime</title>
	<atom:link href="https://psyopsprime.com/tag/functional-dependency/feed/" rel="self" type="application/rss+xml" />
	<link>https://psyopsprime.com</link>
	<description>An Idea Log</description>
	<lastBuildDate>Fri, 23 Dec 2016 06:46:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<creativeCommons:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</creativeCommons:license>
<site xmlns="com-wordpress:feed-additions:1">99640787</site>	<item>
		<title>Figuring Out Functional Dependencies in Relations</title>
		<link>https://psyopsprime.com/education/figuring-out-functional-dependencies-in-relations/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=figuring-out-functional-dependencies-in-relations</link>
					<comments>https://psyopsprime.com/education/figuring-out-functional-dependencies-in-relations/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 23 Dec 2016 06:46:52 +0000</pubDate>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Functional Dependency]]></category>
		<category><![CDATA[Normalization]]></category>
		<guid isPermaLink="false">http://psyopsprime.com/?p=1340</guid>

					<description><![CDATA[<p>A succinct definition of a functional dependency, such as X->Y, is that whenever X assumes a certain value (say x), and for that value of X (x), Y assumes a certain value y, then in every subsequent retrievals of X, whenever X assumes the value x, Y should assume the value y. Thats it! Functional dependency is no more than that. It is a very simple mathematical idea. It is the job of the subsequent normal forms to reduce the dependency of non-key attributes on non-key attributes.</p>
The post <a href="https://psyopsprime.com/education/figuring-out-functional-dependencies-in-relations/">Figuring Out Functional Dependencies in Relations</a> first appeared on <a href="https://psyopsprime.com">Psyops Prime</a>.]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">I have been trying to teach databases to juniors for the past some time. In one of my previous lectures on normalization, I had a guest auditor in my class to review my lecture. After the lecture was over, I had an opportunity to talk to him. The purpose was to get reflections on my teaching style.</p>
<p style="text-align: justify;">I was stunned by his question that how long I was taking to prepare my lectures. My reply was that I had nearly spent five weeks to prepare my lecture on normalization (although I have spent more than that). The reason I spent so much time in preparing for normalization is that I had eyed it in the beginning of the course as the most important topic in databases. And, indeed, it is.</p>
<p style="text-align: justify;">Anyhow, the reason he surmised that I was not preparing my lectures well was grounded in his observation about the way I taught about functional dependencies. A student asked that should X always be a key attribute in a functional dependency X-&gt;Y? My answer was no, it need not be. I am still adamant about my answer. So in a functional dependency such as X-&gt;Y, either one of X or Y can be a key or non-key attribute. The idea behind normal forms is to address issues related to key and non-key attributes.</p>
<p style="text-align: justify;">A succinct definition of a functional dependency, such as X-&gt;Y, is that whenever X assumes a certain value (say x), and for that value of X (x), Y assumes a certain value y, then in every subsequent retrievals of X, whenever X assumes the value x, Y should assume the value y. Thats it! Functional dependency is no more than that. It is a very simple mathematical idea. It is the job of the subsequent normal forms to reduce the dependency of non-key attributes on non-key attributes.</p>
<p style="text-align: justify;">I had to haggle with my friend a little bit to convince him about my point. And that discourse kept me thinking about functional dependency for quite some time. One of the questions I pondered about was how to figure out a functional dependency between attributes, which are nothing more than variables in a mathematical sense.</p>
<p style="text-align: justify;">A very easy way to figure out functional dependencies between attributes is to review the cardinality of their relationships. Just keep in mind the definition of functional dependency I gave in the paragraph above (actually two paragraphs above). Now if two attributes (X and Y) have a zero-to-zero relationship, what is the functional dependency going to be? They shall have no functional dependency! They shall be independent of each other as nothing in X maps on Y.</p>
<p style="text-align: justify;">Similarly, in case of a one-to-one relationship between X and Y, there will be a bidirectional dependency meaning X-&gt;Y and Y-&gt;X shall hold.</p>
<p style="text-align: justify;">In case of a one-to-many relationship between X and Y, where X is on the one side and Y on the many side, the functional dependency Y-&gt;X shall hold. The reason is that many values of Y shall map on a single value of X, so Y-X. But one value of X shall map on many values of Y, so X-&gt;Y shall not hold. Similarly, for the converse, i.e. many-to-one relationship between X and Y, the functional dependency X-&gt;Y shall hold.</p>
<p style="text-align: justify;">For the many-to-many relationship between X and Y, there will again be no functional dependency between the two. The reason is that a value of X shall map on multiple values of Y and vice versa, thus violating the definition of functional dependency.</p>
<p style="text-align: justify;">What do you think would be the functional dependency in the case of a zero-or-one-to-many relationship? I leave it for you guys to figure out.</p>
<p><small><a style="text-decoration: none;" title="Image inserted by the ImageInject WordPress plugin" href="http://wpinject.com/" rel="nofollow">Photo</a> by <a href="http://www.flickr.com/photos/130441601@N08/15826606934" target="_blank">mattacevedo</a> <a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank" rel="nofollow"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/psyopsprime.com/wp-content/plugins/wp-inject/images/cc.png?w=750" /></a></small></p>The post <a href="https://psyopsprime.com/education/figuring-out-functional-dependencies-in-relations/">Figuring Out Functional Dependencies in Relations</a> first appeared on <a href="https://psyopsprime.com">Psyops Prime</a>.]]></content:encoded>
					
					<wfw:commentRss>https://psyopsprime.com/education/figuring-out-functional-dependencies-in-relations/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
				<creativeCommons:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</creativeCommons:license>
<post-id xmlns="com-wordpress:feed-additions:1">1340</post-id>	</item>
	</channel>
</rss>
