and something about the normalization..
thankx in advance!!!!
| |
|
Welcome to AstaHost - Dear Guest | |
Posted 07 July 2009 - 04:15 PM
Posted 06 April 2011 - 07:02 PM
Composite key:A primary key that can consists two or more than two attribute is known as Composite Key.
Primary Key:1) uniquely identify,2) no null,3)no repetition4)no duplication
-reply by Aamir khan
Posted 16 March 2011 - 11:02 AM
Hope this answers your question !
- A primary key can consist of one or more columns of a table. When two or more columns are used as a primary key, they are called a composite key. Each single column's data can be duplicated but the combination values of these columns cannot be duplicated.
- For example, if you have a Student table and a Course table, and one student can select many courses and one course can be selected by many students, so this is a many-to-many relationship. So you need to create the third table to define the relationship, say it's called StudentCourse. It is important to note that you only need the StudentID and CourseID in this table as a composite key. You do not need an extra identity ID column in this table to uniquely identifies each row because only having an ID column to uniquely identifies each row is not sufficient. It cannot prevent the same student selecting the same course from being inserted into this table.
- Normalization is the process of organizing your data and breaking it into smaller tables that are easier to manage. The primary reason we normalize a database is to prevent redundant data.
0 members, 0 guests, 0 anonymous users