Have any scenarios that lose data in local realm database?
No, not unless you delete an app or wipe all of it's data, or if you're using an in memory Realm.
How long the database exists in local device?
A realm database is stored as a file in your app packages "files" directory. It will be there as long as your app stays installed on that device.
Check out this section of the docs for more info https://realm.io/docs/java/latest/#realms