The uploaded documents are held in the content database as blobs (binary large objects). The name of the document library (e.g. "Shared documents") is just a piece of data held along with the blob in the database.
Theoretically it would be possible to look for them in the database, but I would seriously caution against making any changes directly at database level. Let SharePoint do all that for you.