Answer the question
In order to leave comments, you need to log in
Create multiple tables or try to unify?
Tell me what you would do in such a situation.
When designing a database, I need to create a table (or tables) that will store data to connect to various APIs.
The problem is that each API provider has its own set of data required for authorization - somewhere only one key is enough, somewhere you need a login and password, somewhere two keys. The data that the API returns after authorization also differ.
Try to unify everything and create one table, but with the maximum number of fields (unnecessary put down as NULL), or split into several tables - each API provider has its own table?
There was also an idea to create one table of the settings type and store three fields in it: id, parameter name, parameter value, and retrieve the necessary data by the prefix api_provider-name_parameter-name (but in this case, most likely, you need a table with the names of providers) .
I would be grateful for any ideas and guidance :)
Answer the question
In order to leave comments, you need to log in
json field.
Authorization data is only needed by specific code that works with this authorization. Search by authorization token, which API service this token belongs to, you will not care anyway. (although it will be possible if desired and a fairly modern DBMS)
but in this case, most likely, you need a table with the names of providers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question