I am a beginner and I am going to implement an android application that use Firebase but i don't not know what if I want to move all my database to another server like Amazon Web Service ? is it possible and what type of database engine can I use ?
In your Firebase dashboard, there's an export button in the upper right corner.
That will export your JSON data into a flat file, which you can then either import into another database that reads JSON data, or craft some code to massage it into a format that's compatible.
You can then use any database engine that works for you.
Please also review the comment from Kato below as there is a limit to how much can be exported from the dashboard.