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: https://doc.owncloud.org/server/latest/developer_manual/app/schema.html