eCommerce Product Database Design: Step-By-Step

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • 📝 Bonus PDF: This ERD, descriptions of each table and column with sample data, and SQL scripts to create all of the tables on your own database: www.databasestar.com/dbdesign...
    🎓 Learn how to design an effective database and create it using SQL: databasestar.mykajabi.com/edd...
    In an eCommerce database, one of the most complex parts is how to design for products and product attributes.
    In this video, you'll see a real-world eCommerce website or online store, and watch as we design a database from scratch.
    You'll also see the SQL that can be used to create the tables, add the data from the website so you see what the data looks like, and how to make changes as our understanding of the website changes.
    ⏱ TIMESTAMPS:
    00:00 - Our website
    02:06 - Category of products
    03:57 - A single product
    10:28 - More product details
    19:16 - View another product
    21:47 - Nested categories
    24:27 - Product filters and attributes
  • Věda a technologie

Komentáře • 98

  • @ymadhurireddy
    @ymadhurireddy Před 5 měsíci +4

    This is one of the videos to Design a Database. Appreciate your time to make this video.

  • @varunkapadiya6863
    @varunkapadiya6863 Před 5 měsíci +3

    this is the best video I have seen before. thanks a lot !!!!

    • @DatabaseStar
      @DatabaseStar  Před 5 měsíci +1

      Wow thanks! I’m glad you like it.

  • @JimRohn-u8c
    @JimRohn-u8c Před 5 měsíci +2

    This amazing! Please keep making more!

  • @hammam92
    @hammam92 Před 4 měsíci +1

    Thank you so much. I am building the erd diagram for my own business and this helped me a lot. I appreciate your videos bro

  • @triplestrafe
    @triplestrafe Před 5 měsíci

    appreciate this comprehensive video!

  • @jsnow07grad
    @jsnow07grad Před 5 měsíci

    This is so helpful! Thank you!

  • @Lykkos29
    @Lykkos29 Před 5 měsíci +2

    this is top content!! thanks a lot!!

  • @Kaffeejunk1e
    @Kaffeejunk1e Před 3 měsíci +1

    wow. i just started learning sql. i watched some videos for mysql, mariadb, postgresql etc. with the basics how to create and fill tables with content. but in none of the videos there was any similar way of working with workbench like you did. this was VERY helpful for me and should be a key video for everyone learning sql and db design.

  • @Kevin-kh7xv
    @Kevin-kh7xv Před 18 dny +2

    Thank you so much for the attention to detail in making these practical videos. They were really great resources for me to learn/review key concepts during my job search, which I was fortunate enough to land!
    Is there a way for your viewers to support your work monetarily so you can continue to make these videos?

    • @DatabaseStar
      @DatabaseStar  Před 17 dny +1

      Thanks Kevin, glad you like it! Glad to hear they have helped you get a job!
      Yes, I do offer paid courses on SQL and database design, which are available here: www.databasestar.com/course-list/

  • @joel-rg8xm
    @joel-rg8xm Před 5 měsíci +1

    Thank you, very useful to me.

  • @mrbartuss1
    @mrbartuss1 Před 5 měsíci +1

    Great to see how it actually works in a real world

  • @VenewebTV
    @VenewebTV Před 4 měsíci +1

    Excelent video, regards from Caracas, Venezuela

  • @mannycalavera121
    @mannycalavera121 Před 5 měsíci

    So much high quality information

  • @DucHuu03
    @DucHuu03 Před 4 měsíci +1

    This is so amazing

  • @wassimyazbekk
    @wassimyazbekk Před 5 měsíci +1

    Thank you so much

  • @houseofmalik9944
    @houseofmalik9944 Před 5 měsíci +2

    Thanks for this great content! I was getting really confused with so many product attributes but you make it seem easy. I'll practice a little to fully understand and hopefully convert the database design to hibernate

  • @bilkisuismail6096
    @bilkisuismail6096 Před 5 měsíci

    Thank you

  • @AmarjargalB
    @AmarjargalB Před 17 dny

    I want you say Thank you. 🙏🙏🙏

  • @IamDoQtorNo
    @IamDoQtorNo Před 4 měsíci

    Thanks alot for this. I am working on mine and this is just what I needed to get it going in the right direction. A couple of questions: what are your thoughts about using visio as a diagram design layout mechanism.? question number 2: I am considering setting up a test web server on a separate metal box different from my sql box. Is there a way to have my webserver to connect to the sql server for the data storage etc or should i put them on one machine?

    • @DatabaseStar
      @DatabaseStar  Před 4 měsíci

      Thanks, I'm glad you like it!
      1 - Visio is a good tool for database design. It's been around a while too. I often don't use it as the places I work don't have a license for it (and I don't use it at home), but I have used it in hte past.
      2 - I think this would be possible, but the details are outside of my area of expertise. I assume you would have to allow connections on certain ports.

  • @Spkntei
    @Spkntei Před 5 měsíci

    thanks bro

  • @VeeWebCode
    @VeeWebCode Před 5 měsíci

    I love you. you are the best.

  • @fresonn
    @fresonn Před 4 měsíci

    Thanks for the video, very informative!
    In the context of this diagram:
    - how can I differentiate which product colors are available and which are sold out and display this
    - the same with dimensions. What sizes are currently available and which ones are not?

    • @DatabaseStar
      @DatabaseStar  Před 4 měsíci

      You can relate the product_variation table (which has the qty_in_stock column) to the product_item and then the colour_table (which has the references of colours) to see which items are in stock.

    • @fresonn
      @fresonn Před 4 měsíci

      @@DatabaseStar won't the new relation be redundant?
      SELECT
      s.size_name,
      pv.amount > 0 as in_stock
      FROM product_variation pv
      INNER JOIN product_item pi ON pi.product_item_id = pv.product_item_id
      INNER JOIN size_option s ON pv.size_id = s.size_id
      WHERE pv.product_item_id = 1;
      I only have this idea for now

  • @pedrogermano15
    @pedrogermano15 Před 3 měsíci

    Congrats, great video! I would love if you teach us how to design a digital wallet database!

    • @DatabaseStar
      @DatabaseStar  Před 3 měsíci +1

      Thanks! Sure, what do you mean by a digital wallet database?

    • @pedrogermano15
      @pedrogermano15 Před 3 měsíci

      @@DatabaseStar like PayPal or Wise! Demonstrating how can you design a database that requires transactions using money on balance, credit card and stuff like that

  • @codingcambodia
    @codingcambodia Před 9 dny

    Thanks for the great video. Hopefully , you will create a eCommerce database design that has multi vendors like amazon or alibaba

  • @YT-cd2vi
    @YT-cd2vi Před 4 měsíci

    Thanks, I am building the Product Data Model in Data Vault 2.0, and struggling to get the concept to be implemented in DV format. Any pointers help will be really helpful.

    • @DatabaseStar
      @DatabaseStar  Před 4 měsíci

      No problem! I don't actually have any experience with Data Vault so I can't be of much help, but I hope the concepts of normalisation would still apply.

    • @YT-cd2vi
      @YT-cd2vi Před 4 měsíci

      @@DatabaseStar No worries, thanks for the response. Will keep trying.

  • @aminem2080
    @aminem2080 Před měsícem

    very understandable 💯
    but i think using that EAV approach it will not fit when your products are linked variations like "BLACK color SM size SILK fabric..." like that first approach would work, could it cause u can retrieve one buy one no way to linked them to be select as one choice while being a combination of different features

    • @DatabaseStar
      @DatabaseStar  Před měsícem +1

      I think I understand your concern, but I think the query would be OK. You can get all of the product variations in one query and their variations, and display them on the page as needed.

  • @PhyoKo-kd4ks
    @PhyoKo-kd4ks Před 2 měsíci

    What use application for database design

  • @juamurasaki7311
    @juamurasaki7311 Před 2 měsíci

    excuse me, i am newbie, i want to ask the code from the video is can use on dbvear or MySQL workbench? i still difficult to used them. i am happy if you englightmen

    • @DatabaseStar
      @DatabaseStar  Před 2 měsíci

      You can use it in any editor in SQL. You may need to make some minor adjustments for each database, such as data types, but it should work.

  • @huynguyenluonggia6393
    @huynguyenluonggia6393 Před 2 měsíci

    how i insert image for productItem, example, has 5 size and 5 color -> has 25 product item???

    • @DatabaseStar
      @DatabaseStar  Před 2 měsíci

      You can insert separate rows for each option.

  • @Kashmiriboy.
    @Kashmiriboy. Před měsícem

    Sir it is possible to include product category as an attribute of product ?

    • @DatabaseStar
      @DatabaseStar  Před měsícem

      Yes, you can join to the category table for this.

  • @AmirMufid
    @AmirMufid Před 3 měsíci

    what name software for create database design like this video?

  • @tanvu3956
    @tanvu3956 Před 4 měsíci

    Thanks a lot! Can I have diagram and script. Thanks

    • @DatabaseStar
      @DatabaseStar  Před 4 měsíci

      Sure! You can get them at the link here, which is also in the description: www.databasestar.com/dbdesign/

  • @djtoon8412
    @djtoon8412 Před 3 měsíci

    can we use jsonb fields as alternative EAV

    • @DatabaseStar
      @DatabaseStar  Před 3 měsíci

      Yes you can, it has a similar kind of flexibility.

    • @matsberg1568
      @matsberg1568 Před 3 měsíci

      I am currently implementing a jsonb field for a project im working on. Remember, querying such a field comes with its own downsides

  • @emesaiYT
    @emesaiYT Před 2 měsíci

    how if some product dont have size ?
    is the size_id on product will be null ?

    • @DatabaseStar
      @DatabaseStar  Před 2 měsíci +1

      It could be null, or you could have a Size value of "not applicable" and relate that.

    • @emesaiYT
      @emesaiYT Před měsícem

      @@DatabaseStar okay thanks

  • @purushottamkute7485
    @purushottamkute7485 Před 5 měsíci

    Can you make a similar video for a movie ticket booking application

  • @user-li3sw9pn7n
    @user-li3sw9pn7n Před 2 měsíci

    Where can I find the SQL code for this database?

    • @DatabaseStar
      @DatabaseStar  Před 2 měsíci

      You can find it in the link in the description, which is here: www.databasestar.com/dbdesign/

  • @X4Xubi
    @X4Xubi Před měsícem

    Brother the script U provided in Ur GitHub repository has possible errors, I ran it in MySQL workbench but it failed saying "Error Code: 1824. Failed to open the referenced table 'attribute_type' ". Can U plx fix this ASAP as I have to practice queries on some meaningful data. Plx provide the correct script to create this database or guide me if I made a mistake.

    • @DatabaseStar
      @DatabaseStar  Před měsícem

      Hi Xubi, as mentioned over email, the script has not been updated. The issue was caused by the tables not being created in the correct order.

  • @abo8esabo8es52
    @abo8esabo8es52 Před 5 měsíci

    Can you please make a practical video like this for w3school

    • @DatabaseStar
      @DatabaseStar  Před 5 měsíci

      Sure, what do you mean "for w3school"? Like, view their website and create a database design for it? If so, w3school seems to be a simple blog, is that what you're looking for?

    • @abo8esabo8es52
      @abo8esabo8es52 Před 5 měsíci

      @@DatabaseStar yes and we add more feature

  • @gc5035
    @gc5035 Před 5 měsíci

    Please design how to design permission based system there are mutiple actors .each actor has some permission

  • @mac.ignacio
    @mac.ignacio Před 5 měsíci

    Confirmation link not working.

    • @DatabaseStar
      @DatabaseStar  Před 5 měsíci

      Which confirmation like is this? Is it the one in the email that I send to you?

  • @psmontte
    @psmontte Před 3 měsíci

    Where is the direct link to Schema?

  • @Sedhu_17
    @Sedhu_17 Před 4 měsíci

    why we remove gender table

    • @DatabaseStar
      @DatabaseStar  Před 4 měsíci +1

      It's because we can represent the gender as a category in the category table.

  • @JosephineFahy
    @JosephineFahy Před 5 měsíci

    You sound like a Kiwi! 😄

    • @DatabaseStar
      @DatabaseStar  Před 5 měsíci

      Haha yeah the New Zealand and Australian accents are similar!

  • @basketballskills-ur7lc
    @basketballskills-ur7lc Před 2 měsíci +1

    Lets connect