Building Memory Table from AES Encrypted Physical Table
I want to only store encrypted data on my website. I have a tiny 3 column table (ID, Name, Address) for a test. It is AES encrypted. My thought is to create a memory table which will be non-encrypted and build it from the encrypted table on my application init. So I was considering how to do this especially since the encrypted table structure is (ID-bigint autoincrement, Name-varbinary 200, Address-varbinary 200) and I want the resulting memory table to be (ID, bigint, Name varchar 100, Address varchar 100). I don't want any physical intermediary unencrypted data. Here were statements inserting and retrieving the encrypted data:
INSERT into user (first_name, address) VALUES (AES_ENCRYPT('Obama', 'usa2010'),AES_ENCRYPT('Obama', 'usa2010'));
SELECT ID, AES_DECRYPT(first_name, 'usa2010'), AES_DECRYPT(address, 'usa2010') from user;
Any thoughts much appreciated including alternative approaches to just storing encrypted data.