Vending Database (1 Viewer)

Vending Guy

New member
Local time
Today, 00:35
Joined
Aug 17, 2018
Messages
5
Hi

I fill vending machine for a living and I'm trying to create a database to make my working day easyier. Every snack machine has different products and different amount of product depending on size.
I want to create a database where I can select a customer and a form will display products in that machine with a empty box to enter the amount of stock required to fill machine.
I understand I need a customer table, a stock table and maybe a planogram table or machine layout table and probably a table for sold stock.
I would appreciate it if anybody could advise on how I would structure this kind of database.
Many thanks for any advise.
 

Minty

AWF VIP
Local time
Today, 00:35
Joined
Jul 26, 2013
Messages
10,366
Lots of questions, and if the answer is maybe in the future to some of these, then the design should try and accommodate it now rather than later.

Customers - Do Customers have more than one site ?
Sites - Can a site have more than one machine ?
Machines - Do you have different types of machine that can hold different amounts of products ?
Products - Do you need to store usage per machine for planning purposes?
Product Pricing - Do you need to store historic pricing for reporting / planning purposes?
 

Vending Guy

New member
Local time
Today, 00:35
Joined
Aug 17, 2018
Messages
5
Hi Minty
Thank you for speedy response.
1,Customers-Yes customers do have more than one site.
2. Sites- Yes sites can have several machines.
3. Machines-Yes different types of machine hold different amounts of Iteams.
4. Products- Yes it would be userful to store usage for purchasing and seeing trends (Best sellers).
5. Product Pricing- Storing historic pricing would be nice but not essential.


Thanks agian for your advise.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:35
Joined
Feb 19, 2013
Messages
16,607
you may also want information about where the customer is geographically - so you can plan your daily route effectively, or whether your contract with the customer stipulates time/day of refill visits. These may be things you know at the moment because of relatively small numbers, but that will (hopefully for you) uncrease over time.

Perhaps also who owns the machines? the customer? yourself or a third party?

And invoicing?
 

Minty

