When you upload any media. you are actually creating a new post, with type, attachment
, so you permalink is stored in exactly the same way as a normal post, in the table.. YOU_PREFIX_posts
. It is also stored with its own meta_data, again same as normal post type, stored in YOUR_PREFIX_postmeta
.