So, I'm toying with this idea and when I get some free time ( lets all chuckle at that phrase ), I'm hoping to implement it as a proof of concept.
I think some re-orginzation needs to happen with the structure of Uber. Mainly, the following 3 attributes:
- Company
- Division
- Warehouse
For one, I don't believe "multi-site" and/or table-sharing is the place and/or safe for an e-commerce system. The database IS the system of records, not the application. Meaning, if I want to see how many orders I have total, I would rather query 1 database, rather than across multiple database and/or multiple tables namespaced by some arbitrary string.
If for each order we appended a company_id and division_id, we can keep ALL orders in 1 table do do some really nice reports for multiple ecommerce sites.
e.g. one.sail.com and two.sail.com could be 2 companies, or the same company and 2 divisions....all processing could be done through sail.com.
Warehouse comes into play for inventory/stock/purchase orders/etc. This just says "where is my stuff?". Some of the larger sites may have stock in diff. locations...having a warehouse_id appended to a stock item would take care of this.
Please not though that a "stock item" is different from a "product". A "product" is a lone entity descripting a product, but a stock item is the item in stock in hand. Think of it as a Product = Class (description of the object), and a Stock Item = Object (instance of the class).
I think a setup like this can/would have far reaching effects. Just posting this here as a request for comments.
- Earnest
