Flash memory is suitable for embedded devices because it offers small, non-volatile, impact-resistant and low power consumption. However, in flash memory, the speeds of the read, write, and erase operations are different. In addition, flash memory features hardware characteristics including erase-before-write. Therefore, a flash translation layer (FTL) is required to efficiently perform operations to the flash memory. FTL allows the file system to consider the flash memory as a block device, and the existing file system can be used without any additional modifications. Most databases use the disk-aware cost model to perform query optimization. If the storage device for the database is replaced by flash memory, the cost model for the database query optimization must be changed to the flash-aware cost model. In this study, we propose a cost model for flash memory, and we compare the differences between the flash-aware and disk-aware cost models.