Add sql and tables folders in media.xml
Use JTable to follow MVC model.