If you get the following error:
An Error Was Encountered
Site Error: Unable to Load Site Preferences; No Preferences Found
It's most likely caused by ExpressionEngine not being able to log in to the database.
Another possibility is an empty database! This happened once when I exported a database and, by accident, only exported the schema and not the data. When the database was restored all the tables were empty and ExpressionEngine displayed this message.
It is also possible that ExpressionEngine will display this message for a database with a missing table.