I'm working on a project that is focused on meta information about phone numbers.
Using postgres, we will be seeding the database with millions of phone numbers and I'm concerned about the best way to store this information.
Right now I've been considering a phones
table with each row representing the phone number as a string. Then simply joining off of that... Something like below:
+-----------------------+ +-----------------------+
| phone_numbers | | phones |
+-----------------------+ +-----------------------+
| id: integer +-------+ | id: integer |
| digits: string | | | |
| | +-----+ phone_number: integer |
| | | |
| | | |
| | | |
+-----------------------+ +-----------------------+
How should the database schema be designed with regard to the storage of phone numbers?