How to structure database of an application that will utilize multiple datasources for its models?How does database indexing work?How do I quickly rename a MySQL database (change schema name)?How to list the tables in a SQLite database file that was opened with ATTACH?How do I connect to a MySQL Database in Python?Database development mistakes made by application developersHow to get size of mysql database?How to get the sizes of the tables of a MySQL database?Database Best Practice with multiple similar entitiesHow to copy data between databases which has different table structures?Getting data from multiple databases with same tablenames in django

What do we gain with higher order logics?

What is the history of the check mark / tick mark?

What are they doing to this poor rocket?

How much water is needed to create a Katana capable of cutting flesh, bones and wood?

Movie where a boy is transported into the future by an alien spaceship

If Boris Johnson were prosecuted and convicted of lying about Brexit, can that be used to cancel Brexit?

Metal bar on DMM PCB

What are the words for people who cause trouble believing they know better?

Is it legal in the UK for politicians to lie to the public for political gain?

One End of Light Fixture Appears To Be Dead

How can I determine the spell save DC of a monster/NPC?

Adding extra constness causes compiler error

Word for a small burst of laughter that can't be held back

Pros and cons of writing a book review?

X-shaped crossword

Comma Code - Ch. 4 Automate the Boring Stuff

Can Green-Flame Blade be cast twice with the Hunter ranger's Horde Breaker ability?

It possible to have subscript and super script that does not shrink the font size?

What is the right way to float a home lab?

How can Iron Man's suit withstand this?

Did thousands of women die every year due to illegal abortions before Roe v. Wade?

Anatomically Correct Swarm of Rodents

How could a possessed body begin to rot and decay while it is still alive?

Is it a problem that pull requests are approved without any comments



How to structure database of an application that will utilize multiple datasources for its models?


How does database indexing work?How do I quickly rename a MySQL database (change schema name)?How to list the tables in a SQLite database file that was opened with ATTACH?How do I connect to a MySQL Database in Python?Database development mistakes made by application developersHow to get size of mysql database?How to get the sizes of the tables of a MySQL database?Database Best Practice with multiple similar entitiesHow to copy data between databases which has different table structures?Getting data from multiple databases with same tablenames in django






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm creating an application that will use at minimum two different API for data of its models. For example, I'll have an entity / model of a person. The data for this person comes at minimum two different API and more may be relevant in the future. For example, email and phonenumber may come from one data source and first name and second name from another.



How would one structure an database for this, that is flexible enough to handle adding / removing of the "data sources".



I initially though of an database structure looking like this:



[Person]
- ID
- FirstName
- LastName
- Email
- PhoneNumber



[Person_FIRST_SOURCE]
- Person_ID
- Person_FIRST_SOURCE_ID



[Person_SECOND_SOURCE]
- Person_ID
- Person_SECOND_SOURCE_ID



Which I then would be able to in the data synchronization script to look up what "Person" entity in my database, the current iterating person from the source represents. This would allow me to easily connect/add more sources as I go.



EDIT: I would like to add that it's not always that Person A exist within both sources of data.



EDIT 2: The main question is not really dependent on the "Person" model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.










share|improve this question



















  • 1





    What are you really trying to model? Things like "persons", or things more like "claims of facts about persons"?

    – Mike Sherrill 'Cat Recall'
    Mar 24 at 16:53











  • @MikeSherrill'CatRecall' Well it's employees of an organization, really. But the main question is noy really depedent on the model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.

    – CookiePolicy
    Mar 25 at 13:16












  • My question still stands. Your proposed structure says "One or more attributes of person having id 'n' came from source having id 'm'." So your proposed structure can handle any number of sources per person, but it doesn't seem very useful.

    – Mike Sherrill 'Cat Recall'
    Mar 25 at 18:34

















0















I'm creating an application that will use at minimum two different API for data of its models. For example, I'll have an entity / model of a person. The data for this person comes at minimum two different API and more may be relevant in the future. For example, email and phonenumber may come from one data source and first name and second name from another.



How would one structure an database for this, that is flexible enough to handle adding / removing of the "data sources".



I initially though of an database structure looking like this:



[Person]
- ID
- FirstName
- LastName
- Email
- PhoneNumber



[Person_FIRST_SOURCE]
- Person_ID
- Person_FIRST_SOURCE_ID



[Person_SECOND_SOURCE]
- Person_ID
- Person_SECOND_SOURCE_ID



Which I then would be able to in the data synchronization script to look up what "Person" entity in my database, the current iterating person from the source represents. This would allow me to easily connect/add more sources as I go.



EDIT: I would like to add that it's not always that Person A exist within both sources of data.



EDIT 2: The main question is not really dependent on the "Person" model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.










share|improve this question



















  • 1





    What are you really trying to model? Things like "persons", or things more like "claims of facts about persons"?

    – Mike Sherrill 'Cat Recall'
    Mar 24 at 16:53











  • @MikeSherrill'CatRecall' Well it's employees of an organization, really. But the main question is noy really depedent on the model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.

    – CookiePolicy
    Mar 25 at 13:16












  • My question still stands. Your proposed structure says "One or more attributes of person having id 'n' came from source having id 'm'." So your proposed structure can handle any number of sources per person, but it doesn't seem very useful.

    – Mike Sherrill 'Cat Recall'
    Mar 25 at 18:34













