|
|
|
|
|
by rmbyrro
1538 days ago
|
|
If you can map the differences in your code and your interface does not leak any implementation detail, you won't have problems. But if the current database has features that can't be mapped to the new one, the interface won't save you. Example: DynamoDB has a "time-to-live" feature [1]. You add a specific property to any item with a timestamp and it will auto-delete this item at the timestamp determined. Few databases will provide this out of the box. If you choose to use it and later need to migrate, you'll have to implement your own kind of "TTL monitor" to perform the same task. The interface can't possibly save you from this. But this would be an issue whether you decide to use a central interface or not, anyway... [1] https://docs.aws.amazon.com/amazondynamodb/latest/developerg... |
|