How does a database work?

There are two kinds of databases. RDBMS and DBMS. Anything which stores data in rows and columns can be called as a database. Even a text file can be a database if it contains data in this format. XML files also can be treated as database. We can query a database using SQL (Structured Query Language) to extract information from a database. This data can be manipulated in different ways to generate reports or use in your software.