Update Database.cpp

Updating Union function to check for the type of attributes and the number of columns.