From: Useko Netsumi Date: 2004-04-22T03:49:08+09:00 Subject: Re: The quest for opensource database... But isn't that supposedly the function of the database trigger - that is to ensure that all contraint are accounted for without kludging it? But I do get your point though. I'm sure with expertise such as yours, you can replace those stored procedures/trigger function in PHP or any scripting language but isn't that stretching it a bit too far? With stored procedures/trigger, script programmer can concentrate more in the flow/design of the application where the database programmer can concentrate on the data storage(and simple data manipulation using strored procedures) and data constraints(trigger). Just my 2cents. "Tony Marston" wrote in message news:c669n9$kui$1$830fa7a5@news.demon.co.uk... > > "Useko Netsumi" wrote in message > news:c66462$8ber2$1@ID-205437.news.uni-berlin.de... > > May be we can get away with the strored procedures. Why would one do > > manipulation of the data inside a database engine, right? The function of > > database is to store and retrieve information, that's it. Beyond that you > > really stretch it and this where scripting language such as Ruby comes in. > > > > But for trigger, to write a commercial grade transaction processing > > application, you definitely need trigger. Trigger will aid > > programmers/designer to ensure certain consistency checking happen > > before/after certain opearation. How would you do that outside the > database > > engine withouth kludging it? > > I personally create a separate class for each database table and define the > constraints within that class. I then have standard code which is used to > deal with these constraints at the appropriate time (see > http://www.tonymarston.co.uk/php-mysql/databaseobjects2.html for some > examples). In this way I achieve the following objectives: > (1) The constraint details and business logic for a database table are > contained in the same class, therefore everything is in one place instead of > being scattered about hither and yon. > (2) I am in complete control when it comes to implementing the constraints, > so I have the power to change them at runtime should the need arise. > (3) If I have a problem I can always step through with my debugger. > > -- > Tony Marston > > http://www.tonymarston.net > > > > > Just my 2cents back from my college days. > > > > > > For simple and less-dynamic-update application, you might not need tri > > "Tony Marston" wrote in message > > news:c65jm0$nl$1$8302bc10@news.demon.co.uk... > > > > > > "Ruby Tuesdays" wrote in message > > > news:c63aer$7ck4g$1@ID-205437.news.uni-berlin.de... > > > > Perhaps you database guru able to suggest what would be a good choice > > for > > > > opensource database platform to use to develop projects. > > > > > > > > At the moment the project is small/medium, but it will grow in size > both > > > > data, users, and number of transactions. I'm using MySQL for right now > > but > > > > it lack of trigger, stored procedures, etc ... it sometimes slows the > > > > project. > > > > > > You do not need stored procedures or database triggers to write > successful > > > applications. I once had to maintain a system that was built around > > > procedures and triggers, and it was a nightmare. The problem was that > one > > > trigger/procedure updated several tables, which fired more triggers > which > > > contained more updates which fired more triggers ..... It was impossible > > to > > > keep track of what was being fired where. > > > > > > Another reason I prefer to put all my business logic into PHP code > instead > > > of triggers is that PHP code is a lot easier to debug. Have you come > > across > > > an interactive debugger for database procedures and triggers? > > > > > > -- > > > Tony Marston > > > > > > http://www.tonymarston.net > > > > > > > > > > > > > Is PostgreSQL any better/worse? Or is that any other choice beside the > > > two? > > > > Thanks. > > > > > > > > > > > > > > > > > > > >