Database Design - similar records, what to do?

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

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

  • @DatabaseStar
    @DatabaseStar  4 дня назад

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

  • @Sperius7
    @Sperius7 Год назад +6

    Can I suggest a third option: have a single ‘person’ table (with id [PK], first and last names), then have separate tables for each role that have the ‘person_id’ FK and then columns specific to that role. This way you can avoid duplication of a person yet allow them to have different roles in the database.

    • @ahmeddabas
      @ahmeddabas Год назад

      that's can't avoid duplication , may be one person have more than one role

    • @medilies
      @medilies Год назад +1

      @@ahmeddabas at least you will not duplicate name email dob ...

    • @DatabaseStar
      @DatabaseStar  Год назад +7

      Great point! That's an option that could work as well. I have come across it before, and it's something called "polymorphic association". I'll create a video on this in the future.

    • @Sperius7
      @Sperius7 Год назад

      @@DatabaseStar Great! Look forward to seeing that. Keep up the good work on your videos.

    • @ahmeddabas
      @ahmeddabas Год назад

      @@medilies
      yes

  • @help3106
    @help3106 Год назад +1

    I think I ask you already in one of the past videos. If you remember, I ask about 4 user roles, `patient`, `dentist`, `dental assistant`, and `admin`. Thank you again for making this video specific for this issue, I understands it way clearer now.🎉🎉

    • @DatabaseStar
      @DatabaseStar  Год назад

      No problem, glad it helped! Yeah I remember getting this question on RUclips, and a similar question from an email recently.

  • @kane_lives
    @kane_lives Год назад +1

    Why is the video so quiet? I'm at 100% volume on YT and at 100% system volume and I think I'm going to need to download this video from YT just to launch it in VLC to make it louder...

    • @DatabaseStar
      @DatabaseStar  Год назад

      I'm not sure - my older videos certainly were quieter, but this one seems to be at a normal volume. I just checked the volume against a couple of other videos and ads and they all seem to be a similar volume.

  • @Little-BigBadminton
    @Little-BigBadminton Год назад +1

    I have a question.. How to design, let's say a trading system that every trade have a base order setting, a averaging setting, a hedging setting and each of them have a take profit setting, a stoploss setting, and a cut market setting..? Thank in advanced

    • @DatabaseStar
      @DatabaseStar  Год назад

      You can follow a similar process to my other videos, where you start with the requirements and build the design based on what you want it to do. I don't know enough about trading systems to be able to design it. But it sounds like those are all attributes of a single trade.

  • @YaswanthMuthavarapu
    @YaswanthMuthavarapu 5 дней назад

    in which website we can design that diagrams

    • @DatabaseStar
      @DatabaseStar  4 дня назад

      I use a tool called LucidChart but there are many others you can use

  • @bg-privat
    @bg-privat Год назад

    Having only one table, makes it difficult to see a history of changes, for instance, when a student becomes a teacher. Then a separate log table might be required.

    • @DatabaseStar
      @DatabaseStar  Год назад

      Yes that's true, that is a drawback of this solution, and a log table could be a way to resolve it.