Understanding `file_managed` table I am trying to understand the Drupal database schema because I need to access the database via MySQL by another system and I do not have access to the original Drupal developer of the site nor do I know Drupal well at this point (I did work with it 8 years ago) and it will be much easier to access with MySQL than to set up a server to have to host a PHP-based API or similar.

file_managed

In the file_managed table there is a field uri where the data all appears to be in the same of two formats:


public://&lt;filename&gt;, OR
public://&lt;directory&gt;/&lt;filename&gt;


My two questions related to file_managed are:


What is public:// mean here?  Does it translate to some root URL like http://example.com/files or similar?
When there is a directory in the uri, what do they represent?


UPDATE: I do not have access to the working Drupal system, I only have access to the database.
I am just going to answer your first two questions (about file_managed).  Please ask a separate questions for the second set (about file_usage) and about the relation between the tables.


  What is public:// mean here? Does it translate to some root URL like http://example.com/files or similar?


Navigate to Administration » Configuration » Media » File system. Take a look at the value for "Public file system path" (default is sites/default/files).  this is the path to public:// from your site root.


  When there is a directory in the uri, what do they represent?


The path below the public file system root.

So, given the that the public path is the default, public://foobar/image.jpg, this expands to the path sites/default/files/foobar/image.jpg, or the URL  http://example.com/sites/default/files/foobar/image.jpg