a small database engine based on array function in javascript