Re: The quest for opensource database...
From: Tony Marston (tony_at_NOSPAM.demon.co.uk)
Date: 04/21/04
- Next message: Christian Hammers: "Re: Is Ruby is better than PHP ..."
- Previous message: Lionel Gondy: "control execution time and memory use ?"
- In reply to: Useko Netsumi: "Re: The quest for opensource database..."
- Next in thread: Useko Netsumi: "Re: The quest for opensource database..."
- Reply: Useko Netsumi: "Re: The quest for opensource database..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 21 Apr 2004 18:06:47 +0100
"Useko Netsumi" <usenets_remote_this@earthlink.net> 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" <tony@NOSPAM.demon.co.uk> wrote in message > news:c65jm0$nl$1$8302bc10@news.demon.co.uk... > > > > "Ruby Tuesdays" <NoSpamPlease_rubytuzdaiz@yahoo.com> 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. > > > > > > > > > > > >
- Next message: Christian Hammers: "Re: Is Ruby is better than PHP ..."
- Previous message: Lionel Gondy: "control execution time and memory use ?"
- In reply to: Useko Netsumi: "Re: The quest for opensource database..."
- Next in thread: Useko Netsumi: "Re: The quest for opensource database..."
- Reply: Useko Netsumi: "Re: The quest for opensource database..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|