2NF meaning
Last updated 23 month ago
What is Second Normal Form (2NF)?
What does 2NF stand for?
Second ordinary shape (2NF) is the second step in normalizing a Database. 2NF Builds on the first everyday shape (1NF).
Normalization is the Procedure of organizing Records in a Database in order that it meets simple requirements:
- There isn't any redundancy of data (all data is stored in handiest one location).
- Data dependencies are logical (all associated inFormation items are stored together).
A 1NF desk is in 2NF shape if and most effective if all of its non-high Attributes are Functionally depending on the complete of each Candidate Key.
What Does Second Normal Form Mean?
After meeting the requirements of 1NF, 2NF requires the database dressMaker to do the subsequent:
- Split up all statistics resulting in lots of-to-many Relationships and keep the information as separate Tables. For example, in a database used by a school’s Software, of the tables are STUDENT and SUBJECT. In real existence, a pupil takes several topics simultaneously even as a subject is studied through numerous college students. These are Many-to-Many Relationships. 2NF States that this courting should be split into Greater than the 2 tables above (STUDENT and SUBJECT). One way of splitting them is by using introducing a 3rd table, which incorporates the columns Student_ID, Subject_ID, Semester and Year. In this way, there's no direct Relationship between STUDENT and SUBJECT due to the fact all relationships are created Circuitously through the third table.
- Create relationships between tables via use of Foreign Keys. For Instance, a bank’s database incorporates tables: CUSTOMER_MASTER (for storing customer info) and ACCOUNT_MASTER (for storing details about financial institution bills, such as which purchaser holds which account). There have to be a way to Hyperlink the 2 tables to recognize who the patron is for each account. The way to do that is through a foreign key, which is a column within the ACCOUNT_MASTER table pointing to a corresponding column in the CUSTOMER_MASTER table.
A desk for which there aren't any partial useful dependencies at the Primary Key might or won't be in 2NF. In addition to the primary key, the desk may include other candidate keys; it is important to establish that no non-high attributes have Component-key dependencies on any of these candidate keys.