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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to make data unidentifiable?

Re: How to make data unidentifiable?

From: Erik Ykema <ErikFOO_at_ykema.ws>
Date: Fri, 11 Jun 2004 23:52:22 +0200
Message-ID: <40ca2999$0$15440$e4fe514c@news.xs4all.nl>


"Joseph" <j_parrinello_at_msn.com> wrote in message news:dd497a10.0406090900.43e31290_at_posting.google.com...
> Hello,
>
> I am building a database to be used for demonstration purposes. I wish to
> import the data from an existing database into the demo. However I need
to
> tranform the data from the existing database so that the data is
> unidentifiable but meaningful. For example, I need to change the First
> name, Last name, Address, city, state, zip, Social Security etc...so that
> they are different to the original database but still have meaning in the
> new database. E.g. A record such as:
>
> Peter Paulas, 123 Main St, New York, New York, 10023, 555-342-3423
> becomes something like:
> Simon Trickle, 234 East St, Bronx, New York, 10023, 534-234-2333
>
> I would like the transformed record: Simon Trickle, to still be linked to
> the remaining data that is not tranformed. Has anybody tried this before
> and if so, do you have any easy solution.
>
> Thanks,
> Joseph

Using the example you have given, I can suggest the following working prototype for achieving your not so-difficult goal: DECLARE
  CURSOR c1 IS SELECT object_name AS a FROM all_objects ORDER BY SIN(ROWNUM);
  CURSOR c2 IS SELECT created AS a FROM all_objects ORDER BY TAN(ROWNUM);   CURSOR c3 IS SELECT object_id AS a FROM all_objects ORDER BY COS(ROWNUM);

  r1 c1%ROWTYPE;
  r2 c2%ROWTYPE;
  r3 c3%ROWTYPE;

BEGIN
  OPEN c1;
  OPEN c2;
  OPEN c3;

  LOOP
    FETCH c1 INTO r1;
 EXIT WHEN c1%NOTFOUND;
 FETCH c2 INTO r2;
 FETCH c3 INTO r3;
 DBMS_OUTPUT.PUT_LINE (r1.a||r2.a||r3.a); Received on Fri Jun 11 2004 - 16:52:22 CDT

Original text of this message

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