you cannot delete index.php from your database.
files are stored on the server, just like they are stored on your home computer.
posts are stored within the database.
files control how posts are displayed.
which index.php did you delete?
Every theme comes with a unique index.php.
There is an index.php in the root of your WordPress folder, ie, where wp-config.php is located.
which index.php did you delete?
If you deleted a theme index.php you simply need to re-upload the index.php for the theme.
If you deleted the index.php that normally resides in the root of your WP install, then download a copy of the version of WordPress you are using, unzip it, and upload a new index.php
And I would really suggest making sure of what you have done, rather than simply “thinking” you did something, and attempting to correct. You really need to ‘know’ what you did, before attempting to undo it.