0












0








0








I'm creating an application that will use at minimum two different API for data of its models. For example, I'll have an entity / model of a person. The data for this person comes at minimum two different API and more may be relevant in the future. For example, email and phonenumber may come from one data source and first name and second name from another.



How would one structure an database for this, that is flexible enough to handle adding / removing of the "data sources".



I initially though of an database structure looking like this:



[Person]
- ID
- FirstName
- LastName
- Email
- PhoneNumber



[Person_FIRST_SOURCE]
- Person_ID
- Person_FIRST_SOURCE_ID



[Person_SECOND_SOURCE]
- Person_ID
- Person_SECOND_SOURCE_ID



Which I then would be able to in the data synchronization script to look up what "Person" entity in my database, the current iterating person from the source represents. This would allow me to easily connect/add more sources as I go.



EDIT: I would like to add that it's not always that Person A exist within both sources of data.



EDIT 2: The main question is not really dependent on the "Person" model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.










share|improve this question
















I'm creating an application that will use at minimum two different API for data of its models. For example, I'll have an entity / model of a person. The data for this person comes at minimum two different API and more may be relevant in the future. For example, email and phonenumber may come from one data source and first name and second name from another.



How would one structure an database for this, that is flexible enough to handle adding / removing of the "data sources".



I initially though of an database structure looking like this:



[Person]
- ID
- FirstName
- LastName
- Email
- PhoneNumber



[Person_FIRST_SOURCE]
- Person_ID
- Person_FIRST_SOURCE_ID



[Person_SECOND_SOURCE]
- Person_ID
- Person_SECOND_SOURCE_ID



Which I then would be able to in the data synchronization script to look up what "Person" entity in my database, the current iterating person from the source represents. This would allow me to easily connect/add more sources as I go.



EDIT: I would like to add that it's not always that Person A exist within both sources of data.



EDIT 2: The main question is not really dependent on the "Person" model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.







mysql database






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 13:18







CookiePolicy

















asked Mar 24 at 13:13









CookiePolicyCookiePolicy

11




11







  • 1





    What are you really trying to model? Things like "persons", or things more like "claims of facts about persons"?

    – Mike Sherrill 'Cat Recall'
    Mar 24 at 16:53











  • @MikeSherrill'CatRecall' Well it's employees of an organization, really. But the main question is noy really depedent on the model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.

    – CookiePolicy
    Mar 25 at 13:16












  • My question still stands. Your proposed structure says "One or more attributes of person having id 'n' came from source having id 'm'." So your proposed structure can handle any number of sources per person, but it doesn't seem very useful.

    – Mike Sherrill 'Cat Recall'
    Mar 25 at 18:34












  • 1





    What are you really trying to model? Things like "persons", or things more like "claims of facts about persons"?

    – Mike Sherrill 'Cat Recall'
    Mar 24 at 16:53











  • @MikeSherrill'CatRecall' Well it's employees of an organization, really. But the main question is noy really depedent on the model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.

    – CookiePolicy
    Mar 25 at 13:16












  • My question still stands. Your proposed structure says "One or more attributes of person having id 'n' came from source having id 'm'." So your proposed structure can handle any number of sources per person, but it doesn't seem very useful.

    – Mike Sherrill 'Cat Recall'
    Mar 25 at 18:34







1




1





What are you really trying to model? Things like "persons", or things more like "claims of facts about persons"?

– Mike Sherrill 'Cat Recall'
Mar 24 at 16:53





What are you really trying to model? Things like "persons", or things more like "claims of facts about persons"?

– Mike Sherrill 'Cat Recall'
Mar 24 at 16:53













@MikeSherrill'CatRecall' Well it's employees of an organization, really. But the main question is noy really depedent on the model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.

– CookiePolicy
Mar 25 at 13:16






@MikeSherrill'CatRecall' Well it's employees of an organization, really. But the main question is noy really depedent on the model. This could have been any type of model; Book, School, Company etc. Just some form of model, where its data comes from multiple sources.

– CookiePolicy
Mar 25 at 13:16














My question still stands. Your proposed structure says "One or more attributes of person having id 'n' came from source having id 'm'." So your proposed structure can handle any number of sources per person, but it doesn't seem very useful.

– Mike Sherrill 'Cat Recall'
Mar 25 at 18:34





My question still stands. Your proposed structure says "One or more attributes of person having id 'n' came from source having id 'm'." So your proposed structure can handle any number of sources per person, but it doesn't seem very useful.

– Mike Sherrill 'Cat Recall'
Mar 25 at 18:34












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55324161%2fhow-to-structure-database-of-an-application-that-will-utilize-multiple-datasourc%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55324161%2fhow-to-structure-database-of-an-application-that-will-utilize-multiple-datasourc%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해