RE: [PEAR-DEV] Re: [PEAR] Using MDB XML Schema

From: Date: Tue, 18 Feb 2003 22:45:44 +0000
Subject: RE: [PEAR-DEV] Re: [PEAR] Using MDB XML Schema
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13471@lists.php.net to get a copy of this message
> -----Original Message----- > From: Lorenzo Alberton [mailto:l.alberton@quipo.it] > Sent: Tuesday, February 18, 2003 8:45 PM > To: Michael > Cc: pear-dev@lists.php.net > Subject: [PEAR-DEV] Re: [PEAR] Using MDB XML Schema > > At 18/02/2003 14.02 -0500, you wrote: > > Hi, > > I am learning the ropes of the MDB database schema, > > and have a question regarding primary keys. > > Specifically, it appears that the schema does not > > support the deceleration of primary keys. > > Am I right, and if so, why? > > You can declare an unique or an index key, > but not a primary (autoincrementing) one, > because that's not supported by every dbms. > You should use sequences, instead Yes a unique index can be used to "emulate" primary keys: Primary key: - Is used for identifying the row and relating to it. - Is impossible (or hard) to update. - Should not allow NULLs. Unique field(s): - Are used as an alternative access to the row. - Are updateable, so long as they are kept unique. - NULLs are acceptable. (this one was not allowed in early mysql 3.x versions iirc) > > Also, the reverse engineer script for mysql tables > > appears to ignore unsigned integers when parsing. > > "unsigned" is not a property recognised by > all dbms. So it's not implemented. Have a look > for MDB datatypes reference for more info. Actually some drivers do support it. But actually I don't know if all drivers we currently have support it and which don't. I would have to look that up. We really need a chart where all the mappings from the MDB types to their respective RDBMS native datatypes are listed to look this kind of thing up quickly. If anyone wants to help this I would be very greatful and will provide with the necessary pointers. Regards, Lukas

« previous php.pear.dev (#13471) next »