Sabtu, 02 Mei 2009

Quiz - 7 Normalization

Normalization

Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table). Both of these are worthy goals as they reduce the amount of space a database consumes and ensure that data is logically stored.

The Normal Forms

The database community has developed a series of guidelines for ensuring that databases are normalized. These are referred to as normal forms and are numbered from one (the lowest form of normalization, referred to as first normal form or 1NF) through five (fifth normal form or 5NF). In practical applications, you'll often see 1NF, 2NF, and 3NF along with the occasional 4NF. Fifth normal form is very rarely seen and won't be discussed in this article.

Before we begin our discussion of the normal forms, it's important to point out that they are guidelines and guidelines only. Occasionally, it becomes necessary to stray from them to meet practical business requirements. However, when variations take place, it's extremely important to evaluate any possible ramifications they could have on your system and account for possible inconsistencies. That said, let's explore the normal forms.



In the field of relational database design, normalization is a systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain undesirable characteristics—insertion, update, and deletion anomalies—that could lead to a loss of data integrity




Diagram Of Normalization


ERD in the above, there are 2 that confusion can lead to an error occurs, namely:

- On the relationship between the entity and the project does not have a clear cardinality.

- There is a ternary relationship have on the relationship.



The ERD can be improved based on the above confusion





Here the relationship between project entity and eliminates the burden based on business logic, the seal was found by an employee is not a project.


1. First Normal Form (1NF)

First normal form (1NF) sets the very basic rules for an organized database. A normal form used in database normalization. A relational database table that adheres to 1NF is one that meets a certain minimum set of criteria. These criteria are basically concerned with ensuring that the table is a faithful representation of a relation and that it is free of repeating groups.

    • Eliminate duplicative columns from the same table.
    • Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).





2. Second Normal Form (2NF)

Second normal form (2NF) further addresses the concept of removing duplicative data:

  • Meet all the requirements of the first normal form.
  • Remove subsets of data that apply to multiple rows of a table and place them in separate tables.
  • Create relationships between these new tables and their predecessors through the use of foreign key( a field in a relational table that matches the primary key column of another table. The foreign key can be used to cross-reference tables) .


3. Third Normal Form (3NF)

Third normal form (3NF) goes one large step further:

  • Meet all the requirements of the second normal form.
  • Remove columns that are not dependent upon the primary key.


4. Fourth Normal Form (4NF)

Finally, fourth normal form (4NF) has one additional requirement:

  • Meet all the requirements of the third normal form.
  • A relation is in 4NF if it has no multi-valued dependencies.

Remember, these normalization guidelines are cumulative. For a database to be in 2NF, it must first fulfill all the criteria of a 1NF database.


My References

1. ER Ngurah Agus Sanjaya. Slide Part 6 - NORMALISASI

2. http://en.wikipedia.org/wiki/Database_normalization

3. http://databases.about.com/od/specificproducts/a/normalization.htm


Minggu, 26 April 2009

ALL BOUT AVENGED SEVENFOLD (A7X)

Avenged Sevenfold

Band beraliran rock yang berasal dari Huntington Beach, California.Avenged Sevenfold terbentuk pada tahun 1999 di Orange County, California. Album pertama mereka, Sounding the Seventh Trumpet direkam ketika mereka masih berumur 18 tahun. Album ini dirilis dengan label Good Life Recordings, tetapi setelah gitaris Synyster Gates masuk Avenged Sevenfold, album ini dirilis ulang dengan label Hopeless Records. Lagu “To End The Rapture” juga direkam ulang, kali ini ditambahkan dengan permainan gitar Synyster Gates.

THE ALBUMS

Sounding the Seventh Trumpet (2001)
Waking the Fallen (2003)
City of Evil (2005)
Avenged Sevenfold (2007)
Live in the LBC & Diamonds in the Rough(2008)

City of Evil (2005-2007)

