Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 2 Jun 2006 17:36:59 -0700
Message-ID: <1149295019.918955.107640@y43g2000cwc.googlegroups.com>

Bob Badour wrote:
> Mikito Harakiri wrote:
>
> > Robert Martin wrote:
> >
> >>Could you show me how you would construct a credit request packet from
> >>a customer record and send it to the credit service, and then process
> >>the response? Just for the sake of argument we'll keep the packet
> >>simple. The request packet is just a simple SSN encoded in BCD in five
> >>bytes. The response is two bytes that contain a binary number whose
> >>value ranges from 0-999. You send the request to port 884 of
> >>124.132.4.23, and it will reply within 2 seconds. If it doesn't reply
> >>within 2 seconds you need to retry. After the third attempt, you need
> >>to declare an error in the current transaction and create a log file
> >>entry. Given a valid reply, you set a flag in the customer record to
> >>ACCEPTED if the returned value is > 500, otherwise you set the flat to
> >>REJECTED.
>
> It looks like the self-aggrandizing ignorant directed the question to
> me. I added him to my twit-filter ages ago. The solution offered by
> Mikito is not what I would suggest and doesn't reflect the post to which
> Martin replied.
>
> Assuming:
> 1. The SSN is in ssn_var.
> 2. The customer relvar has a candidate key ssn.
> 3. The request relvar physically maps to a channel to 124.132.4.23:884
>
> I might propose:
>
> Repeat up to 3 times
> insert into request tuple( ssn_var ),
> wait seconds(2)
> until ( result = unwrap ( response )){}
> else log_and_abort("The error details");
>
> update customer
> set flag = case when result > 500 then ACCEPTED else REJECTED end case
> where ssn = ssn_var;

The original question doen't make any sence to me. What business task Robert is trying to solve? Check for SSN? I understand that. Has channel 124.132.4.23:884 any importance? I don't think so. Next, what is significance of value 500?

Checking for SSN is easy. Sure SSNs are stored in a table, so that you need just one lookup. Oh, this communication has to be secure/encrypted? Make sure then your connection to database is secure/encrypted. This is infrastructure issue that has nothing to do with application programming. Next, a query to the database normally is not limited in time. Well add some code which aborts the query gracefully, recover and make second, and third attempts. Received on Fri Jun 02 2006 - 19:36:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US