e-commerce-db icon indicating copy to clipboard operation
e-commerce-db copied to clipboard

Request: product attributes, example SQL queries

Open goodpixels opened this issue 5 years ago • 1 comments

Hi @ramortegui - many thanks for this very useful little project! It's great for noobs and it has certainly helped me out with my personal project.

However, defining data is one thing, querying for it is another. As someone not very familiar with writing complex SQL statements, it would be great if you could include a list of example queries (ranging from the simplest such as select all products from category to more complex such as a hierarchical category list and so on).

Another thing that I think is missing from the DB is product attributes, such as: colour, size, etc. These could be stored in two new tables, pretty much like tags, but with an additional name field. What do you think?

Many thanks for your wonderful work on this project, John

goodpixels avatar Sep 25 '19 20:09 goodpixels

@goodpixels Good points!. Glad you found the project useful.

Let me comment on those:

Queries:

Yes!, that is a missing part of the project:

  • Add seed data
  • Define sample queries
  • Restrictions: I'll need to check that the data work in all (or most) of the DB Engines.

Add product attributes:

The model is a generic template for web stores, and I find product attributes specific to the type of web store. E.g., Groceries, Gadgets, Wearables, etc.(Size for Groceries doesn't "apply") Saying that doesn't mean that we couldn't add it. I can explore the suggestion having same structure as the tags and categories. But I'll try to apply to different web store models and see how it looks like 😄.

I'll keep this issue open, and probably split it into two new enhancement (queries, product attributes) issues after digging a bit on it.

Thanks!

ramortegui avatar Sep 26 '19 15:09 ramortegui