Databases, queries, functions and Procedures for school managment system