Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,258 members, 7,953,980 topics. Date: Friday, 20 September 2024 at 10:17 AM |
Nairaland Forum / Science/Technology / Programming / Database Normalization And Complex Queries Tutorial (1625 Views)
Aren't There Any C++ Devs On This Section Or Programmers That Do Complex Stuff? / My First Html/css Project After Learning Responsiveness(media Queries) / Multiple Queries (2) (3) (4)
Database Normalization And Complex Queries Tutorial by Nobody: 11:25am On Sep 19, 2019 |
This tutorial is designed to help beginners understand the concept of database normalization, indexing, and how to use mysql complex queries to retrieve data in a more efficient way. It is very difficult (almost impossible) to retrieve concurrent data from mysql tables using simple queries once the database is normally, hence, I will show you how to use complex queries (joints, group by, etc) to retrieve data from mysql tables to ensure efficient operation of your applications. By following this tutorial, I am assuming you already have fundamental knowledge of relational databases and can write and execute simple mysql queries. You can also ask any related questions |
Re: Database Normalization And Complex Queries Tutorial by Nobody: 11:37am On Sep 19, 2019 |
what is database normalization? Database normalization is the process of structuring a relational database in accordance with a series of so-called normal forms in order to reduce data redundancy and improve data integrity. It was first proposed by Edgar F. Codd as part of his relational model. Normalization entails organizing the columns (attributes) and tables (relations) of a database to ensure that their dependencies are properly enforced by database integrity constraints. It is accomplished by applying some formal rules either by a process of synthesis (creating a new database design) or decomposition (improving an existing database design). source wikipedia In this tutorial, we will use a practical approach in understanding the concept of database normalization. Before we proceed, let me mention here that if you already have a table with more than 10 columns in your database, such database needs to be normalized! |
Re: Database Normalization And Complex Queries Tutorial by Nobody: 11:12am On Sep 20, 2019 |
Now, let's explore the concept of the so called normal forms or what I otherwise call the laws of normalization . However, it is very important to state here that a database is considered normalized only when it has attained the third normal form (3NF). (1) first normal form (1NF) : A table is in first normal form if and only if the domain of each attribute contains only atomic (indivisible) values, and the value of each attribute contains only a single value from that domain. In summary, a table in 1NF must satisfy the following conditions: 1) Data is stored in tables with rows uniquely identified by a primary key 2) Data within each table is stored in individual columns in its most reduced form 3) There are no repeating rows |
Re: Database Normalization And Complex Queries Tutorial by Emdee590(m): 11:38am On Sep 20, 2019 |
Continue I am following |
Re: Database Normalization And Complex Queries Tutorial by Nobody: 10:51pm On Sep 20, 2019 |
The following table voilets the 1NF rule because there are repeating records in the table, it is not atomic
|
Re: Database Normalization And Complex Queries Tutorial by Nobody: 11:18pm On Sep 20, 2019 |
Next, we normalize the table as follows: The table is now in its first normal form(1NF). Alternatively, you can also normalize the table by splitting the columns
|
Re: Database Normalization And Complex Queries Tutorial by Nobody: 11:29pm On Sep 20, 2019 |
2) Second Normal Form : The second normal form (2NF) introduces a new concept called primary key. The general rule of tables in 2NF is as follows: a) Be in 1NF b) Single Column Primary Key For a table in second normal form (2NF), all entries must be associated with a primary key. We can further normalize the above table by splitting the table into two and introducing a primary key, let's just call it membership id 1 Like
|
Re: Database Normalization And Complex Queries Tutorial by Nobody: 3:15pm On Sep 23, 2019 |
The class will continue today |
Re: Database Normalization And Complex Queries Tutorial by ajeleseujn(m): 10:39am On Sep 24, 2019 |
Following ... |
Re: Database Normalization And Complex Queries Tutorial by Millerules(m): 1:40pm On Sep 25, 2019 |
Nice Op. Guys check out Oracle 12C SQL by Joan Casteel. Chapter one dealt with this. Enough to get you on track. |
Re: Database Normalization And Complex Queries Tutorial by Emdee590(m): 2:33pm On Sep 28, 2019 |
Millerules:PDF ? Please share direct link here |
Re: Database Normalization And Complex Queries Tutorial by ajeleseujn(m): 5:27pm On Oct 29, 2019 |
Good work sir |
Re: Database Normalization And Complex Queries Tutorial by Nobody: 2:39pm On Oct 31, 2019 |
ajeleseujn:Thanks sir. I will soon post an update. 1 Like |
Re: Database Normalization And Complex Queries Tutorial by ajeleseujn(m): 2:04pm On Nov 01, 2019 |
zclass: That will be great. |
(1) (Reply)
Nigeria Represented In Google Code Jam, Russians Dominate / Help : Editing A Html Template / Python Nigeria List and Website Is Now Live
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17 |