Create a table on database when app installed

i have an app , my goal is to create a table on database when app has been installed , and delete , when app is disabled , how can i do it on owncloud?

Add that into your app…

See the docs: ownCloud Documentation Overview