In the database, each record has a bunch of fields, like the columns in a table, for information such as the product name, price, manufacturer, description, and image. Like a shoe box full of index cards, the database keeps track of all the information on the store's inventory, but because the database is electronic, it can look through all those records very quickly and come back to you with an onscreen report showing all the records that contain whatever word you typed into the search box. Most people couldn't care less what lies behind the search box. But if you personally are curious about the way these work, consider three kinds of database, which run the vast majority of these searches. The small sites may have what's called a flat-file database , which is like your address book.
Every record has the same slots to fill in, like a form.
There is only one file, and, usually, that file does not contain many records. Bigger sites use a relational database , which has different tables for different information. So there's a table for product descriptions, and another for the manufacturers' addresses. The information from each table is put together on the fly and served up to you on the screen as a single page, or part of a page. The advantage to the company is that they have to update information such as the company address only once, because it lives in only one table.