The goal is to create an app to manage a small library. The app should:
The app will include:
To convert business problems into a data model, we identify key entities (e.g., "author", "book") and their relationships. For example, authors write multiple books, and customers borrow books. These relationships are translated into tables and normalized to reduce redundancy and improve data integrity.
Normalization is the process of organizing data to reduce redundancy and improve data integrity. It is typically achieved through a series of steps known as normal forms, each of which addresses specific types of redundancy and dependency issues. These are the first three normal forms:
First Normal Form (1NF) Each table must have atomic (indivisible) values, and there should be no repeating groups or arrays in any column.
Issue Fixed by 1NF:
Example:
Second Normal Form (2NF)
Issue Fixed by 2NF:
Example:
Third Normal Form (3NF)
Issue Fixed by 3NF:
Example:
In the next module, we will learn how to design our database structure based on these principles.
Lesson 5 Test your knowledge
So far we created a way to track the inventory changes produced by purchase invoices. To test what you've learned, we advise you to create another type of invoice called sale_invoice. This invoice is similar with purchase_invoice with some differences.
Module 2 - Bussiness requirements to Data model