Tahun 2005, Amerika Serikat tengah jenuh dengan musik hip-hop dan pop yang merajalela, lalu Avenged Sevenfold merilis album mereka City of Evil tepatnya pada tanggal 8 Juni, 2005. Hits single Bat Country merupakan lagu metal/rock pertama yang merajai MTV TRL. Mereka mempopulerkan kembali solo gitar dengan duet gitaris Synyster Gates dan Zacky Vengeance yang benar-benar memanaskan area moshpit. Album tersebut mendapat sertifikat gold dan memenangkan predikat Best New Artist in a Video di MTV VMA 2006 untuk lagu Bat Country.

a7x (2007-saat ini)

Tahun 2007, mereka kembali masuk studio untuk merekam lagu terbaru mereka untuk studio album ke-5 mereka. Awal Agustus 2007, mereka menjalani tur Asia Pasifik mereka, dan sempat mampir di Indonesia dan memainkan lagu mereka pertama kali di depan publik. Lagu yang berjudul Almost Easy tersebut mendapat sambutan hangat dari penggemar di seluruh dunia. Ketika itu band punk Jogjakarta Endang Soekamti didaulat menjadi band pembuka.

Tahun 2008 ini, mereka berpartisipasi sebagai headliners di tour Taste of Chaos bersama dengan Bullet for My Valentine, Atreyu, Blessthefall dan Idiot Pilot. Ketika tour, mereka merekam sebuah DVD yang mengandung 6 lagu baru mereka.

Tanggal 22 Oktober 2008, Avenged Sevenfold akan kembali manggung di Indonesia masih dengan event organizer yang sama yakni Java Musikindo dan kali ini band heavy metal Jibril didaulat menjadi band pembuka.

Anggota saat ini

M. Shadows - vokal

Synyster Gates - gitar melodi, piano, vokal

Zacky Vengeance - gitar ritmik, vokal

Jhonny Chriss - bass, vokal

The Rev - drum, perkusi, vokal, piano

Ciri khas

Mereka cenderung memainkan nuansa agresif pada vokal, gitar, dan drum (bass tetap statis). Dengan sentuhan yang dinamis, mau keras atau lambat, mereka tetap menggunakan harmonisasi yang luar biasa dan komposisi yang teratur. Sebut saja lagu-lagu yang sedikit melow, seperti Seize The Day dan Dear God, gitarnya tetap di drop Dm seperti halnya metal-metal kebanyakan. Kemudian, ciri khasnya selain komposisi dan drop, Syn memasukkan nuansa sweep picking (arpeggio) di hampir semua lagunya. Keindahan sweep picking yang dipadukan dengan kromatik, slide, dan teknik-teknik lainnya bisa kita dengar di lagu The Wicked End. Kemudian selain itu, tidak lupa juga sentuhan akustik yang membawa suasana seperti di Hawaii, bisa kita dengar di lagu Sidewinder. Tapi, satu lagi ciri khas yang tidak pernah lepas dari mereka, menduetkan gitar Syn dan Zacky, memakai double bass dengan tempo yang beberapa kali lipat beat-nya dari biasanya.

Mantan Anggota

Justin Sane - Bass

Dameon Ash - Bass

Matt Wendt - Bass

Masa Depan Bumi Kita

Masa Depan Bumi Kita




Saya posting artikel ini bukan untuk menakut-nakuti atau apa,tapi sebagai bahan renungan aja buat kita.

Saya ambil dari forum kaskus “the largest indonesian community” :

Apabila pemanasan global terus berlanjut pada suhu tertentu maka kita akan menghadapi kepunahan. Jadi apa yang sebenarnya akan terjadi apabila bumi terus memanas?