AWF VIP
Local time
Today, 00:35
Joined
Jul 26, 2013
Messages
10,366
So you have your basic tables. (I'm doing this without the aid of pencil or safety net so may miss something....)

Customers, CustomerSites, MachineTypes, Products
You'll need some tables to "join" those together.

So I would think you would need SiteMachines as junction table to store the machine type against the site it was on.

I don't think there is any mileage in trying to store possible Products by machine type, (but you know your business model better than me) but definitely by Specific machine so you would need SiteMachProductsto store those. This may include a maximum stock of that product in that machine figure. This would allow you calculate re-stocking based on sales.

You would also store the amount of product sold per machine, so ProductSales would take the ID from SiteMachProducts and add a date, Qty and maybe the sales price for that date.

Does that give you a starting position?

If you think it's worth trying to set up a machine type/possible contains product table you can add that into the mix, and that could also store the maximum qty in that machine type. I think this depends on the volumes of machine types and products you are talking about. It might be a massive matrix that isn't worth the effort of maintaining. You would know if this is sensible.

And As CJ has pointed out - another section related to Invoicing ?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 00:35
Joined
Jul 9, 2003
Messages
16,271
5. Product Pricing- Storing historic pricing would be nice but not essential.

I agree that this is not essential regarding historic pricing. However if you reverse the idea, you can build automatic pricing updates into your application. Now you get historic pricing, and the real benefit, prices are applied automatically on the day of the price increase.

However it's by no means essential, most businesses apply a standard percentage increase across the whole range of products, or more likely, over separate groupings of products. In other words, the price increase is just a simple update query, or a set of simple update queries.

Some businesses have an extensive range of products from a wide range of suppliers. These suppliers will have different price increases at different times in the year and possibly several price increases a year. In this situation then it makes a lot of sense to have the ability to add price increases beforehand which come into effect automatically. And again, the added benefit of a history of prices built into the database.

Imagine the situation, price updates are due on the database, you are called in to do this over a weekend! On the one hand once a year, and applying a simple update query. On the other hand, extensive list of updates at various percentages, across many groups products/suppliers... and several weekends a year at the office!
 
Last edited:

Vending Guy

New member
Local time
Today, 00:35
Joined
Aug 17, 2018
Messages
5
Hi to everyone,
Thank you for your time and advice, given me plenty to think about, to hopefully get my project up and running

Vending Guy
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 18:35
Joined
Feb 28, 2001
Messages
27,138
Question for clarification:

a form will display products in that machine with a empty box to enter the amount of stock required to fill machine.

Is this where you would indicate how many you HAD to put into the machine? Like, in slot C8, currently containing Mr. Goodbar, on this date, I had to refill with 10 units. So in other words, an after-visit fill-in-the-blank item? And the info you get gives you history that might lead to more efficient product re-ordering, but CERTAINLY helps you with knowing how much you should have seen in income from the machine for that date?

Just asking for clarification of intent, not that there is anything wrong at all with the idea. If we understand your intent better, we can advise you better.

I gather that you are in the early stages of trying to put this together. This is a CRUCIAL time in your project because a good or bad design will make or break the usefulness of this database. So NOW is the time to be ultra careful. Not as in "so careful as to be frozen for fear of error" but just "careful enough to spend some time thinking about each choice."

You have gotten some concepts that are helpful and on point. I will not try to confuse you with more specific design ideas. Instead, I'm going to give you some analysis tips for this stage of your product.

You are in essence building a "model" of business, for which Access will help you build the tracking tool for that business model. Just remember that YOU are the subject-matter expert for your business. Access is the subject-matter expert ONLY for the narrow topic of building database components and fitting them together.

Your "model" will contain things that you track. Some of them will be physical, like the machines you manage or the product you load to the machine or the physical site location for each machine. There will be more items than this, but what I listed is enough for this concept: Each class of item = machine, product unit, physical site - is a business entity. Each entity should have its own table, where all entities of the same type are listed. Then you can establish the relationships among entities. Like "product" goes into "machines" and "machines" reside at "sites" and "customers" own "sites."

You can have abstract entities such as "visits" that have dates and sites. You can have abstract entities like "invoices" listing product units loaded to a machine on a particular visit. It is up to you as to what and how you track this.

In order to do this right, you need to do some reading. I'll name some topics. When looking over the other suggestions, take some of these ideas with you:

- Database Normalization - a way to assure the "purity" of your tables so that when you have to make comparisons, it is always "apples" to "apples"

- Relationships - in the database sense of the word, a description of HOW two entities relate to each other. Here is where you have dependent or independent entities.

- Junction Tables - a database term for a common way to implement something called a many-to-many relationship.

You can use a web search on those terms, or you can use the SEARCH function of this forum, which is third from the right in the thin blue menu-item ribbon near the top of each page.

NOTE: If you search the forum, you don't need to specify "database normalization" but if you search the web, you need to qualify it. "Normalization" in general can include political, mathematical, database, and several other topics.
 

Vending Guy

New member
Local time
Today, 00:35
Joined
Aug 17, 2018
Messages
5
Hi The_Doc_Man,

At present I use an excel spreadsheet to log required stock ("Mr. Goodbar") that I put in machines, but thought it would be nice to create a database to log stock and give me much more info such as, show best sellers, create stock orders and see trends. Not really sure how far it could go. Mainly because I would enjoy the challenge and learning something new. Yes I can buy software that would take care of everything in this area, but where would the satisfaction be in that one.
I had never had anything to do with database a month ago and have been going through a huge learning curve. I am, at very early planning stage with this project and where it ends up depends on my ability to learn Access.
Thanks for your advice and guidance which is very much appreciated, I will research the areas you've highlighted a little more so I get the design right.
Regards
Vending Guy
 

Users who are viewing this thread

Top Bottom