Hi @apple_id7. You’re question is kind of broad in scope to give you a detailed answer for. @ksan’s blog post suggestions are good starting points, but when thinking this through, on Apple, your app restarts very rarely. Apple prefers to background your running app and resume it. You only start up if your app is killed by the the user or the phone reboots.
You are going to need some online hosting/cloud service to manage your online score database. If you choose to build your own, or even if you use something like Apple Game Center, our Corona Cloud, or something else, I would say whenever you decided to write a score to your local SQLite database you call whatever functions you need to update the live database too.