BBQ is an all-encompassing term pretty much meaning anything to do with cooking outside.
BBQ sauce is also an all-compassing term for whatever you are slathering on whatever is being cooked.
In reality - there are significant nuances to each and every BBQ sauce out there. Some are hot, some are sweet. Each one is a secret-set of ingredients and measurements. But one thing is pretty standard.
Looking at all the sauces out there, you will find the leading *liquid* ingredient will be Vinegar; cider vinegar, wine vinegar, balsamic vinegar, etc. From here, anything is possible. If you choose to make your concoction safe for consumption for up to 5 days - refrigerate it. Or add a lot of preservatives.
Vinegar is natural for killing pathogens. A little sugar in the mix will offset the hard flavor of the vinegar, hence a lot of molasses, honey, brown sugar, sucrose, ketchup, etc.
BBQ in the US originated in the Carolinas and was pork-oriented. It morphed into many different styles, with 3 main focus. Eastern North Carolina tends toward a vinegar-only based sauce with spices, tomatoes being included in sauces as you move westward. South Carolina tends to favor mustard and vinegar; relatively unique, but a good mustard honey sauce is greatly accepted and expected in many parts of the country.
As BBQ moved west and north, beef, chicken, fish and other meats or vegetables were added into the menu. Still - the prevailing base of choice is vinegar, with only the herbs and spices making much of a difference. Exotics are added to create unique BBQ sauces; common ingredients are citrus fruit, tamarind, allspice, cloves, chiles, ginger, pepper, mustard, cumin, coriander, plus molasses, honey and distilled liquor. More tomato was added to thicken the sauces in the Northern US, where less tomato and more chile was the trend in the South and Texas. The basic recipe for a BBQ sauce is Vinegar, sugar, salt, pepper, chile, and tomato. The ratios are always personal choice.
Just as in making waffles, pancakes, or cookies; mix your dry ingredients, then mix the wet ingredients, then add them together. A general rule of thumb for your spice blend, for every full cup of vinegar, you should use up to 1/4 cup of dried spices (4 tablespoons). For every 1/2 cup of vinegar, you can add up to 2 cups of a combination of tomato paste, honey, molasses, bourbon, etc. Remember that ketchup can be a good ingredient, but it already has a lot of sugar and other ingredients.
Your best tool when making a BBQ sauce is taste. If you like it - use it. When cooking - use a thermometer.
For those into the science of BBQ... I give you this link to BBQ Science at Texas A&M University.