In my Rails app, I want to allow the user to connect to multiple remote locations via different protocols (FTP, SFTP, S3, Dropbox). Each location has different properties:
FTP: host, port, username, password, is_passive
SFTP: host, port, username, password
S3: bucket, key (not sure these are right; I'm guessing)
Dropbox: username, password (again, I'm guessing)
What would be the more advantageous database table design for storing this information?
Option 1 (master table with tables for each protocol)
connection
id
name
protocol
ftp_connection
connection_id
host
username
password
port
is_passive
sftp_connection
connection_id
host
username
password
port
s3_connection
connection_id
bucket
key
dropbox_connection
connection_id
username
password
Option 2 (master table with a 'properties' table)
connection
id
name
connection_properties
id
connection_id
property_name
property_value
(don't worry, I'll be encrypting credentials)
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)