Data insertion and retrieval