Jurnalis dan penyiar acara lingkungan hidup asal Inggris, Mark Lynas, melakukan perjalanan selama 3 tahun yang mengelilingi 5 benua untuk menyaksikan berbagai perubahan karena dampak pemanasan global. Dari mencairnya tundra di Alaska, tenggelamnya pulau di Pasifik dari negara bagian dari Tuvalu, dan bertambahnya dataran tandus di pedalaman Mongolia sampai pada lenyapnya lapisan es di Peru dan banjir, serta badai yang menyebabkan erosi di China. Tuan Lynas secara pribadi mengumpulkan semua bukti yang dikumpulkan dalam bukunya mengenai perubahan iklim, High Tide: The Truth About Our Climate Crisis (Gelombang Besar: Kenyataan Mengenai Krisis Perubahan Iklim Kita).

Setelah itu, dalam waktu singkat Tuan Lynas mempelajari lebih mendalam tentang berbagai bukti ilmiah serta rasional mengenai efek pemakaian bahan bakar fosil terhadap iklim, lingkungan, dan kehidupan di planet ini. Beliau menghabiskan waktunya beberapa bulan di perpustakaan ilmiah Radcliffe di Universitas Oxford untuk membaca ribuan buku literatur ilmiah yang telah dianalisa secara mendalam sebelum mempublikasikan buku kejutannya yang kedua, Six Degrees: Our Future on a Hotter Planet (Enam Derajat: Masa Depan Kita di Planet yang Semakin Panas); sebagai media lain untuk membangkitkan kesadaran.

Buku terbarunya secara sistematik membahas perubahan iklim berdasarkan data yang diperoleh dari penelitian secara ilmiah dengan penggunaan aplikasi komputer tahap lanjut dan juga pencarian secara palaeoclimatic untuk menelusuri sejarah bumi yang memberikan gambaran akan pemanasan iklim di masa mendatang dan akibat yang akan dihadapi. Selain itu ia juga meneliti periode-periode dari perubahan iklim dramatik sebelumnya melalui proses alami dan meramalkan akan efek menakutkan dari pemanasan global yang akan dihadapi semua kehidupan dan lingkungan di planet ini.

Derajat demi derajat, satu derajat per bab. Enam Derajat disusun berdasarkan “Laporan Perkiraan Ketiga” dari Panel Antar Pemerintah untuk Perubahan Iklim (IPCC) tahun 2001 (http:/www.ipcc.ch). Pada setiap halaman, efek dari peningkatan temperatur di bumi dan lapisan biosfernya digambarkan dalam realitas yang menguatirkan.

Kenaikan suhu 1ºC sampai 3ºC merupakan “titik puncak”, tetapi jika naik sampai pada 6 ºC maka peningkatan ini dapat menyebabkan kepunahan pada hampir semua kehidupan, termasuk manusia! Sulit dibayangkan jika perilaku dari manusia sendiri yang menyebabkan kerusakan dan penderitaan yang tidak diharapkan. Kita telah membahayakan planet ini dan berada di ambang kehilangan momentum apabila kita tidak bertindak secepatnya untuk membatasi efek emisi gas rumah kaca.

Kenaikan Suhu 1 Derajat:

Pada kenaikan suhu 1 derajat, Kutub Utara akan kehilangan es setengah tahun penuh, Atlantik Selatan yang sebelumnya tidak ada badai akan mengalami serangan badai dan di barat AS terjadi kekeringan parah yang mengakibatkan banyak penduduk menderita.

Kenaikan Suhu 2 Derajat

Beruang kutub berjuang untuk hidup saat lapisan es mencair. Lapisan es di Greenland mulai menghilang, sedangkan batu karang menjadi lenyap. Permukaan air laut mengalami kenaikan 7 meter secara global.

Kenaikan Suhu 3 Derajat

Hutan hujan di Amazon mengering dan pola cuaca El Nino bertambah intensitasnya menjadi sesuatu yang biasa. Eropa secara berulang mengalami musim panas yang teramat panas yang sangat jarang terjadi sebelumnya. Jutaan dan milyaran orang akan berpindah dari sub tropik menuju daerah pertengahan garis lintang.

Kenaikan Suhu 4 Derajat

