ashish17 0 Report post Posted July 6, 2009 I am learning database and i want to know the differernce between the primary and composite keys..and something about the normalization..thankx in advance!!!! Share this post Link to post Share on other sites
darasen 0 Report post Posted July 7, 2009 Greetings,A composite key is a key that uses more than one column to identify the data as opposed to a single column. This can sometimes be more useful than assigning each row an arbitrary value to use as a key such as an auto number field. For normalization I suggest you visit this site.You may also wish to take a look at this post for a list of really useful database links. I hope this is helpful to you. Share this post Link to post Share on other sites
iGuest 3 Report post Posted March 16, 2011 I am learning database and i want to know the differernce between the primary and composite keys.. and something about the normalization.. Composite Key? Hello Ashish17, This is a very basic database question which most of us get, but I think it is necessary to clarify the concept. A Primary Key uniquely identifies each row in a table, it is not always a single-column key,it could be a single-column key or a composite key 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. Hope this answers your question ! -reply by Rebecca Share this post Link to post Share on other sites
iGuest 3 Report post Posted April 6, 2011 primary and composite keys..Composite Key? 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 Share this post Link to post Share on other sites