I am trying to build an API that gives data on various cities.
Currently, there is a table called APIPriv, which has the following columns:
===================================================
idApiPriv | idClient | Daily | Hourly | DevKey
===================================================
1 | 23 | 'Y' | 'N' |[MD5 Hex]
idClient is a foreign key to the client table.
Daily and Hourly are types of data - 'Y' means the client / developer has access to the data and 'N' means he / she doesn't.
DevKey is an autogenerated MD5 string, provided to the developer, which is used as the developer key.
Now, for each developer having access to the API, the database also needs to store a list of cities associated with each developer. The developer will only recive data on these cities.
How do I define this in the database? The number of cities in a list is not fixed. A developer may have access to 5 cities, another to 10, another to 7.
(There is already a master City table, which holds a list of 1500 cities and, naturally, the list of cities for each developer needs to be a subset of this data.)