The four components in a database system are: the user, the database application, the database management system (DBMS) and the database. The user interacts with the database application, which interacts with the DBMS, which controls the database. The functions of the database application include creating and processing forms, creating and transmitting queries and creating and processing reports. The DBMS creates databases, tables and supporting structures, manages database data, enforces rules and provides security. The database stores the user data, the database metadata, indexes, triggers, stored procedures and application metadata.