database schema and its php functions added