De-identifying a relational database for demo or pre-production testing while maintaining referential integrity involves using Gretel's Transform API to anonymize sensitive data without compromising the relationships between primary and foreign keys. The process begins by gathering data from a mock ecommerce database using SQLAlchemy, followed by defining transformation policies to replace personally identifiable information (PII) with fake data and applying numeric and date shifts where appropriate. Transformations are managed through YAML policy files that guide the anonymization process while ensuring key relationships remain intact. Model training and data generation are conducted in parallel in the Gretel Cloud, with the status of each model and data generation task monitored to ensure successful completion. Finally, to preserve the referential integrity of primary and foreign keys, a Label Encoder is employed to de-identify keys while allowing tables to be joined correctly. The final anonymized dataset is loaded back into the database, demonstrating the effectiveness of the technique in handling large, multi-table databases while preserving data utility.