Primary keys are supposed to be unique unrelated to the actual data
such as an INT with auto increment so there will never, ever be duplicates.

If you use actual data (like a name) you CAN get duplicates
and you are breaking the design theory.
If you think you'll never get a duplicate, you will.

In theory, and practice, your primary key ought not be real data
but rather an arbitrary think like INT.

Make a field called id as an INT primary auto increment.
Then make your other real data as an INDEX as you want.

What you're suggesting is not correct.

Follow this practice: I assure no grief !


---------- Original Message -----------
From: Bruce <bbr...@paddys-hill.net>
To: mailing list for gambas users <gambas-user@lists.sourceforge.net>
Sent: Wed, 27 Jun 2012 22:02:29 +0930
Subject: Re: [Gambas-user] mysql float behaviour

> On Wed, 2012-06-27 at 04:25 -0700, Bill-Lancaster wrote:
> > Thank you Benoît - it worked fine.
> > Where can I find more info re this '&1' ?
> 
> Hi Bill,
> 
> It's in the help at gb.db.Connection.Subst
> 
> You're right.
>         Connection.Find ( Table As String [ , Request As String,
>         Arguments As , ... ] ) As Result
> doesn't really explain it well.
> 
> regards
> Bruce
> 
> (p.s. I'm going to be a bit "rdms-ist" here.  If you are looking for a
> proper rdbms without weird problems, do yourself a favour, bypass MySQL
> and use postgresql.  Why? Because for example, if you are ever in the
> case when your natural primary key may include things like names such
> as 
>       "van der Plum-O'Brien-MacDonald III, Sioban"
> 
> then mysql will drive you nuts. :-) Seriously, the effort to learn
> postgresql is worth it. Here is a "oldish" site that highlights my
> feelings http://ask.metafilter.com/92162/MySQL-vs-PostgreSQL and in
> particular one that is referenced there, if you have a couple of million
> brain cells to spare,
> http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems
>   )
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to