Connect data twice, once for database tables and then for the flat file. The Data->Edit Relationships
Give a Join condition on the common column from DB tables to the flat file