<?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/"
	>

<channel>
	<title>All Free Tech &#187; design</title>
	<atom:link href="http://www.allfreetech.com/tag/design/feed" rel="self" type="application/rss+xml" />
	<link>http://www.allfreetech.com</link>
	<description>For developers</description>
	<lastBuildDate>Tue, 01 Feb 2011 13:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>90s Web Design: a Nostalgic Look Back</title>
		<link>http://www.allfreetech.com/other/90s-web-design-a-nostalgic-look-back-909.html</link>
		<comments>http://www.allfreetech.com/other/90s-web-design-a-nostalgic-look-back-909.html#comments</comments>
		<pubDate>Thu, 22 Jul 2010 05:22:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Back]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Look]]></category>
		<category><![CDATA[Nostalgic]]></category>

		<guid isPermaLink="false">http://www.allfreetech.com/?p=909</guid>
		<description><![CDATA[A nostalgic look back at 90s web design, and a warning to anyone whose website is an accidental anachronism. Think of the times when every PC was beige, every website had a little Netscape icon on the homepage, Geocities and Tripod hosted just about every single personal homepage, and &#34;Google&#34; was just a funny sounding [...]]]></description>
			<content:encoded><![CDATA[<p>A nostalgic look back at 90s web design, and a warning to anyone whose website is an accidental anachronism. </p>
<p>	Think of the times when every PC was beige, every website had a little Netscape icon on the homepage, Geocities and Tripod hosted just about every single personal homepage, and &quot;Google&quot; was just a funny sounding word? </p>
<p>	The mid-late 1990s were the playful childhood of the World Wide Web, a time of great expectations for the future and pretty low standards for the present. Those were the days when it was meant to search the Internet through multiple pages listings Poring instead look at the first three results &#8211; but at least relatively few of these sites unabashedly profit-driven. </p>
<p>	Characteristic of Web-design of the 1990s </p>
<p>	Of course, if someone says that a website looks like it came from 1996, it is not a compliment. You start to imagine loud background images, and little &quot;email me&quot; mailboxes with letters and went out in an endless loop. Amateurish, silly, unprofessional, conceited, and unusable are all adjectives that describe fairly well how most websites were made just ten years. </p>
<p>	Why sites were so bad then? </p>
<p>	Knowledge. Few people knew how to build one good website back then, starting before authorities like Jakob Nielsen evangelizing their studies of web user behavior. </p>
<p>	Difficulty. In those days there were not abundant software and templates that could produce a visually attractive, easy to use website in 10 minutes. Instead, you either hand-coded your site in Notepad or FrontPage. </p>
<p>	Dizziness. When a new toy came out, whether it was JavaScript, Java, frames, animated GIFs or Flash, it was simply crammed into an already crowded toy box of a website, regardless of whether it served any purpose. </p>
<p>	Surf the Internet Archive&#39;s WayBack Machine, it&#39;s hard not to be a tinge of nostalgia for a simpler time, when we were all beginners at this feeling. Nevertheless, one of the best reasons for looking at 90s website design of repeating the history of Web design mistakes to avoid. This would be a useful exercise for the tragic number of today&#39;s personal homepages and even small business websites that just happen to be retro. </p>
<p>	Splash Pages </p>
<p>	Sometime around 1998, pages all over the internet discovered Flash, the software allows for easy animation of images on a website. Suddenly you could no longer visit half the pages on the web without sitting through at least thirty seconds of a logo revolving, sparkling, sliding or bouncing across the screen. </p>
<p>	Flash &quot;splash pages&quot; as these opening animations were called, was the Internet version of vacation pictures. Everyone loved to display Flash on their site, and all hate to have to sit through someone else&#39;s Flash presentation. </p>
<p>	Of all the thousands of splash pages in the 1990s and the few still made today, hardly ever communicated any useful information or provided any trips made. They were monuments to the egos of the websites&#39; owners. Even today, when so many business website owners are working so hard to wring every last bit of effectiveness of their Web sites, it is almost charming in fact to the owner of a company putting ego well ahead of think of the profit to have been obtained from all visitors, press the &quot;Back&quot; button instead of sitting through an animated logo. </p>
<p>	Text Troubles </p>
<p>	&quot;Welcome to &#8230;&quot; Every single website homepage in 1996 had the word &quot;welcome&quot; somewhere, most often in the headline. Finally, it is not to say &quot;welcome&quot; more important than to say that rotates the Web page is all about in the first place? </p>
<p>	Background images. Remember all those people that their children had pictures tiled in the background of every page? Remember how much fun it was difficult to guess what were the words in the sections where the font color and the color of the image were the same? </p>
<p>	Dark background, light text. My favorite was orange font on purple background, though the ubiquitous yellow white text was in blue, green or red is also nice. Of course, who will make their texts more difficult with a silly gimmick is just paying you the courtesy of letting you know, they could not possibly be read written something worth reading. </p>
<p>	Entire paragraphs of text centered. Finally, do not have thousands of flush-left margins just our eyes lazy? </p>
<p>	&quot;This site is best viewed in Netscape 4th 666, 1000 x3300 resolution.&quot; It was always so cute when site owners actually imagined anyone but their mothers would care enough to change their browser to search for some random person on site. </p>
<p>	All-image no-text publishing. do some of the worst websites would actually the world the service of implementing all their text in image format so that no search engine would ever find. What sacrifice! </p>
<p>	Hyperactive Pages </p>
<p>	TV-envy was a common mental illness in web design of the 1990s. Since streaming video and even Flash were still in their infancy, web designers make the elements simply move on their sides, like Mexican jumping beans processed. </p>
<p>	Animated Gifs </p>
<p>	In 1996, just before the dawn of Flash, animated gifs were in full swing, dancing, sliding, and scrolling their way across the retinas of web surfers trying to read the text on the page. </p>
<p>	Scrolling text </p>
<p>	Only if You are a time to dance easy tuning of all the graphics on the page, an ambitious mid-1990s web designer had a simple but powerful trick type headache: scrolling text. Through the magic of JavaScript, website owners could achieve the perfect combination of too fast to read comfortably and too slow to read quickly. </p>
<p>	could for a while, even the owner of a company seriously interested separated from the wannabe just like (looked un) professional their business websites. Unfortunately, means the development of template-based website authoring software means that even someone with no taste or no sense to sites that can be as good as most of the largest budget-design look like five years ago. </p>
<p>	Of course there are some sites that seem to be owned by trying a resurgence in animated GIFs, backgrounds, spark, text, and ugly. &quot;All must only trust that everyone laughing with them, they are not.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.allfreetech.com/other/90s-web-design-a-nostalgic-look-back-909.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Your Corporate Website Design a Winner</title>
		<link>http://www.allfreetech.com/development/make-your-corporate-website-design-a-winner-903.html</link>
		<comments>http://www.allfreetech.com/development/make-your-corporate-website-design-a-winner-903.html#comments</comments>
		<pubDate>Wed, 21 Jul 2010 14:18:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Corporate]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Winner]]></category>

		<guid isPermaLink="false">http://www.allfreetech.com/?p=903</guid>
		<description><![CDATA[An impressive website will go a long way in creating a killer first impression of your company. A few simple tricks that make the difference between a good corporate website design and a large one. Here are 10 tips to check before you rent the site designer: Establish goals Often your website is the first [...]]]></description>
			<content:encoded><![CDATA[<p>An impressive website will go a long way in creating a killer first impression of your company. A few simple tricks that make the difference between a good corporate website design and a large one. Here are 10 tips to check before you rent the site designer: </p>
<p>	Establish goals </p>
<p>	Often your website is the first point of contact for your customers. Therefore, the most important part of corporate web design is to minimize the impact to the site visitors must establish. Do you want to close a sale to generate a database or information? The corporate website design process needs to support this goal. </p>
<p>	Remember who you are talking to /&gt; <br />
	<br a="" addressed="" and="" big="" business="" easy="" ensure="" find="" if="" in="" information="" is="" no-no.="" of="" on="" partnerships.="" re="" s="" sales="" selling="" story="" strict="" stuffy-looking="" that="" the="" to="" trade="" website="" with="" words="" your="" /></p>
<p>	Value their time </p>
<p>	When was the last time you waited patiently for a Flash intro to download? Remember that many web surfers still at low speed of 28K modems or 56K. Your first page is the most important make sure you get there quickly and visitors to stay. </p>
<p>	A sitemap is a great idea, especially if you have much to say. Someone who quickly finds what he or she seeks is more back. </p>
<p>	Make it pleasant </p>
<p>	Good corporate website design is to avoid customer pain points. Stay away from irritants such as music (unless you are in this business), Java Pop-ups and redirects to other pages. If you have one of these for some reason, make sure it&#39;s an option to turn it off. </p>
<p>	Make it look good </p>
<p>	That is the whole game, right? A smart website is to run the business, but small, look good. The corporate website design process needs to blend aesthetic elements and create a strong visual identity. Make sure that your logo is due respect and the use of colors and other details in line with company image. Tickers are sticky, if you mean it to display dynamic information such as stock prices to be displayed. </p>
<p>	Make it sound good </p>
<p>	Web copy is an art in itself. Most Web surfers have the attention of only a limited life and will to move quickly if your site does not come straight to the point. When developing your corporate website design, to pay particular attention to the copy. Does it say anything you want, quickly and clearly? Is it well written and free of spelling and grammar errors? If there is too much content, it is a good idea, they split into two sides &#8211; no one likes to scroll down too long, and never from side to side! </p>
<p>	Keep it simple </p>
<p>	A consistent and instinctive layout works best. No one is pleased with &quot;learn&quot; how to navigate each page. stood menus at the top and left side have the test of time. </p>
<p>	Make sure it works </p>
<p>	Before your site known to check the world that it works on all browsers. Remember what it is not that new lipstick advertised on the shelves &#8211; well, that a site can be found is not shown, is a similar feeling! </p>
<p>	Design of a 404 </p>
<p>	One might wonder at this one &#8211; but it would be useful if your corporate web design process a custom 404 page. Standard &quot;page not found&quot; messages are like a yawn and let the user to ask whether the Internet really works. Instead, let your visitors know that they have reached the right side, but not the right side. Include a link back to the home page or guide. </p>
<p>	Do not mess with your visitors </p>
<p>	Invasion of the worst kind! Some designers use JavaScript to automatically resize the user&#39;s window, so that the site looks best. Avoid mind that if you do not want to lose all your visitors. Instead, decide what window size and resolution is probably best for you, but remember you can not be everything to everyone. With a resolution of 800&#215;600 is still a good idea. </p>
<p>	The design of the site is an important decision and you have several ways to approach her. Professional web designers abound, and some like Logoworks &reg; You are the creative or do-it-yourself type, you&#39;re welcome to use templates, such as those offered by Galaxy Design or Template Monster</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allfreetech.com/development/make-your-corporate-website-design-a-winner-903.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Web Design Myths</title>
		<link>http://www.allfreetech.com/other/the-web-design-myths-364.html</link>
		<comments>http://www.allfreetech.com/other/the-web-design-myths-364.html#comments</comments>
		<pubDate>Sun, 06 Jun 2010 14:18:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Myths]]></category>

		<guid isPermaLink="false">http://www.allfreetech.com/?p=364</guid>
		<description><![CDATA[If your site has been around for a while, then you would have probably visited by the &#34;Web Design Police&#34; (people who have a lot of time on their hands). In fact, depending on your site, you may have visited the various branches of these people, both to policy advocates have been. I just received [...]]]></description>
			<content:encoded><![CDATA[<p>If your site has been around for a while, then you would have probably visited by the &quot;Web Design Police&quot; (people who have a lot of time on their hands). In fact, depending on your site, you may have visited the various branches of these people, both to policy advocates have been. I just received an email from one of my visitors, which apparently had been &quot;helped&quot; by some of these people, and thought that an article is appropriate on two of the myths of web design. <br />
	1 The Myth of &quot;Content is King, no animation / sound / Java / etc&quot; <br />
	The adage that &quot;Content is King&quot; applies to all sites, and I&#39;m not denying it know that is true, that when you add sound, animations, Java applets, and many graphics that takes your web page a long time to load, and some of your visitors may not bother to invite to wait, they will just go away. <br />
	However, put the two together really do not mean that all pages with animation, sound, and applets necessarily bad. The trick is to know when they are appropriate and to make the download speed as fast as it is reasonably possible under the circumstances. I want some ways to lower your graphics and animation file sizes later in this article. <br />
	When is it appropriate? Sometimes applets for some type of processing is required &#8211; for example, the Sesame Street Web site shows a Java applet that dancing Elmo (a Sesame Street character), and the child can use the mouse to &quot;tickle&quot; Elmo and his &quot; ll react depending on where it tickled. The applet takes forever to load on a 56K modem, but you can not say that it is out of place: The website is aimed at young children who are there to . Playing in this case, the applet an appropriate solution. It could also be animation and sound for web sites, online comics, online games, etc. <br />
	Feature In fact, if you a website, website design services sold, which means that they make people pay you want their corresponding Web site, it is in your interest not on your site simple. Many potential customers see your website as an example of what may be their website. It makes no sense says &quot;Content is King&quot; is not enough at this time &#8211; they will long to hear your claim. Such sites need a certain set of colors, graphics, etc, but of course it does take too long to load, would also be a deterrent effect on your potential customers. <br />
	Like all things, depends on how you design your website from your subject and your audience. Keep in mind the main rule and everything will be fine. <br />
	2 The myth of the &quot;Good Design Web is in the graphic&quot; <br />
	At the other end of the scale are people who believe that a good website must have lots of color, graphics, animation and sound. One could meet them, to example in the form of newcomers or professionals who either do not much real world or web experience, the only surf T1 connections came. <br />
	My first encounter with such people in the form of an old friend, who exhibited his personal website proud of me. In the center of his home was a large, animated graphics, that was a few hundred kilobytes in size. The graphics feature had little on this page &#8211; it did not provide any explanatory power: it was not a logo, nor was it a photo of himself own, view or a picture, or nothing at all. It was purely decorative. At that time (many years ago), I had to load with a 14th-4K modem and the page took forever. <br />
	Now I do not understand wrong. Decorative graphics on a page are in order. you make a page to look more comfortable, and read it sooner. But you should at least make them as small as possible. While I hesitate a hard and fast rules about how big such Graphics should be a decorative graphics that give a few hundred kilobytes in size, I&#39;m definitely too large to be tolerated. <br />
	3 Some Page Design Tips <br />
	If your concern is that Your page should look like, without too slowly loaded well, here are a few commonly used tricks, should consider: <br />
	Do not be too much text in one big block. Separate them out and put in paragraph white space between paragraphs. This makes the text look more readable. <br />
	like colored pages? That&#39;s okay, but generally, if the readability of the text is important to you, a white background with black text works best. &lt; br /&gt; If you need to have a colored background, make sure you try your page by to see it in resolutions such as 256 colors, if the page looks good. A colored page that looks good on your 32 -bit color dithering system can make your text hard to read lesser settings. <br />
	If you are the Web sites of large companies (Microsoft, Yahoo, etc.) check to see that they still prefer a white background with black text on their core text. These companies probably have more resources for testing the usability of their web site than you have, so it might not be wise to make fun of their design too fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allfreetech.com/other/the-web-design-myths-364.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to database design</title>
		<link>http://www.allfreetech.com/database/introduction-to-database-design-28.html</link>
		<comments>http://www.allfreetech.com/database/introduction-to-database-design-28.html#comments</comments>
		<pubDate>Sat, 23 Jan 2010 02:40:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.allfreetech.com/?p=28</guid>
		<description><![CDATA[This article/tutorial will teach the basis of relational database design and explains how to make a good database design. It is a rather long text, but we advise to read all of it. Designing a database is in fact fairly easy, but there are a few rules to stick to. It is important to know [...]]]></description>
			<content:encoded><![CDATA[<p>This article/tutorial will teach the basis of relational database design and explains how to make a good database design. It is a rather long text, but we advise to read all of it. Designing a database is in fact fairly easy, but there are a few rules to stick to. It is important to know what these rules are, but more importantly is to know why these rules exist, otherwise you will tend to make mistakes! <span id="more-28"></span></p>
<p>Standardization makes your data model flexible and that makes working with your data much easier. Please, take the time to learn these rules and apply them! The database used in this article is designed with our database design and modeling tool <a href="http://www.datanamic.com/dezign/index.html">DeZign for Databases</a>.</p>
<p>A good database design starts with a list of the data that you want to include in your database and what you want to be able to do with the database later on. This can all be written in your own language, without any SQL. In this stage you must try not to think in tables or columns, but just think: &quot;What do I need to know?&quot; Don&#39;t take this too lightly, because if you find out later that you forgot something, usually you need to start all over. Adding things to your database is mostly a lot of work.</p>
<h2>Identifying Entities</h2>
<p>The types of information that are saved in the database are called &#39;entities&#39;. These entities exist in four kinds: people, things, events, and locations. Everything you could want to put in a database fits into one of these categories. If the information you want to include doesn&#39;t fit into these categories, than it is probably not an entity but a property of an entity, an attribute.</p>
<p>To clarify the information given in this article we&#39;ll use an example. Imagine that you are creating a website for a shop, what kind of information do you have to deal with? In a shop you sell your products to customers. The &quot;Shop&quot; is a location; &quot;Sale&quot; is an event; &quot;Products&quot; are things; and &quot;Customers&quot; are people. These are all entities that need to be included in your database.</p>
<p>But what other things are happening when selling a product? A customer comes into the shop, approaches the vendor, asks a question and gets an answer. &quot;Vendors&quot; also participate, and because vendors are people, we need a vendors entity.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="Entities: types of information" height="100" src="http://www.datanamic.com/supimg/dez005-exampletypesofinfo.jpg" width="302" /></center><br />
					<i>Figure 1: Entities: types of information.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h2>Identifying Relationships</h2>
<p>The next step is to determine the relationships between the entities and to determine the cardinality of each relationship. The relationship is the connection between the entities, just like in the real world: what does one entity do with the other, how do they relate to each other? For example, customers buy products, products are sold to customers, a sale comprises products, a sale happens in a shop.</p>
<p>The cardinality shows how much of one side of the relationship belongs to how much of the other side of the relationship. First, you need to state for each relationship, how much of one side belongs to exactly 1 of the other side. For example: How many customers belong to 1 sale?; How many sales belong to 1 customer?; How many sales take place in 1 shop?</p>
<p>You&#39;ll get a list like this: (please note that &#39;product&#39; represents a type of product, not an occurance of a product)</p>
<p>&nbsp;</p>
<ul>
<li>Customers &#8211;&gt; Sales; 1 customer can buy something several times</li>
<li>Sales &#8211;&gt; Customers; 1 sale is always made by 1 customer at the time</li>
<li>Customers &#8211;&gt; Products; 1 customer can buy multiple products</li>
<li>Products &#8211;&gt; Customers; 1 product can be purchased by multiple customers</li>
<li>Customers &#8211;&gt; Shops; 1 customer can purchase in multiple shops</li>
<li>Shops &#8211;&gt; Customers, 1 shop can receive multiple customers</li>
<li>Shops &#8211;&gt; Products; in 1 shop there are multiple products</li>
<li>Products &#8211;&gt; Shops; 1 product (type) can be sold in multiple shops</li>
<li>Shops &#8211;&gt; Sales; in 1 shop multiple sales can me made</li>
<li>Sales &#8211;&gt; Shops; 1 sale can only be made in 1 shop at the time</li>
<li>Products &#8211;&gt; Sales; 1 product (type) can be purchased in multiple sales</li>
<li>Sales &#8211;&gt; Products; 1 sale can exist out of multiple products</li>
</ul>
<p>Did we mention all relationships? There are four entities and each entity has a relationship with every other entity, so each entity must have three relationships, and also appear on the left end of the relationship three times. Above, 12 relationships were mentioned, which is 4*3, so we can conclude that all relationships were mentioned.</p>
<p>Now we&#39;ll put the data together to find the cardinality of the whole relationship. In order to do this, we&#39;ll draft the cardinalities per relationship. To make this easy to do, we&#39;ll adjust the notation a bit, by noting the &#39;backward&#39;-relationship the other way around:</p>
<p>&nbsp;</p>
<ul>
<li>Customers &#8211;&gt; Sales; 1 customer can buy something several times</li>
<li>Sales &#8211;&gt; Customers; 1 sale is always made by 1 customer at the time</li>
</ul>
<p>The second relationship we will turn around so it has the same entity order as the first. Please notice the arrow that is now faced the other way!</p>
<p>&nbsp;</p>
<ul>
<li>Customers &lt;&#8211; Sales; 1 sale is always made by 1 customer at the time</li>
</ul>
<p>Cardinality exists in four types: one-to-one, one-to-many, many-to-one, and many-to-many. In a database design this is indicated as: 1:1, 1:N, M:1, and M:N. To find the right indication just leave the &#39;1&#39;. If there is a &#39;many&#39; on the left side, this will be indicated with &#39;M&#39;, if there is a &#39;many&#39; on the right side it is indicated with &#39;N&#39;.</p>
<p>&nbsp;</p>
<ul>
<li>Customers &#8211;&gt; Sales; 1 customer can buy something several times; 1:N.</li>
<li>Customers &lt;&#8211; Sales; 1 sale is always made by 1 customer at the time; 1:1.</li>
</ul>
<p>The true cardinality can be calculated through assigning the biggest values for left and right, for which &#39;N&#39; or &#39;M&#39; are greater than &#39;1&#39;. In thisexample, in both cases there is a &#39;1&#39; on the left side. On the right side, there is a &#39;N&#39; and a &#39;1&#39;, the &#39;N&#39; is the biggest value. The total cardinality is therefore &#39;1:N&#39;. A customer can make multiple &#39;sales&#39;, but each &#39;sale&#39; has just one customer.</p>
<p>If we do this for the other relationships too, we&#39;ll get:</p>
<ul>
<li>Customers &#8211;&gt; Sales; &#8211;&gt; 1:N</li>
<li>Customers &#8211;&gt; Products; &#8211;&gt; M:N</li>
<li>Customers &#8211;&gt; Shops; &#8211;&gt; M:N</li>
<li>Sales &#8211;&gt; Products; &#8211;&gt; M:N</li>
<li>Shops &#8211;&gt; Sales; &#8211;&gt; 1:N</li>
<li>Shops &#8211;&gt; Products; &#8211;&gt; M:N</li>
</ul>
<p>So, we have two &#39;1-to-many&#39; relationships, and four &#39;many-to-many&#39; relationships.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="" height="287" src="http://www.datanamic.com/supimg/dez005-examplefirstrelationships.jpg" width="416" /></center><br />
					<i>Figure 2: Relationships between the entities.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>Between the entities there may be a mutual dependency. This means that the one item cannot exist if the other item does not exist. For example, there cannot be a sale if there are no customers, and there cannot be a sale if there are no products.</p>
<p>The relationships Sales &#8211;&gt; Customers, and Sales &#8211;&gt; Products are mandatory, but the other way around this is not the case. A customer can exist without sale, and also a product can exist without sale. This is of importance for the next step.</p>
<h3>Recursive Relationships</h3>
<p>Sometimes an entity refers back to itself. For example, think of a work hierarchy: an employee has a boss; and the bosschef is an employee too. The attribute &#39;boss&#39; of the entity &#39;employees&#39; refers back to the entity &#39;employees&#39;.</p>
<p>In an ERD (see next chapter) this type of relationship is a line that goes out of the entity and returns with a nice loop to the same entity.</p>
<h3>Redundant Relationships</h3>
<p>Sometimes in your model you will get a &#39;redundant relationship&#39;. These are relationships that are already indicated by other relationships, although not directly.</p>
<p>In the case of our example there is a direct relationships between customers and products. But there are also relationships from customers to sales and from sales to products, so indirectly there already is a relationship between customers and products through sales. The relationship &#39;Customers &lt;&#8212;-&gt; Products&#39; is made twice, and one of them is therefore redundant. In this case, products are only purchased through a sale, so the relationships &#39;Customers &lt;&#8212;-&gt; Products&#39; can be deleted. The model will then look like this:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="" height="287" src="http://www.datanamic.com/supimg/dez005-redundantrelationships.jpg" width="416" /></center><br />
					<i>Figure 3: Relationships between the entities.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h3>Solving Many-to-Many Relationships</h3>
<p>Many-to-many relationships (M:N) are not directly possible in a database. What a M:N relationship says is that a number of records from one table belongs to a number of records from another table. Somewhere you need to save which records these are and the solution is to split the relationship up in two one-to-many relationships.</p>
<p>This can be done by creating a new entity that is in between the related entities. In our example, there is a many-to-many relationship between sales and products. This can be solved by creating a new entity: sales-products. This entity has a many-to-one relationship with Sales, and a many-to-one relationship with Products. In logical models this is called an associative entity and in physical database terms this is called a link table or junction table.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="many to many relationship" height="51" src="http://www.datanamic.com/supimg/dez005-manytomany.jpg" width="474" /></center><br />
					<center><img alt="associative entity" height="47" src="http://www.datanamic.com/supimg/dez005-associativeentity.jpg" width="471" /></center><br />
					<i>Figure 4: Many to many relationship implementation via associative entity.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>In the example there are two many-to-many relationships that need to be solved: &#39;Products &lt;&#8212;-&gt; Sales&#39;, and &#39;Products &lt;&#8212;-&gt; Shops&#39;. For both situations there needs to be created a new entity, but what is that entity?</p>
<p>For the Products &lt;&#8212;-&gt; Sales relationship, every sale includes more products. The relationship shows the content of the sale. In other words, it gives details about the sale. So the entity is called &#39;Sales details&#39;. You could also name it &#39;sold products&#39;.</p>
<p>The Products &lt;&#8212;-&gt; Shops relationship shows which products are available in which the shops, also known as &#39;stock&#39;. Our model would now look like this:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="" height="355" src="http://www.datanamic.com/supimg/dez005-modelwithstockandsalesdetails.jpg" width="381" /></center><br />
					<i>Figure 5: Model with link tables Stock and Sales_details.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h2>Identifying Attributes</h2>
<p>The data elements that you want to save for each entity are called &#39;attributes&#39;.</p>
<p>About the products that you sell, you want to know, for example, what the price is, what the name of the manufacturer is, and what the type number is. About the customers you know their customer number, their name, and address. About the shops you know the location code, the name, the address. Of the sales you know when they happened, in which shop, what products were sold, and the sum total of the sale. Of the vendor you know his staff number, name, and address. What will be included precisely is not of importance yet; it is still only about what you want to save.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="an entity with several attributes" height="231" src="http://www.datanamic.com/supimg/dez005-attributes.jpg" width="340" /></center><br />
					<i>Figure 6: Entities with attributes.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h3>Derived Data</h3>
<p>Derived data is data that is derived from the other data that you have already saved. In this case the &#39;sum total&#39; is a classical case of derived data. You know exactly what has been sold and what each product costs, so you can always calculate how much the sum total of the sales is. So really it is not necessary to save the sum total.</p>
<p>So why is it saved here? Well, because it is a sale, and the price of the product can vary over time. A product can be priced at 10 euros today and at 8 euros next month, and for your administration you need to know what it cost at the time of the sale, and the easiest way to do this is to save it here. There are a lot of more elegant ways, but they are too profound for this article.</p>
<h2>Presenting Entities and Relationships: Entity Relationship Diagram (ERD)</h2>
<p>The Entity Relationship Diagram (ERD) gives a graphical overview of the database. There are several styles and types of ER Diagrams. A much-used notation is the &#39;crowfeet&#39; notation, where entities are represented as rectangles and the relationships between the entities are represented as lines between the entities. The signs at the end of the lines indicate the type of relationship. The side of the relationship that is mandatory for the other to exist will be indicated through a dash on the line. Not mandatory entities are indicated through a circle. &quot;Many&quot; is indicated through a &#39;crowfeet&#39;; de relationship-line splits up in three lines.</p>
<p>In this article we make use of <a href="http://www.datanamic.com/dezign/index.html">DeZign for Databases</a> to design and present our database.</p>
<p>A 1:1 mandatory relationship is represented as follows:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="" height="49" src="http://www.datanamic.com/supimg/dez005-onetoonemandatory.jpg" width="240" /></center><br />
					<i>Figure 7: Mandatory one to one relationship.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>A 1:N mandatory relationship:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="one to many relationship" height="45" src="http://www.datanamic.com/supimg/dez005-onetomanymandatory.jpg" width="236" /></center><br />
					<i>Figure 8: Mandatory one to many relationship.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>A M:N relationship is:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="" height="51" src="http://www.datanamic.com/supimg/dez005-manytomanymandatory.jpg" width="245" /></center><br />
					<i>Figure 9: Mandatory many to many relationship.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<p>The model of our example will look like this:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="relation/connection between two entities" height="287" src="http://www.datanamic.com/supimg/dez005-examplefirstrelationships.jpg" width="418" /></center><br />
					<i>Figure 10: Model with relationships.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h2>Assigning Keys</h2>
<h3>Primary Keys</h3>
<p>A primary key (PK) is one or more data attributes that uniquely identify an entity. A key that consists of two or more attributes is called a composite key. All attributes part of a primary key must have a value in every record (which cannot be left empty) and the combination of the values within these attributes must be unique in the table.</p>
<p>In the example there are a few obvious candidates for the primary key. Customers all have a customer number, products all have a unique product number and the sales have a sales number. Each of these data is unique and each record will contain a value, so these attributes can be a primary key. Often an integer column is used for the primary key so a record can be easily found through its number.</p>
<p>Link-entities usually refer to the primary key attributes of the entities that they link. The primary key of a link-entity is usually a collection of these reference-attributes. For example in the Sales_details entity we could use the combination of the PK&#39;s of the sales and products entities as the PK of Sales_details. In this way we enforce that the same product (type) can only be used once in the same sale. Multiple items of the same product type in a sale must be indicated by the quantity.</p>
<p>In the ERD the primary key attributes are indicated by the text &#39;PK&#39; behind the name of the attribute. In the example only the entity &#39;shop&#39; does not have an obvious candidate for the PK, so we will introduce a new attribute for that entity: shopnr.</p>
<h3>Foreign Keys</h3>
<p>The Foreign Key (FK) in an entity is the reference to the primary key of another entity. In the ERD that attribute will be indicated with &#39;FK&#39; behind its name. The foreign key of an entity can also be part of the primary key, in that case the attribute will be indicated with &#39;PF&#39; behind its name. This is usually the case with the link-entities, because you usually link two instances only once together (with 1 sale only 1 product type is sold 1 time).</p>
<p>If we put all link-entities, PK&#39;s and FK&#39;s into the ERD, we get the model as shown below. Please note that the attribute &#39;products&#39; is no longer necessary in &#39;Sales&#39;, because &#39;sold products&#39; is now included in the link-table. In the link-table another field was added, &#39;quantity&#39;, that indicates how many products were sold. The quantity field was also added in the stock-table, to indicate how many products are still in store.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="primary keys and foreign keys" height="435" src="http://www.datanamic.com/supimg/dez005-modelwithpksandfks.jpg" width="474" /></center><br />
					<i>Figure 11: Primary keys and foreign keys.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h2>Defining the Attribute&#39;s Data Type</h2>
<p>Now it is time to figure out which data types need to be used for the attributes. There are a lot of different data types. A few are standardized, but many databases have their own data types that all have their own advantages. Some databases offerthe possibility to define your own data types, in case the standard types cannot do the things you need.</p>
<p>The standard data types that every database knows, and are most-used, are: CHAR, VARCHAR, TEXT, FLOAT, DOUBLE, and INT.</p>
<p>Text:</p>
<ul>
<li>CHAR(length) &#8211; includes text (characters, numbers, punctuations&#8230;). CHAR has as characteristic that it always saves a fixed amount of positions. If you define a CHAR(10) you can save up to ten positions maximum, but if you only use two positions the database will still save 10 positions. The remaining eight positions will be filled by spaces.</li>
<li>VARCHAR(length) &#8211; includes text (characters, numbers, punctuation&#8230;). VARCHAR is the same as CHAR, the difference is that VARCHAR only takes as much space as necessary.</li>
<li>TEXT &#8211; can contain large amounts of text. Depending on the type of database this can add up to gigabytes.</li>
</ul>
<p>Numbers:</p>
<ul>
<li>INT &#8211; contains a positive or negative whole number. A lot of databases have variations of the INT, such as TINYINT, SMALLINT, MEDIUMINT, BIGINT, INT2, INT4, INT8. These variations differ from the INT only in the size of the figure that fits into it. A regular INT is 4 bytes (INT4) and fits figures from -2147483647 to +2147483646, or if you define it as UNSIGNED from 0 to 4294967296. The INT8, or BIGINT, can get even bigger in size, from 0 to 18446744073709551616, but takes up to 8 bytes of diskspace, even if there is just a small number in it.</li>
<li>FLOAT, DOUBLE &#8211; The same idea as INT, but can also store floating point numbers. . Do note that this does not always work perfectly. For instance in MySQL calculating with these floating point numbers is not perfect, (1/3)*3 will result with MySQL&#39;s floats in 0.9999999, not 1.</li>
</ul>
<p>Other types:</p>
<ul>
<li>BLOB &#8211; for binary data such as files.INET &#8211; for IP addresses. Also useable for netmasks.</li>
</ul>
<p>For our example the data types are as follows:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="datatypes displayed in database diagram" height="424" src="http://www.datanamic.com/supimg/dez005-modelwithdatatypes.jpg" width="570" /></center><br />
					<i>Figure 12: Data model displaying data types.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h2>Normalization</h2>
<p>Normalization makes your data model flexible and reliable. It does generate some overhead because you usually get more tables, but it enables you to do many things with your data model without having to adjust it.</p>
<h3>Normalization, the First Form</h3>
<p>The first form of normalization states that there may be no repeating groups of columns in an entity. We could have created an entity &#39;sales&#39; with attributes for each of the products that were bought. This would look like this:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="" height="140" src="http://www.datanamic.com/supimg/dez005-normalization1nf_1.jpg" width="107" /></center><br />
					<i>Figure 13: Not in 1st normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>What is wrong about this is that now only 3 products can be sold. If you would have to sell 4 products, than you would have to start a second sale or adjust your data model by adding &#39;product4&#39; attributes. Both solutions are unwanted. In these cases you should always create a new entity that you link to the old one via a one-to-many relationship.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="In accordance with 1st normal form" height="107" src="http://www.datanamic.com/supimg/dez005-normalization1nf_2.jpg" width="363" /></center><br />
					<i>Figure 14: In accordance with 1st normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h3>Normalization, the Second Form</h3>
<p>The second form of normalization states that all attributes of an entity should be fully dependent on the whole primary key. This means that each attribute of an entity can only be identified through the whole primary key. Suppose we had the date in the Sales_details entity:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="to be normalized (primary key)" height="130" src="http://www.datanamic.com/supimg/dez005-normalization2nf_1.jpg" width="147" /></center><br />
					<i>Figure 15: Not in 2nd normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>This entity is not according the second normalization form, because in order to be able to look up the date of a sale, I do not have to know what is sold (productnr), the only thing I need to know is the sales number. This was solved by splitting up the tables into the sales and the Sales_details table:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="2nd normal form" height="123" src="http://www.datanamic.com/supimg/dez005-normalization2nf_2.jpg" width="375" /></center><br />
					<i>Figure 16: In accordance with 2nd normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>Now each attribute of the entities is dependent on the whole PK of the entity. The date is dependent on the sales number, and the quantity is dependent on the sales number and the sold product.</p>
<h3>Normalization, the Third Form</h3>
<p>The third form of normalization states that all attributes need to be directly dependent on the primary key, and not on other attributes. This seems to be what the second form of normalization states, but in the second form is actually stated the opposite. In the second form of normalization you point out attributes through the PK, in the third form of normalization every attribute needs to be dependent on the PK, and nothing else.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="normalize" height="159" src="http://www.datanamic.com/supimg/dez005-normalization3nf_1.jpg" width="140" /></center><br />
					<i>Figure 17: Not in 3rd normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>In this case the price of a loose product is dependent on the ordering number, and the ordering number is dependent on the product number and the sales number. This is not according to the third form of normalization. Again, splitting up the tables solves this.</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="3rd normal form" height="160" src="http://www.datanamic.com/supimg/dez005-normalization3nf_2.jpg" width="336" /></center><br />
					<i>Figure 18: In accordance with 3rd normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h3>Normalization, More Forms</h3>
<p>There are more normalization forms than the three forms mentioned above, but those are not of great interest for the average user. These other forms are highly specialized for certain applications. If you stick to the design rules and the normalization mentioned in this article, you will create a design that works great for most applications.</p>
<h3>Normalized Data Model</h3>
<p>If you apply the normalization rules, you will find that the &#39;manufacturer&#39; in de product table should also be a separate table:</p>
<p>&nbsp;</p>
<p><center></p>
<table bgcolor="#f1f1f1">
<tbody>
<tr>
<td class="content" style="padding: 3px;">
					<center><img alt="data model after normalization" height="424" src="http://www.datanamic.com/supimg/dez005-modelwithmanufacturers.jpg" width="570" /></center><br />
					<i>Figure 19: Data model in accordance with 1st, 2nd and 3d normal form.</i></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>&nbsp;</p>
<h2>Glossary</h2>
<p>Attributes &#8211; detailed data about an entity, such as price, length, name</p>
<p>	Cardinality &#8211; the relationship between two entities, in figures. For example, a person can place multiple orders.</p>
<p>	Entities &#8211; abstract data that you save in a database. For example: customers, products.</p>
<p>	Foreign key (FK) &#8211; a referral to the Primary Key of another table. Foreign Key-columns can only contain values that exist in the Primary Key column that they refer to.</p>
<p>	Key &#8211; a key is used to point out records. The most well-known key is the Primary Key (see Primary Key).</p>
<p>	Normalization &#8211; A flexible data model needs to follow certain rules. Applying these rules is called normalizing.</p>
<p>	Primary key &#8211; one or more columns within a table that together form a unique combination of values by which each record can be pointed out separately. For example: customer numbers, or the serial number of a product.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allfreetech.com/database/introduction-to-database-design-28.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

