I am using an oracle database and want to generate test data from a live database, but I do not want to copy the whole database content.
Given a database DB(S, D) consisting of the database schema S (everything described with DDL (tables, columns, constraints,...)) and data D (the actual data in the db, everything described with DML), a query Q and a result set R that is the result of the query when run on the DB. In pseudocode:
R = runQuery(Q, DB(S, D))
Is there a tool which can generate data D2 such that I get the same result set R with query Q?
D2 = generateTestData(S, Q, R)
R2 = runQuery(Q, DB(S, D2))
assert(R == R2)
Is this possible in general? Can toad generate these insert statements?