Sunday, August 18, 2013

Database Normalization Tutorial with example



Normalizing a database means laying out the tables in an efficient way with the main focus being on preserving the integrity of data. If the database is normalized, there is no repetition of data.


The need for Normalization



Normalization Process



  • Relations can fall into one or more categories (or classes) called Normal Forms
  • Normal Form: A class of relations free from a certain set of modification anomalies.
  • Normal forms are given names such as:
    • First normal form (1NF)
    • Second normal form (2NF)
    • Third normal form (3NF)
    • Boyce-Codd normal form (BCNF)
    • Fourth normal form (4NF)
    • Fifth normal form (5NF)
    • Domain-Key normal form (DK/NF) 

Functional Dependencies


  • A Functional Dependency describes a relationship between attributes within a single relation.
  • An attribute is functionally dependent on another if we can use the value of one attribute to determine the value of another.
  • Example: Employee_Name is functionally dependant on Social_Security_Number because Social_Security_Number can be used to uniquely determine the value of Employee_Name.
  • We use the arrow symbol -> to indicate a functional dependency.
    X -> Y is read X functionally determines Y
    Student_ID -> Student_Major
    Student_ID, CourseNumber, Semester -> Grade
    Course_Number, Section -> Professor, Classroom, NumberOfStudents
    SKU -> Compact_Disk_Title, Artist
    CarModel, Options, TaxRate -> Car_Price
        

Saturday, February 9, 2013

convert decimal tohexadecima



package stack;
import java.util.Scanner;

public class decimal2hexa extends Stack {
    String digits = "0123456789ABCDEF";
    int decimal;
    int size;

Friday, February 8, 2013

Array copy method

Copies a specified portion of a source array, starting from a specified 
position, to a destination array, starting at a specified position. 
 
public static void arraycopy(
    java.lang.Object src,
    int src_position,
    java.lang.Object dst,
    int dst_position,
    int length);

 

© 2013 CSC. All rights resevered. Designed by Templateism

Back To Top