17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3 – Schema Architecture Strategiesprocessing database (OLAP), will benefit from a lower level of normalizationdue to the reduction of joins required to access related data.First Normal Form• Data should be separated into tables, each of which contains columnsthat are logically similar.• Each of these tables should have a unique identifier, known as aprimary key, which represents each row and prevents duplicate rows.• The columns in the table should not contain any 'repeating groups' ofdata.Figure 3-3 shows a version of the borrower information that meets the criteriafor first normal form. The loan data is stored in a separate table from theborrower information. A single borrower record can be related to multiple loanrecords. Each record contains its own primary key and the data is not repeatedacross the data row.Figure 3-3: First normal form example of borrower tables.Second Normal Form• The non-primary key columns that are contained within the table mustbe dependent upon the primary key. If the data in the table applies tomultiple rows within the table it should be moved to a separate table.• Tables contain values that are related to other tables’ primary key.These values are called foreign keys.Figure 3-4 shows a design for the borrower information that meets the criteriafor second normal form. Notice that the Borrower_Type, Purpose_Typeand Mortgage_Type columns have _ID added to their names. These itemsare now foreign keys to reference tables. Also, the introduction of theLoan_Borrowers table allows many borrowers to be related to many loans.65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!