Air laut akan meninggi dan meluap membanjiri kota-kota di daerah pesisir. Menghilangnya lapisan es akan mengurangi banyak persediaan air tawar. Suatu bagian di Kutub Selatan akan tenggelam dan menyebabkan area air yang meluap semakin jauh. Temperatur musim panas di London akan menjadi 45ºC.

Kenaikan Suhu 5 Derajat

Daerah yang tidak bisa dihuni semakin menyebar, tumpukan es dan air tanah sebagai sumber air untuk kota-kota besar akan mengering dan jutaan pengungsi akan bertambah. Kebudayaan manusia akan mulai menghilang seiring dengan perubahan iklim yang dramatik ini. Dalam hal ini kelompok yang kurang mampu sepertinya akan menjadi paling menderita. Tidak ada lagi es yang tersisa pada kedua kutub seiring dengan punahnya bermacam species di lautan dan tsunami dalam skala besar memusnahkan kehidupan dekat pantai.

Kenaikan Suhu 6 Derajat

Pada kenaikan suhu 6 derajat, kepunahan massal sebesar 95% akan terjadi; makhluk yang masih hidup akan mengalami serangan badai dan banjir besar yang terus menerus; hidrogen sulfat dan kebakaran akibat gas metana akan menjadi hal yang biasa. Gas ini berpotensi menjadi bom atom dan tidak ada yang mampu bertahan hidup kecuali bakteri. Hal ini akan menjadi “skenario hari kiamat.”

Hal yang lebih menguatirkan adalah karena kompleksnya ekosistem di planet ini, kenyataan akan perubahan iklim ini dapat menjadi lebih buruk dibandingkan dengan perkiraan yang dilakukan secara ilmiah! Prediksi akan efek dari perubahan iklim sangat menguatirkan. Saat menganalisa ulang seluruh data yang ia kumpulkan, Tuan Lynas berpikir, mungkin ia “harus merahasiakan semuanya” karena kebenarannya sangat “menakutkan.” Sebenarnya, beberapa dari perkiraan mulai menjadi kenyataan, sebagai contoh, gelombang panas saat musim panas di Eropa telah mulai mempengaruhi kesehatan manusia, khususnya para manula. Cuaca yang memanas juga menyebabkan malaria dan penyakit lainnya yang bertambah secara regional. Pemanasan global telah membuat lapisan es di China menyusut 7% setiap tahunnya, hal ini dapat berakibat kerusakan yang lebih besar dan memberi efek kepada 300 juta jiwa yang sangat menggantungkan kebutuhan air mereka dari situ. Di India, mencairnya es yang sangat cepat telah menyebabkan 70.000 orang harus pindah dari Pulau Lohachara yang tenggelam, dan kenaikan permukaan laut telah menyebabkan dipindahkannya 20.000 penduduk yang tinggal di dataran paling rendah di Kepulauan Duke of York pada tahun 2000. Pada keadaan yang rentan dari ekosistem serta sistem sosial yang saling terkait satu sama lainnya, planet yang semakin panas juga menyebabkan rantai reaksi yang memicu terjadinya kelangkaan makanan dan air seiring dengan bertambahnya pengungsi sebagai akibat perubahan iklim.

Akan tetapi, Tuan Lynas tidak berniat membuat pembaca pesimis akan masa depan planet ini. Sebaliknya dia menyampaikan peringatan dini secara jelas dan mendesak perhatian internasional akan diperlukannya usaha bersama untuk mengatasi pemanasan global seperti “mengambil tabung pemadam dan memadamkan api.” Tidak diragukan lagi bahwa “api’ tersebut timbul sebagai akibat yang berkaitan dengan perilaku manusia dan berdasarkan analisis data, berbagai jenis emisi yang menyebabkan kenaikan temperature; dan waktu yang tersisa kurang dari 1 dekade saat kenaikan mencapai puncak ‘enam derajat’! Sesuai indikasi yang tercantum di bagan, kita telah mendekati tingkat 2 derajat, dengan demikian pilihan kita satu-satunya adalah bertindak secepat mungkin serta mengurangi emisi karbon dan metana.

