Declare that they exist. It's not enough to have files, you must also have code that says to use each file.
Refer to module's path, and optionally make a shorter alias with use
The first is in main.rs:
mod db;
mod index;
and then in each module declare their submodules. mod behaves same as fn/struct/enum - it creates a new item with that name, in the parent module where you invoke it.
And then crate::db will refer to your db module. use crate::db allows you to refer to just db in the scope of the use.