I am working on integrating affiliate sales into few existing sites. We are using a few merchants who work via different networks (cj, shareasale, linkshare, Amazon).
Now my observation is that all these networks provide data feeds in different formats. But that's not a big problem. My main concern is actually merchants using different titles on same products. I don't want to run into these situations:
1) two listings of the SAME product from N merchants (if titles are just a bit different)
2) one listing of N different products from merchants (if we don't use strict comparison algorithm)
We want to automate everything as much as possible, want to avoid operators scanning listings under question all the time.
How is this problem typically handled?
I believe a common solution here is to use some universal identifier (UPC code, ISBN code for books, etc). If you can't do that, it becomes a difficult problem, and you probably won't get it 100% right. This may be a silly (and expensive) idea, but perhaps consider using Amazon Mechanical Turk API to have people do it for you (at least the difficult cases which your algorithm can't get right).
All affiliate network feeds have one thing in common: they all list products by a SKU / MPN number that is unique for that product, regardless of affiliate network or distribution channel. That's your unique identifier to key off of when matching different product catalogs across networks.
Related
The assets entity in Moqui has an associated asset field. But, we have a use case where multiple assets need to be associated with an asset.
For example, a tool(manufacturing equipment) may be used only in specified machine(manufacturing equipment). We are exploring the option to create an join entity.
Are we deviating from the best practices of framework?
Added to answer the comment from David E Jones
Business Requirement
There is a custom tool designed to manufacture a component.
This tool is technically compatible with wide range of machines in operation.
The operating cost of machines in question vary in a very wide band. So, the tool should be used only on specific machines to keep the overall cost of manufactured component within a specified band.
So, for a given tool, we intend to assign the allowed machine(s) and use only assigned machines for manufacturing.
As David remarked it is difficult to design for business requirements without detail and context, and there is relatively little to go on here.
I guess the tooling that might be set up on a particular machine could comprise a large range, related to the range of component specifications of orders for a component that might come in.
The main process to be designed here I guess would be to choose the most economically optimum machine to set up with the tooling for a particular order, and that would always vary depending on the other orders ongoing or scheduled, and the machines those orders were assigned to.
Back to your query with the above in mind, if you are defining particular toolings or tools as assets, it might comprise an approach to look at defining the assetTypeEnumId as 'tooling' or similar, and use the classEnumId across the asset types of machines and toolings to stipulate the maximum economic level of machine that the tool should be used with, etc.
Alternatively, or in addition, it might be useful to look at the AssetStandardCost entity and into setting up some enums for assetStandardCostTypeEnumId.
It would seem to me on the surface that the approach of trying to directly associate multiple toolings to multiple machines (with a range of constraints in addition) would quickly lead to exponential possibilities.
All in all, my experience would be that if you look into the existing entities they will typically suggest a variety of approaches, and later on when further requirements arise you may be glad you used what was existing rather than try and do something new.
Business requirements are difficult to design for without detail and context, but it sounds like what you really want to model is not at the Asset level but at the Product level. For asset type products the Product and related entities (like ProductAssoc) are used to define characteristics of physical items, Asset records represent the actual physical items.
One example of this is the maintenance side of things. The maintenance schedule is part of the Product definition (applicable to all assets for that product) and the maintenance history is part of the Asset side of things (applicable only to specific physical items).
As I have looked all over for an answer to my question and found nothing of use, I can only assume a) I can't use Google b) I'm the only one stupid enough to not know the answer off my own back.... So would be greatful for any advice or support on this.
Basically I'm setting up a basic e-commerce site. I have the standard products, customers, orders, orderdetails, addresses, and cart tables in place.
What I'm struggling to envisage is how to incorporate cataloguing into my design. There will be hundreds of products and downs of account but not all the products will be available to each account/customer. One customer may only have 4 products in their catalogue to choose from but another may have 50. Would merely creating a seperate catalogue for each customer (CatalogueID against Account ID), at the risk of repeating data, be my only answer?
Hope this makes sense.
Cheers.
I have to design a database for an advert site.
Until now this is the design i came up with:
Administrator(Id,Name,Password)
Advert(Advert_Id,Title,Description,Category,User,Date_created,Picture,Type)
User(User_Id, Name ,Phone,email,Address)
Category(Cat_id,Cat_Name)
Type(Id,Type_Name)
Picture(Picture_Id,Name)
The administrator refers to to the person that will manage the site.
The type refers to the type of the advert: selling, buying etc.
I must have minimum 5 tables at least 2 one to many relationships and at least one many to many relationship. The problem is that I can't find a many to many relationship that would make sense.
If an advertisement can have more than one category, then advertisements and category would be many to many.
If an ad can have more than one picture and a picture can be used in more than one ad, ads and pictures would be many to many.
However, you have to know the business rules. None of us will.
Like Dan mentioned on the answer, you have to know the Business Rules. It's a project for a class, so the business rules might be flexible, I remember back in college, for example, they would tell us that if a client wanted to have advertisement be of at least one category, but could have up to 3 or 4 different categories, that changes your DB structure a lot.
An advertisement can also have many pictures, not just one. It can even have some videos, and many of them as well. Make sure you clarify well the Business Rules and that you understand them fully, as in a real life situation, that can represent either the success of your project or the failure of it.
I'm developing an e-commerce site and I'm facing a problem. The requirement I need to fulfill is: given a certain string like "lock", "tennis", "cinema" or "scaffold" entered by an user, I should display both profiles and product postings matching that query.
That leads me to these conclusions:
a) I should classify profiles (what they do): maybe some sort of "business category". I face a problem here, it's almost impossible to create a list that covers all the business activities in the world, so I've been reading some good questions here and liked the strategy of creating a 1 or 2 level hierarchy and then capture the user feedback automatically through reusable tags.
The idea here is to keep the keywords that are more likely to be thought of and so with best odds of being searched for.
By the way, is there a really good business category list out there that I'm missing?
b) I should classify products and services (what they offer): with a similar approach, I liked using some fixed categories and then let users use persistent tags. I ask you again if there is a category list out there that really rocks.
Questions:
1) Do you like what I've just described? Based on your experiences do you think it might work or will I drown in a tag sea?
2) Sometimes both product and business hierarchies are kind of redundant. There are some people that describe their businesses like "theater", "bank", "dentist" and that's not a product or service but rather what they actually are. But there are plenty of cases where people say "(sale/manufacturing) cars", "(manufacturing) pottery", and so on. Their business activity is chiefly determined by the product or service they're selling or producing. What's your take on this?
I did something like this is ror_ecommerce. I used a tree for product_types.
So you could sell:
Furniture => Livingroom => Chairs
Filtering by Livingroom would also give items that have a product_type pointing to Chairs.
To make it more complex I would first fight the business person.
Second I would create a model where product has many product_types. Thus you need a join table between product_type and product.
Answer to your question:
1) You will probably drown because categories are infinite. Limit the number of tags or make an admin interface that your business people can populate. If not your business folks will request you to do this work over and over again.
2) It sounds like Your tree would look like this:
sale/manufacturing => cars
sale/manufacturing => pottery
bank => personal
bank => business
thus if someone just wants a bank they get results for personal and business. but they can further refine the search to just personal banking.
It also sounds like the business and product hierarchies are completely redundant. I would really fight a business guy saying anything else because a future requirement will be to relate business and personal hierarchies. If they are the same it will be easy. You might want a type flag on the list for personal / business / both. it will be a lot easier to remove the flag if it's not needed.
Good Luck
Apologies for the less than ideal title; had a hard time coming up with something.
Three entities: Products, Clients and Client_Product_Authorization.
A Client has access to many Products.
A Product is accessed by many Clients.
A Client_Product_Authorization authorizes a Client to access a Product.
We have 100,000+ Products (virtual goods) and managing Client_Product_Authorizations becomes a very labor intensive task. So we have Products that is a container of other Products. Example:
Product X is a container for Products 1 through 2000.
So, by creating a Client_Product_Authorization granting a Client the Product X, we are indirectly providing for the client to access products 1 through 2000. Mind that product 1 might be contained in different container products (so, yes, it is a many-to-many self relationship).
Here is the entity level data model:
The advantage of this mechanism is that we can just change the composition of Product X (adding or removing other products) and it automatically adjusts the product list available to the clients authorized to Product X. Managing awarding access to our large product-base is a matter of selecting a few container products.
The disadvantage is that it now became harder (in terms of creating a SQL statement, because of the many-to-many self-relationship) to know what the Client is actually authorized to see (as in the individual non-container products). As in:
Product Z is a container for Product X and Product Y
Product X is a container for Products 1 through 2000
Product Y is a container for Products 2001 through 5000
What are the actual non-container products a client authorized to Product Z can see?
Products 1 through 2000 and 2001 through 5000.
I would like to make the list of non-container products a client is authorized for to be materialized in some way. So that questions like:
Should Client ABC be allowed to see Product 78?
OR
What products is Client ABC authorized to see?
can be easily responded with a query.
The goal is to make the job of software trying to determine the list of products accessible to a client a simple mechanism, instead of requiring a traversal through all container products, their sub-container products, etc etc etc.
Three questions:
a) Is there a better data-model for this scenario?
b) Is there a different mechanism to simplify the management of access authorization for this large set of products?
c) How would you go about making the obtention of the list of non-container products available to a client as simple as possible?
I appreciate the collective's input. Thanks in advance!
Update: Limiting the number of nested products is not an option for business reasons.
Since you're using SQL 2005 you should have access to common table expressions (CTEs) which makes the recursion of finding the children of a product much easier. You might want to look into CTEs and see if that's sufficient for what you're doing.
Also, I don't recall this specific scenario and my copy of the book is at home, but Joe Celko wrote a very good book on modeling hierarchies and trees in an RDBMS. It's probably worth looking into to see if there is a better model for this. He had a few rather ingenious ones for other scenarios that didn't seem obvious at first, but which are very efficient. Even if there isn't a direct match, some of the techniques which he uses might be useful.
The model which you have is what's referred to as the adjacency list model. Celko also shows how to model hierarchies using what are called the nested set model and the path enumeration model.
The nested set model may seem a little complicated at first, but it's actually simple in a way. It's more expensive for updating, but selects from it are VERY fast compared to just about any other way to model hierarchies. You can find an abbreviated description of it here. Since a product can be contained in multiple trees you would have to adapt it slightly for your case.
The path enumeration model basically just uses a delimited (or XML) string to list out the path to the row in question, starting at the root of the tree. You then use string (or XQuery) functions to find children of a parent, etc. As far as I know, it's only really useful for trees, which have a single root, so I don't think that you could use it in your case.
From a purely relational perspective (and my own personal perspective), what you have is the most logical means of representation. The downside, of course, is that SQL isn't terribly well-suited for recursion. There are other paradigms out there for storing tree structures (this is a long-standing issue in RDBMS discussions), but I won't get into them because I generally feel like they sacrifice readability and maintainability in favor of ease of querying. That may be what you need, but I don't know.
Since you're running 2005, you can do recursion pretty easily with common table expressions (CTE's; see this MSDN article). Otherwise, you either have to turn it into a multi-step procedure (a stored procedure is probably a good candidate, since you can hide the implementation complexity from the calling code) or limit the number of levels you're willing to look (ie, products can only be nested 3 levels deep) by adding left joins for each level.