Bagan : Kenaikan Suhu dan Emisi Karbon*

PERUBAHAN SUHU
TEMPERATUR YANG BERUBAH DALAM CELSIUS
JUMLAH CO2

Satu Derajat
0,1- 1,0ºC
350ppm (Level saat ini 380ppm)

Dua Derajat
1,1- 2,0 ºC
400ppm

Tiga Derajat
2,1- 3,0 ºC
450ppm

Empat Derajat
3,1- 4,0 ºC
550ppm

Lima Derajat
4,1- 5,0 ºC
650ppm

Enam Derajat
5,1- 5,8 ºC
800ppm

Enam Derajat adalah sebuah tiupan terompet perang, panggilan kepada semua orang akan kondisi bumi kita yang berada pada situasi yang sangat kritis; ini adalah masa terpenting bagi para pemimpin dan tokoh politik untuk mengimplementasikan ketentuan ambang batas untuk mengurangi karbon dan gas dari efek rumah kaca lainnya, seperti metana. Tidak dapat di pungkiri bahwa ulah manusialah yang menyebabkan cepatnya kenaikan perubahan iklim. Kita harus mengubah gaya hidup kita ke arah yang lebih gembira dan lebih sehat seperti berlaih ke energi yang berkelanjutan dan gaya hidup vegetarian untuk menyelamatkan bumi kita. Kita hanya mempunyai sedikit waktu yang sangat terbatas untuk membuat titik balik. Pemanasan global adalah sebuah realitas dan membutuhkan perhatian semua umat manusia di planet ini. Untuk itu marilah kita segera bertindak untuk menyejukkan bumi kita.

Sabtu, 25 April 2009

Database Normalization

Database Normalization

Description of Normalization

Normalization is the process of organizing data in a database. This includes creating tables and establishing relationships between those tables according to rules designed both to protect the data and to make the database more flexible by eliminating redundancy and inconsistent dependency.

Redundant data wastes disk space and creates maintenance problems. If data that exists in more than one place must be changed, the data must be changed in exactly the same way in all locations. A customer address change is much easier to implement if that data is stored only in the Customers table and nowhere else in the database.

What is an "inconsistent dependency"? While it is intuitive for a user to look in the Customers table for the address of a particular customer, it may not make sense to look there for the salary of the employee who calls on that customer. The employee's salary is related to, or dependent on, the employee and thus should be moved to the Employees table. Inconsistent dependencies can make data difficult to access because the path to find the data may be missing or broken.

There are a few rules for database normalization. Each rule is called a "normal form." If the first rule is observed, the database is said to be in "first normal form." If the first three rules are observed, the database is considered to be in "third normal form." Although other levels of normalization are possible, third normal form is considered the highest level necessary for most applications.

As with many formal rules and specifications, real world scenarios do not always allow for perfect compliance. In general, normalization requires additional tables and some customers find this cumbersome. If you decide to violate one of the first three rules of normalization, make sure that your application anticipates any problems that could occur, such as redundant data and inconsistent dependencies.

The following descriptions include examples.

First Normal Form

  • Eliminate repeating groups in individual tables.
  • Create a separate table for each set of related data.
  • Identify each set of related data with a primary key.

Do not use multiple fields in a single table to store similar data. For example, to track an inventory item that may come from two possible sources, an inventory record may contain fields for Vendor Code 1 and Vendor Code 2.

What happens when you add a third vendor? Adding a field is not the answer; it requires program and table modifications and does not smoothly accommodate a dynamic number of vendors. Instead, place all vendor information in a separate table called Vendors, then link inventory to vendors with an item number key, or vendors to inventory with a vendor code key.

Second Normal Form

  • Create separate tables for sets of values that apply to multiple records.
  • Relate these tables with a foreign key.
