Follow these steps to build a complete database-sharding API:
- Learn one of the PostgreSQL procedural languages.
- Create a table to track shard-configuration settings.
- Write one or more functions to manage shard-configuration settings.
- Create a table to track shard tables and source schemas.
- Write a next_unique_id equivalent function.
- Write one or more functions to control which tables are managed.
- Write one or more functions to build or alter each shard's structure based on the tables it contains.
- Create a table to track logical to physical shard mappings.
- Write one or more functions to manage logical to physical shard mappings.
- Write one or more functions to grant sufficient permissions to users tasked with using all of the ...