[Solved] SQL Database Algorithm


Even though this question is Way too broad, and actually not asking anything, i’ll give it a few minutes of attention.

1) You backup the current state and work on a Sandbox!

2) if your only need is few reports, i guess you can generate them query the different databases independently and maybe post processing the results.
e.g. Sum ProjectsData.Totalcost as TotalCost.
note: some data will be harder to derive.

3) think of Testcases against your expected data…
then see if your Testcase reach the manually calculated entry

4) if you must Join them into One DB, then you are into a lot of trouble matching data.
4.1) Yes, you should create a new table Projects : project_id, title, ...
4.2) You should create Column project_id to almost every table in your merged DB
4.3) You should write your migration code with as many Data Validations as you can! and make your output-log worthwhile.

4.4) when finally running on production, Keep your Original DBs, your Output-log & migration scripts for years to come!

Still, i think this question should address a more specific issue in migrating your multiple databases into one.

solved SQL Database Algorithm