Records should not depend on anything other than a table's primary key (a compound key, if necessary). For example, consider a customer's address in an accounting system. The address is needed by the Customers table, but also by the Orders, Shipping, Invoices, Accounts Receivable, and Collections tables. Instead of storing the customer's address as a separate entry in each of these tables, store it in one place, either in the Customers table or in a separate Addresses table.

Third Normal Form

  • Eliminate fields that do not depend on the key.
Values in a record that are not part of that record's key do not belong in the table. In general, any time the contents of a group of fields may apply to more than a single record in the table, consider placing those fields in a separate table.

For example, in an Employee Recruitment table, a candidate's university name and address may be included. But you need a complete list of universities for group mailings. If university information is stored in the Candidates table, there is no way to list universities with no current candidates. Create a separate Universities table and link it to the Candidates table with a university code key.

EXCEPTION: Adhering to the third normal form, while theoretically desirable, is not always practical. If you have a Customers table and you want to eliminate all possible interfield dependencies, you must create separate tables for cities, ZIP codes, sales representatives, customer classes, and any other factor that may be duplicated in multiple records. In theory, normalization is worth pursing. However, many small tables may degrade performance or exceed open file and memory capacities.

It may be more feasible to apply third normal form only to data that changes frequently. If some dependent fields remain, design your application to require the user to verify all related fields when any one is changed.

Other Normalization Forms

Fourth normal form, also called Boyce Codd Normal Form (BCNF), and fifth normal form do exist, but are rarely considered in practical design. Disregarding these rules may result in less than perfect database design, but should not affect functionality.

The Other Describtion

Finding out and gathering user/business needs

Developing the E-R Model based on user/business needs.

Converting the E-R Model into relation union (table)

Normalize the union in order to get rid of the anomaly

Implementing the union into the database in the form of tables for each of the normalized relational union

Normalization is a process of forming the database structure so that most of the ambiguity can be expelled.

The first stage of normalization started with the lightest (1NF) up to the tightest one (5NF)

Normally, we only need to make it into 3NF or BCNF since in these stages a good tables have already been produced.

Why is normalization needed?

Optimalization of tables’ structures

Increasing the speed

Diminish the same input data

Efficiency in terms of the use of storage media

Reducing the redundancy

Getting rid of anomaly (insertion anomalies, deletion anomalies, update anomalies).

The increasing of data integrity

A table is considered to be a good one (efficient) or normal under three circumstances:

1. If there is any table decomposition, it must be as safe as possible (Lossless-Join Decomposition). Meaning that after the table is broken down into new tables, the new tables resulted is identical with the first ones.

2. The functional dependency during the data transformation is preserved (Dependency Preservation)

3. It does not break the Boyce-Code Normal Form (BCNF)

Suppose that the third criteria (BCNF) is not fulfilled, then the tables must at least not disobey the 3rd normal form/3NF.

Functional dependency represents attributive relationship in a relation.

An attribute is said to be functionally dependant to the others if we need the value of the attribute in order to determine the other attributes.

The symbol used to represent functional dependency is à

à it is read ‘functinally determines…’

Notation: A àB

A and B are attributes of a table. It means that A functionally determines B, or B is dependant to A, only and if only there are groups of data consisting the asme value of A, therefore the value of B is the same as well.

Notation: A à B atau A xà B

It is simply the negation form of the above notation.

Examples:


Functional Dependency:

  1. NRP à Nama
  2. Mata_Kuliah, NRP à Nilai

Non Functional Dependency:

1. Mata_Kuliah à NRP

2. NRP à Nilai

3. Functional Dependency observed from grade table:

Nrp à Nama

This is so because for every same value of Nrp, the value of ‘nama’ is also the same.

{Mata_kuliah, NRP} à Nilai

Because the attribute of nilai depends on Mata_kuliah and NRP all at once. In other words, for the same NRP and Maata_kuliah, then the value of uniques is also the same since Mata_kuliah and NRP are keys (unique)

Mata_kuliah à NRP

