Re: Re: DB_DataObject and MDB
| From: | Lukas Smith | Date: | Wed, 05 May 2004 07:58:23 +0000 |
| Subject: | Re: Re: DB_DataObject and MDB | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28815@lists.php.net to get a copy of this message | ||
Hans Lellelid wrote:
I agree to some extend. It just too easy to have things get out of sync. I am still hoping for a MDB2 frontend. If we add just a few more methods I think it could be achieved fairly easily. That would give a phpMyAdmin for all supported databases essentially. Another huge advantage would be that all changes done using this frontend would find its way into the real database and the xml schema at the same time. Or you could build up your schema and then replicate to the database (possibly doing ALTER statements which is actually already supported). But yes its tricky and it can be a pain. However reverse engineering the schema has alot of limits. In my reverse engineering code I often have to guess the datatype. For example CHAR(1) is mapped to text as default. However if the name is prefixed with "is" or "has" then its mapped to a boolean by default. However enforcing names formats in the database is very restrictive, but they could be used for type hints. Neither of the above mentioned stuff is the silver bullet obviously.From that experience, I would almost never suggest keeping database schema in any place other than in the database... - But I know a few others like to think it is feasible... - so the long term plan is to support this..Yeah, it'll be a pain. I'm just thinking of how some databases allow you to change more information about a column than other databases. In many cases it may require creating a new column and dropping the existing one or something ... could get ugly.
Yeah parsing XML during the runtime would be a bad idea. So I agree for the runtime we need to be able to covnert the XML data to a faster serialized format. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07The XML schema is however very usefull for dumping schema, and recreating it in other databases...Sure, it's a great starting point. XML also has the advantage of being particularly suited to storing more information than needed -- making it a great way to drive things like forms, etc.Bit arithemetic is alot faster than string compares.. - and uses less memory.. - thats the logic behind it..