A database is just a system that organizes data. You have a set of data, perhaps some order transactions, and the database organizes those transactions based on settings you define.
In the context of ecommerce applications, data falls into two categories:
Site content is what you see when you’re browsing a storefront. It’s the data that generates the dynamic HTML pages, including:
Transactional data, on the other hand, is a result of users taking action on a page. A newly installed ecommerce application will have no transactional content. But it will, hopefully, as shoppers purchase products and as the merchant populates those products on the site.
Examples of transactional data include:
The design of your database will determine what it stores, how it’s organized, and how your application code can access it.
The main purpose to a database is to store information. Have a question about a customer order? Check the database. Want to know a product price? Check the database.
By using a database, a web application can ignore the actual data and focus more on the presentation and behavior of that data. The end result is that the amount of code and logic in the web application is much smaller and easier to understand.