NRP à Nilai

A table is called in the state of first normal form if it is not in the form of unnormalized table, where a duplication of same field exists and there is a null field.

It is not permitted the occurrence of few things as follows:

Multivalued attribute.

Composite attribute or the fusion of both

So :

The value of attribute domain must be atomic value


Decompositioned form becomes:

Students’ table:


Table of hobbies:


Second normal form is fulfilled when a table is already in the state of 1NF, and all attributes except primary key are functionally dependant on primary keys.

A table does not met the condition of 2NF if there are attributes whose Functional Dependency are partial (depends on parts of primary key)

If there is an attribute who has got no dependency toward the primary key, then it must be excluded.

Functional Dependency of X à Y is considered to be full if when we delete an attribute(e.g. A) from X then Y is no longer functionally dependant.

Functional Dependency of X à Y is said to be partial if when we delete an attribute(e.g. A) from X then Y is still functionally dependant.

Relation scheme R in 2NF form if each of non primary key attribute A Î R is in full functional dependence to R primary keys.

The table below meets the condition of 1NF, but can not be considered as 2NF


Is not considered to fulfill 2NF, because {NIM, KodeMk} which are determined as primary key, meanwhile:

{NIM, KodeMk} à NamaMhs

{NIM, KodeMk} à Alamat

{NIM, KodeMk} à Matakuliah

{NIM, KodeMk} à Sks

{NIM, KodeMk} à NilaiHuruf

The tables need to be decompositioned/broken down into several tables that meet the condition of 2NF

The functional Dependency are as follows:

{NIM, KodeMk} à NilaiHuruf (fd1)

NIM à {NamaMhs, Alamat} (fd2)

KodeMk à {Matakuliah, Sks} (fd3)

Therefore :

fd1 (NIM, KodeMk, NilaiHuruf) à Table Nilai

fd2 (NIM, NamaMhs, Alamat) à Table Mahasiswa

fd3 (KodeMk, Matakuliah, Sks) à Table MataKuliah

The third normal form condition is fulfilled if it has been in a form of 2NF, and there is not any non primary key attribute that depend on the other non primary keys (transitive dependency)

The following table meets the requirement of 2NF, but not 3NF

It is so because there are still non primary key attributes (i.e. Kota and Provinsi) that depend on the others non primary key attributes (i.e. KodePos):

KodePos à {Kota, Provinsi}

Hence, the table needs to be decompositioned/broken down into::

Mahasiswa (NIM, NamaMhs, Jalan, KodePos)

KodePos (KodePos, Provinsi, Kota)

Boyce-Codd Normal Form has more powerful force than 3NF. In order to become BNCF, a relation must be in 1NF and every single of its attribute must be forced to depend on super key attribute.

In the example below, there is a relation among, Seminar, Kunci Primer is NPM + Seminar.

§ Students are allowed to take either one or two seminars. Each of the seminar needs two supervisors and each student must be supervised by one of the two supervisors. Each supervisor is allowed to take only one seminar, and in this case NPM and Seminar shows one Pembimbing (supervisor).

The form of Seminar Relation is 3NF, but not BCNF since Kode Seminar still has functional dependency towards Pembimbing, if one Pembimbing/supervisor can only teach one seminar.

Seminar depends on one non super key attribute as required by BCNF.

Therefore Seminar Relation should be broken down into two tables, those are:

A relation is in a form of 4NF if the relation is already in BCNF and does not contain many values dependency. In order to diminish the amount of values dependency in a relation, we need to divide the relation into two new ones, each of which possesses two attributes that have many values dependency.

Relation in a form of 5NF deals with properties called join without having the information loss (lossless join). This 5NF is often known as PJNF (Projection Join Normal Form). This kind of thing happens so rarely and is hard to be detected practically.


REFERENCE :

1. ER Ngurah Agus Sanjaya Slide Part 6 - NORMALIZATION
2. http://support.microsoft.com/kb/283878