LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] PostgreSQL vs. MySQL

[ILUG] PostgreSQL vs. MySQL

Nick Murtagh nickm at go2.ie
Mon Dec 2 09:54:03 GMT 2002


Ronan Waide wrote:
> UI:
>   try {
>     store in Database
>   } catch {
>     burp loudly
>   }
> 
> Database:
>   if ( values are ok )
>     throw exception
>   else
>     insert values

I have a problem with this design - and it's mainly to do with the burp
loudly part. If some intermediate layer or the application itself does
validation, you can have the GUI give an error message explaining
what went wrong and what to do about it. If the database "throws an 
exception", you have two choices. One, display the error message 
returned by the db, probably something along the lines of "Constraint 
violated ..." which won't mean anything to the average end user. Or try 
and parse the error messages from the database and report something 
sensible to the user.

You're always going to need to do some validation directly in the GUI,
unless you want a really unusable GUI.

Nick




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell