For the Company database suppose the company merges with ano

For the Company database, suppose the company merges with another company (call this company B), and now the data is to be merged. It turns out that most of the data from B is compatible with the existing database, except for the employee data, which has surprisingly different attributes. Someone suggests that this be handled by adding an Employee B table to store those employee records instead of merging the two tables together. If you like this idea, explain an advantage it has. If you dislike the idea, explain a disadvantage it has. One reason is enough.

Solution

This question is little bit hypothetical. Because keeping data as single table or use seperate tables , both approches have advantages and disadvantages. Here the data is one-to-many (each user has thousands of rows of usage info), then it should be split into separate tables is better design approach.

Advantages of multiple tables

1)Keeping separate tables to reduces duplication of data since duplicate data wastes storage space, cache space, and makes the database harder to maintain.

Disadvantages of multiple tables

1)We need to add foreign key to one table and Accessing needs complex queries based on foreign keys that may be slow.

Disadvantages of single table.

1)Some databases have a limit on the number of columns per table. In such cases adding new attributes and merging will get difficult.

Also the employee data have additional data, which have different attributes. So While merging we have to decide to keep these attributes or remove it. Keeping attributes may be useful for future data retrivals. These attributes values of existing EmployeeA table may be null after merging. So we need to manage these null problems too.

So Keeping seperate tables will be better. Quering may be little bit complex but can reduce redundency and other future error problems.

 For the Company database, suppose the company merges with another company (call this company B), and now the data is to be merged. It turns out that most of th

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site