Database Analysis Tool

Hello All

I was wondering if anybody knows if there is some kind of tool out there that looks at a databases script and shows all connections to other script libs . So in a way, it shows how the database code is mapped out, where the calls are made etc… So it give me an idea of the database code layout. Thanks