eCommerce Product Database Design: Step-By-Step

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 141

  • @DatabaseStar
    @DatabaseStar  2 месяца назад

    Want to improve your database design skills? Get my Database Design project Guides here (diagrams, explanations, and SQL scripts): databasestar.mykajabi.com/lpkj-dbdesign/?

  • @ymadhurireddy
    @ymadhurireddy 11 месяцев назад +12

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

  • @Kaffeejunk1e
    @Kaffeejunk1e 9 месяцев назад +5

    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.

  • @varunkapadiya6863
    @varunkapadiya6863 11 месяцев назад +4

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

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад +1

      Wow thanks! I’m glad you like it.

  • @hammam92
    @hammam92 10 месяцев назад +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

  • @hoangthypham6976
    @hoangthypham6976 4 месяца назад +1

    Thanks for your video I have a RDBMS final test at this week and tbh, i was so confused abt everything i've learned in my class. You help me a lots.

    • @DatabaseStar
      @DatabaseStar  4 месяца назад

      You're welcome, glad it helped!

  • @mrbartuss1
    @mrbartuss1 11 месяцев назад +1

    Great to see how it actually works in a real world

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад +1

      Glad you found this format useful!

  • @JimRohn-u8c
    @JimRohn-u8c 11 месяцев назад +2

    This amazing! Please keep making more!

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      Thanks, I will make more like this!

  • @Kevin-kh7xv
    @Kevin-kh7xv 7 месяцев назад +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  6 месяцев назад +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/

  • @SergiiBoiko
    @SergiiBoiko 6 месяцев назад +1

    This is the best video I have seen before!

    • @DatabaseStar
      @DatabaseStar  6 месяцев назад

      Thanks! I’m glad you liked it.

  • @johnnychin9598
    @johnnychin9598 4 месяца назад

    Oh my God , this tutorial is GODLIKE. Your the best sir. Thank thank a milliooooonn thank you very muchhhhhhh.

    • @DatabaseStar
      @DatabaseStar  4 месяца назад

      Wow thanks a lot, I’m glad you liked the tutorial!

  • @houseofmalik9944
    @houseofmalik9944 11 месяцев назад +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

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      Thanks, I'm glad it helped!

  • @vishalpoddar
    @vishalpoddar 5 месяцев назад +2

    How do we handle multiple kinds of product variation.17:29 Example: In the above example the product_variation table captures the variation in size , but what if we also had to capture the variation in colour as well i.e. suppose product_code should have remained same for all the size and colour combination. Should we have then moved the colour_id too to the product variation table? Then I think we would have qty for the combination of size and colour.. Also in that case I think the product variation table would not have been necessary. Thanks

    • @DatabaseStar
      @DatabaseStar  5 месяцев назад

      Good question, yes if that was the scenario then I believe the product variation would not be needed, and capturing the qty for the combination of size and colour could work.

  • @Lykkos-321
    @Lykkos-321 11 месяцев назад +2

    this is top content!! thanks a lot!!

  • @VenewebTV
    @VenewebTV 11 месяцев назад +1

    Excelent video, regards from Caracas, Venezuela

  • @dota2-plays-shorts
    @dota2-plays-shorts 6 месяцев назад +1

    nice in depth explination. thanks for your efford :)

  • @miyingojamil6784
    @miyingojamil6784 2 месяца назад +1

    I think it better for primary key to have Serial datatype(auto increasing number), unless there is a custom format being followed, like car license plate.
    Thanks

    • @DatabaseStar
      @DatabaseStar  2 месяца назад

      Good idea, I usually use auto-incrementing integers (such as Serial in Postgres).

  • @Shkkmj6868
    @Shkkmj6868 4 месяца назад

    Thank you so much. You explained it very nicely.

  • @triplestrafe
    @triplestrafe 11 месяцев назад

    appreciate this comprehensive video!

  • @joel-rg8xm
    @joel-rg8xm 11 месяцев назад +1

    Thank you, very useful to me.

  • @jsnow07grad
    @jsnow07grad 11 месяцев назад

    This is so helpful! Thank you!

  • @ogunacg3387
    @ogunacg3387 2 месяца назад +1

    I have a quick question so don't you think that there should be a Many to Many relation between ProductCategory and Attribute Type to ease the filter that the user going to make according to selected ProductCategory? I think it would be much easier for me to show Products to the users who has selected ProductCategory has these Attirbutes that can be filtered on and I can show them realted Products based on filter that they made?

    • @DatabaseStar
      @DatabaseStar  2 месяца назад +2

      Yeah that's a good idea, it could work.

    • @ogunacg3387
      @ogunacg3387 2 месяца назад +1

      @DatabaseStar Thank you for your feedback because it can be hard to validate myself .

  • @mannycalavera121
    @mannycalavera121 11 месяцев назад

    So much high quality information

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      Thanks! Glad you liked it.

  • @DucHuu03
    @DucHuu03 11 месяцев назад +1

    This is so amazing

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      Thanks! I’m glad you like it.

  • @JV-pu8kx
    @JV-pu8kx 3 месяца назад +2

    Do yourself, and everyone else, a favor. Set your code editor to use a mono-spaced font!

    • @DatabaseStar
      @DatabaseStar  3 месяца назад +1

      Great idea! My other editors are set this way, but I've just used the default for MySQL Workbench which is not monospaced. I'll change it. Thanks!

    • @JV-pu8kx
      @JV-pu8kx 2 месяца назад

      @DatabaseStar For anyone else who is reading this: I use mono-spaced fonts anytime I am indicating, on a Web page, in print, etc., something to be typed. Can be code, file names, etc., except web and email addresses. This makes it easier to see exactly what is to be typed as the spaces are clearly visible and the I (uppercase i), l (lowercase L), and 1 (one) are, usually, better differentiated. Not always so with O (letter O) and 0 (zero), but more so than with proportional fonts. I have seen editors that would restrict the font choices to mono-spaced fonts. Why this is not so for _all_ code editors is beyond me.

  • @AmarjargalB
    @AmarjargalB 6 месяцев назад

    I want you say Thank you. 🙏🙏🙏

  • @fresonn
    @fresonn 10 месяцев назад

    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  10 месяцев назад

      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 10 месяцев назад

      @@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

  • @MyStuff-x7g
    @MyStuff-x7g Месяц назад

    Thank you for this video. I am looking for a website template like the one you are "ASOS" that you are using. Where can I clone your project? I need to use this for a hardware eCommerce site.

    • @DatabaseStar
      @DatabaseStar  Месяц назад

      I don’t know where you would get a template from. I just followed along with this website and created the database.

  • @caophuvinhfplhcm
    @caophuvinhfplhcm 3 месяца назад

    Thank you very much sir, this video is really helpful. Btw, is this technique called "database custom filed with EAV model"?

    • @DatabaseStar
      @DatabaseStar  3 месяца назад

      You’re welcome! Yes this is a kind of EAV model, the variation table and related tables are similar to that.

  • @codingcambodia
    @codingcambodia 6 месяцев назад

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

  • @nickwoodward819
    @nickwoodward819 3 месяца назад

    Awesome - but quick question if you don't mind - at what point does an attribute become a variation property, or vice versa? IE what if the website started selling hair clips that don't have a size?

    • @nickwoodward819
      @nickwoodward819 3 месяца назад

      Ahh, it's to allow the stock level to vary based on the variation. So if I wanted the price to change based on a variation, say color, I'd have to put both the price and color entries in the product_variation table?

    • @nickwoodward819
      @nickwoodward819 3 месяца назад

      ha, that still makes price variations based on *size* difficult though... interesting... :D

    • @DatabaseStar
      @DatabaseStar  2 месяца назад

      Yeah that's right, it depends on how you want to track stock or prices. This is just a suggested design though.

    • @nickwoodward819
      @nickwoodward819 2 месяца назад

      @@DatabaseStar yeah for sure, enjoying it, and your emails. thanks :)

  • @IamDoQtorNo
    @IamDoQtorNo 10 месяцев назад

    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  10 месяцев назад

      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.

  • @wassimyazbekk
    @wassimyazbekk 11 месяцев назад +1

    Thank you so much

  • @aminem2080
    @aminem2080 8 месяцев назад

    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  8 месяцев назад +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.

  • @YT-cd2vi
    @YT-cd2vi 10 месяцев назад

    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  10 месяцев назад

      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 10 месяцев назад

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

  • @pedrogermano15
    @pedrogermano15 10 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  10 месяцев назад +1

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

    • @pedrogermano15
      @pedrogermano15 10 месяцев назад

      @@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

  • @7Janiel
    @7Janiel 6 месяцев назад

    Hello, i am trying to create an online shop that might sell not only clothes but other products as well like laptops. How would i create the database so it can accommodate clothes and laptops for example which can have different attributes (size for clothes and processor_type for laptops). Thanks

    • @DatabaseStar
      @DatabaseStar  6 месяцев назад

      You can use the database design in this video, I think, and the product categories would be where you would have clothes and laptops.

  • @juamurasaki7311
    @juamurasaki7311 9 месяцев назад

    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  9 месяцев назад

      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.

  • @Kashmiriboy.
    @Kashmiriboy. 8 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  8 месяцев назад

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

  • @X4Xubi
    @X4Xubi 7 месяцев назад

    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  7 месяцев назад

      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.

  • @bilkisuismail6096
    @bilkisuismail6096 11 месяцев назад

    Thank you

  • @purushottamkute7485
    @purushottamkute7485 11 месяцев назад

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

  • @VeeWebCode
    @VeeWebCode 11 месяцев назад

    I love you. you are the best.

  • @huynguyenluonggia6393
    @huynguyenluonggia6393 8 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  8 месяцев назад

      You can insert separate rows for each option.

  • @tanvu3956
    @tanvu3956 10 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  10 месяцев назад

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

  • @emesaiYT
    @emesaiYT 8 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  8 месяцев назад +1

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

    • @emesaiYT
      @emesaiYT 8 месяцев назад

      @@DatabaseStar okay thanks

  • @Spkntei
    @Spkntei 11 месяцев назад

    thanks bro

  • @abo8esabo8es52
    @abo8esabo8es52 11 месяцев назад

    Can you please make a practical video like this for w3school

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      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 11 месяцев назад

      @@DatabaseStar yes and we add more feature

  • @AmirMufid
    @AmirMufid 9 месяцев назад

    what name software for create database design like this video?

  • @djtoon8412
    @djtoon8412 9 месяцев назад

    can we use jsonb fields as alternative EAV

    • @DatabaseStar
      @DatabaseStar  9 месяцев назад

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

    • @matsberg1568
      @matsberg1568 9 месяцев назад

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

  • @iordanistsapanidis4021
    @iordanistsapanidis4021 3 месяца назад

    How to Design a Database for cityguide products

    • @DatabaseStar
      @DatabaseStar  3 месяца назад

      What’s a city guide product? I have a video on my channel about designing a database so you can follow that process.

  • @ДенисТерентєв
    @ДенисТерентєв 9 месяцев назад

    Where can I find the SQL code for this database?

    • @DatabaseStar
      @DatabaseStar  9 месяцев назад

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

  • @gc5035
    @gc5035 11 месяцев назад

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

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      Good idea, I can do that.

  • @devmdad
    @devmdad Месяц назад +1

    Why creating product_gender when its just a parent category for subcategories and can be named just as product_category with attributes of id, name and parent_id so this way you have one table handling the logic for infinite level of categories.

    • @DatabaseStar
      @DatabaseStar  Месяц назад

      That’s a good point, it could just be another category. I may have mentioned that in the video, but if not, then yes it could work.

  • @PhyoKo-kd4ks
    @PhyoKo-kd4ks 9 месяцев назад

    What use application for database design

  • @psmontte
    @psmontte 10 месяцев назад

    Where is the direct link to Schema?

  • @mac.ignacio
    @mac.ignacio 11 месяцев назад

    Confirmation link not working.

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

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

  • @DevanshuKamble-uz3fi
    @DevanshuKamble-uz3fi Месяц назад

    can any one send this er diagram

    • @DatabaseStar
      @DatabaseStar  Месяц назад

      The link for the diagram is at the top of the description.

  • @AfrinJahan-cg7fl
    @AfrinJahan-cg7fl 2 месяца назад

    how can i have this source code free please

    • @DatabaseStar
      @DatabaseStar  2 месяца назад

      There’s a link at the top of the description where you can get the source code or SQL scripts.

    • @AfrinJahan-cg7fl
      @AfrinJahan-cg7fl 2 месяца назад

      @DatabaseStar I tried but can't access it🙂

  • @Sedhu_17
    @Sedhu_17 10 месяцев назад

    why we remove gender table

    • @DatabaseStar
      @DatabaseStar  10 месяцев назад +1

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

  • @basketballskills-ur7lc
    @basketballskills-ur7lc 8 месяцев назад +1

    Lets connect

  • @JosephineFahy
    @JosephineFahy 11 месяцев назад

    You sound like a Kiwi! 😄

    • @DatabaseStar
      @DatabaseStar  11 месяцев назад

      Haha yeah the New Zealand and Australian accents are similar!

  • @OtabekAtaxanov-c2l
    @OtabekAtaxanov-c2l 2 месяца назад +1

    I received very very valuable information. So Iʼm glad to see this channel thanks a lot to founder database star

    • @DatabaseStar
      @DatabaseStar  2 месяца назад

      Thanks! Glad you find the videos useful