sql - Database design for two similar tables -


no code here! more of database design problem... working on access on "large" amount of data. facing interesting problem , didn't find answer specific case.

i have table called "marque" has 2 fields : marq_name text primary key, marq_group text.

this table generated again , again every 3 (or 6) months external source.

the problem external source not give data want, why need create second table marque called "marque2" exact same columns "marque", , fill table "by hand" our data (so have data our external source plus our own data). can't put our data directly in "marque" table updated automaticaly regularly external source.

when application needs these data join 2 tables "marque" , "marque2" gets data.

but don't think database schema. best db schema particular problem of having 2 exact similar tables same columns, not possible use 1 table?

i hope clear enough. help

edit: help! used @gordonlinoff 's idea in comments (summarized gene:)

one table 2 fields, , third indicate source. when update data, update data comes external source, leaving in-house source alone, based off "source" field

and works perfectly. thing in case solved foreign_key problems 2 similar tables (which impossible). all


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -