* Ronan Lucio > Is the Primary Key Column mandatory? > > Supposing: > If I have two tables: Clients and Cars, and a third table Clients_R_Cars, > that is a relationship between Clients and Cars. > > I only need to know what cars the clients have. > So, I just need to two columns "CliCar_ClientsID" and "CliCar_CarsID", > the will be my index keys. > > Even thus do I need to create a Primary Key Column "CliCar_ID"?
No, you don't need to do that. You can create a primary key based on the two columns, (CliCar_ClientsID, CliCar_CarsID) or (CliCar_CarsID, CliCar_ClientsID). Sometimes it is usefull to define both of these compound indexes, then of course only one of them can be PRIMARY, the other is defined as an UNIQUE index. You would get the same effect by defining both as UNIQUE, but having a distinct primary key is 'cleaner'. -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]