Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases Querying Relational Databases Database Normalization Database Normalization

Ariana Maksimović
Ariana Maksimović
2,797 Points

What is normalisation of database (in SQL) ?

Hi,

During course unfortunately I am still not clear with some things about normalisation. What is actually normalisation of database in easy explanation? Why do we use it?

Thank you for answers

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Normalisation is a process of cleaning up a database so that when you make database relationships you do not end up repeating data.

Say you have a list of fields. You have to decide how best to organise those fields into tables or “entities”

In tables of related data you have your primary and foreign keys. This is how tables are given database relationships. A Primary key gives unique identifier for a row of data. That’s one table/entity. A foreign key is a representation of a primary key that exists in another table. Thats the basics of how you join 2 groups of data together.

Ariana Maksimović
Ariana Maksimović
2,797 Points

Thank you for answer :) but to be honest I am still little bit confused for some things, so not so sure if I have understood all :/