Entities and Attributes
- Conceptual model: A data model, usually represented by an entity relationship diagram (ERD)
- The client dream would be the conceptual model
- Physical model: A design for an object (a car, a house, a database, etc) which includes implementation details such as size, volume, weight, etc)
- The physical reality will become the physical model
- All many-to-many relationships must be reduced to a set of on-t--many relationships
Database Normalization
Storing data in a normalized format means only one update is required to reflect the new address, and it should always be the one that appears whenever your mailing address is needed.
Many people unfamiliar with database design principles often ask, “Why not just put all the data in one big table?” This single-table approach leads to problems of data redundancy (duplication) and data anomalies (data inconsistencies).
To avoid these data issues, database normalization is used to create a design that reduces or eliminates data redundancy and, therefore, avoids data anomalies. In general, normalization helps database designers determine which attributes, or fields, belong to each entity. In turn, this information helps determine which fields belong in each table. Normalization is a multistage process that enables designers to take the raw data to be collected about an entity and develop the data into a structured, normalized form that reduces the risks associated with data redundancy. Data redundancy poses a special problem in databases because storing the same data in different places can cause problems when updates or changes to data are required.
When a record contains repeating groups (that is, multiple entries for a single column), it’s considered unnormalized. First-normal form (1NF) indicates that all values of the columns are atomic—meaning they contain no repeating values. To convert records to 1NF, remove the repeating values by making each author entry a separate record,
When more than one field is used as the primary key for a table, the combination of fields is usually referred to as a composite primary key
Now that the repeating values have been eliminated and the records can be identified uniquely, the data is in 1NF
A problem known as partial dependency can occur when the primary key consists of more than one field. Partial dependency means the fields contained in a record (row) depend on only one portion of the primary key
By removing Partial dependency your table is now second-normal-form (2NF)