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 How Normalization Helps Us

Lukas Baumgartner
Lukas Baumgartner
14,817 Points

Speed vs Speed

Is it more quick if i normalize my tables as far as I can?

At the place I'm working a guy told me, that they do not use normalization as much. He said the database gets slower the more "steps" the mastertable has to make to get all its related data. But isn't normalization always quicker?! I raised an eyebrow as he told me that.

1 Answer

Steven Parker
Steven Parker
231,236 Points

:point_right: Normalization is usually advantageous.

Normalization generally gives these advantages:

  • enhanced data integrity by removal of redundancies
  • reduced storage requirements
  • faster indexing and sorting since tables have fewer columns
  • query optimization in the database engine (since normalization is expected by the engine)

But there are a few potential drawbacks:

  • more tables to maintain
  • most queries will require joins
  • data in individual tables may not be comprehensible by human users
  • the need for more complex queries is not convenient for ad-hoc querying

So it might be slower to write queries for a normalized database, but a properly designed query should execute efficiently. But it's always possible to write inefficient queries, and perhaps easier to do so with a normalized database.