Supermarkets use databases which are handled by specific applications which were designed to run for such complicated things. A simple way to create a database is to use Microsoft Access because it's the most convenient and easiest database application which will allow you to enter all sort of data using some simple tools. You can also create scripts that will run based on your request and needs. Although it might sound easy at first, in fact handling .MDB database files could give you some trouble and that's why some applications to handle this data in an easy and safe way were created.