Django Relationship models

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ต.ค. 2024

ความคิดเห็น • 688

  • @chaiaurcode
    @chaiaurcode  5 หลายเดือนก่อน +16

    Docs for this video:
    docs.chaicode.com/relationships-and-forms/
    Course: courses.chaicode.com/learn

    • @nonstopcodingcodewithadity8238
      @nonstopcodingcodewithadity8238 5 หลายเดือนก่อน

      hi sir plz request hai 99 kar do comment target or 150

    • @binauralbeats-relaxingmusi4336
      @binauralbeats-relaxingmusi4336 5 หลายเดือนก่อน +1

      sir ye series kab tak complete hoga and isme total kitne video honge?

    • @thekids525
      @thekids525 4 หลายเดือนก่อน

      @@binauralbeats-relaxingmusi4336 aaam kho aam ki goothli na gino

    • @ananya__f
      @ananya__f 4 หลายเดือนก่อน

      give us 9th tutorial. continue the series please

  • @bhaveshkarnewar719
    @bhaveshkarnewar719 4 หลายเดือนก่อน +18

    ON DELETE CASCADE is used to specify that when a row is deleted from the parent table, all rows in the child table that reference the deleted row should also be deleted. This is useful for maintaining the integrity of the database.

  • @zuhaibmirza4320
    @zuhaibmirza4320 5 หลายเดือนก่อน +14

    38:47 sir debug chahiye aap jaise detail me padhate ho waise hi achha lagata hai please don't change your teaching style even if zyada views na aare ho ya reach ok mil ri ho kyunki detailed videos ki hamesha zarurat rahi h❤❤

  • @MarriumNaseem
    @MarriumNaseem 2 หลายเดือนก่อน +2

    Finally, I found a series where I can learn from scratch and practice at the same time. I never comment on online videos, but this one deserves a shot (not just because the instructor asked for comments). Thankeww :)

  • @amitsangwan446
    @amitsangwan446 5 หลายเดือนก่อน +8

    Hitesh Sir + Chai aur Code per Django Series + Explanation in Hindi
    Ye hai perfect combination

  • @jankipatel118
    @jankipatel118 หลายเดือนก่อน

    I love how you show all the error that you actually face in-between... that same as real situation .. i can connect and feel good thank you so much

  • @khanhuzaif4986
    @khanhuzaif4986 5 หลายเดือนก่อน +2

    after having your docs website i can say proudly ki, programming now being indianized, thanks sir for such a valuable docs it helps us alot in our development work.

  • @keenzeen
    @keenzeen 4 หลายเดือนก่อน +2

    I was able to solve many problems only because there is documents. Kudos to you sir!!🙏🙏🙏🙏

  • @RajuKumar-lh1sf
    @RajuKumar-lh1sf 13 วันที่ผ่านมา

    Best part of yours videos is you resolve or debug errors in videos that's also important part of learning. Thank you

  • @CodingBRO
    @CodingBRO 4 หลายเดือนก่อน +3

    Sir, please don't get demotivated if you don't get enough reach. I know it's hard to stay consistent. I will try my best to comment on and share every Django video. Sir, you're doing the best job. I cannot trust anyone for Django videos except you, sir. I blindly trust you, sir. I know that you will definitely complete this series, and I will always support you, sir. Stay motivated, sir. We students love you.

  • @tuhinjamal6221
    @tuhinjamal6221 4 หลายเดือนก่อน +1

    sir you made Django easier. your teaching technique is awesome and lead us to dive into deep. thank you sir.

  • @abhisheksharma10600
    @abhisheksharma10600 5 หลายเดือนก่อน +4

    Guys please comment target pura karo, this is the least we can do to appreciate Hitesh sir. Thanks a lot for Django series sir

    • @rajniagarwal8572
      @rajniagarwal8572 5 หลายเดือนก่อน +1

      Bhai mane kar diya bhot sare comment aap bhi karo

  • @DeepakSinghKetheth
    @DeepakSinghKetheth 4 หลายเดือนก่อน

    I had to complete a Technical Assessment for a job interview, came here. A good kick start !
    Thankyou sir !

  • @linuxmio
    @linuxmio 4 หลายเดือนก่อน

    Thank you sir .......... In Django, the CASCADE option is used in foreign key relationships to specify that when a referenced object is deleted, all objects that reference it should also be deleted. This is a powerful feature for maintaining referential integrity within your database.

  • @lipikagupta4378
    @lipikagupta4378 4 หลายเดือนก่อน

    Sir, This is really an amazing course. You are teaching very well. I could not find any free or paid course like this. Please, don't stop making videos.

  • @CodingBRO
    @CodingBRO 4 หลายเดือนก่อน +1

    plz everyone do comment on every video of django so that we can get full series, this is how we can show our gratitude towards sir.

  • @serpentinagaming5920
    @serpentinagaming5920 5 หลายเดือนก่อน

    We need debugging details on the go , please keep it , and the most interesting is as you gave the relation between the code with different files , I love it , it's really helps me to understand how all are interconnected , thanks 😊

  • @informationtech-musa
    @informationtech-musa 2 หลายเดือนก่อน

    I really enjoy when show us how to debug a specific error. It helps a lot.

  • @MuhammadJunaid-ci5rw
    @MuhammadJunaid-ci5rw 5 หลายเดือนก่อน +1

    Sir Your all videos helps me to motivate and full confidence and this Django series is one of best series whenever I found so far Thanks you soo Much sir I Think paid courses mn bh itna Full in depth bahut rarely sikhaya jata hy but You are an actual Teacher and well guider 😘😘

  • @MuhammadAfaq-c1y
    @MuhammadAfaq-c1y 3 หลายเดือนก่อน

    I have seen and studied a lot of Indian teachers but you are the best sir, keep it up❤love from lahore Pakistan

  • @AbdullahMubeenA.M
    @AbdullahMubeenA.M 4 หลายเดือนก่อน +1

    Thank you for making the documentation so easy to read and learn from. I really appreciate your efforts.

  • @pramodky
    @pramodky 4 หลายเดือนก่อน

    awesome, Aaj achhe se samajh aya relationship,
    Debuging se hum logo ko bhi Idea milta hai error ko kaise fix kiya jaye,
    Aap se request hai ki debuging part ko edit na kare.
    Thank you

  • @RajuKumar-lh1sf
    @RajuKumar-lh1sf 13 วันที่ผ่านมา

    CASCADE in SQL is a keyword used in conjunction with foreign key constraints and it allows for automatic updates or deletions in a child table when changes are made to the parent table. This is particularly useful in maintaining the integrity of data across related tables in a database.

  • @carzone003
    @carzone003 หลายเดือนก่อน

    CASCADE ka mtlab databases mein hota hai k jab ek parent record (jaise ek table ka row) ko delete ya update kiya jata hai, toh us par dependent child records (dosre table mein jo us parent record se related hain) ko bhi ussi tarah handle kiya jata hai.

  • @billiondollarofficial
    @billiondollarofficial 5 หลายเดือนก่อน

    I always have respect to my friend who suggested your main channel Hitesh Choudhury back in 2022
    Now from Hitesh to Chai aur code
    Thank you Sir
    My favourite line is-"Hey there everyone Hitesh here"

  • @PavanPatil-rw1je
    @PavanPatil-rw1je 2 หลายเดือนก่อน

    hell mene 20 bar ye vidio dekha hai aur bhot kuch sikha parha hu thank

  • @dip-esh9778
    @dip-esh9778 8 วันที่ผ่านมา

    Cascading is used to define operation on foreign key , which allows the operations (delete, update ) in the child table, when changes are done in parent table.
    There are mainly two types of cascading actions:
    onUpdate : If I changed the primary key in the parent table (i.e department id) it will propagate to the child table ( and the foreing key particular department _id used in child table (Employee) it will automatically updated.
    OnDelete: If I delete the entity(student ) of parent table (i.e. RegisterStudent table), then it will automatically delete all the records of the student from child table(i.e course) .

  • @nature09997
    @nature09997 3 หลายเดือนก่อน

    Sir your lecture is enough for learning and we dont go anywhere to learn Django

  • @abhijitpradhan7860
    @abhijitpradhan7860 4 หลายเดือนก่อน

    11:00 "cascade" refers to a specific set of actions that are triggered automatically when an event occurs on a referenced row in a parent table. It is often used in the context of referential integrity constraints, specifically within FOREIGN KEY constraints. The two most common types of cascade actions are ON DELETE CASCADE and ON UPDATE CASCADE.

  • @siddharthraturi4151
    @siddharthraturi4151 5 หลายเดือนก่อน

    One of the finest series of django i've ever seen , loved it sir !!

  • @rajuxz1
    @rajuxz1 5 หลายเดือนก่อน

    I am a Django + .Net developer, learnt 1 year ago. Built some projects but due to some reason I had to shift to .Net . But I love coding in Django tho. I have strong foundation of python and Django but still following Hitesh sir's course. I really struggled learning it. Thanks a lot for this sir.

  • @TSSsniper
    @TSSsniper 5 หลายเดือนก่อน +2

    #Assignment:
    Cascade/cascading in DBMS:
    So basically when a row is deleted from a table and if some other tables are related to that particular table, then their data has to be deleted as well, to maintain the Integrity of the Data stored in DB.
    mtlb agr parent table ka data delete kia toh child tables ka data bhi delete ho jayega, to maintain integrity of the data.
    mtlb ek tarah se Domino effect ki tarah h.

  • @crown8887
    @crown8887 5 หลายเดือนก่อน

    Finally abb mai apne projects me models sahi kar paaoo ga..❤❤thanks alot sir ji..

  • @hakoonamatata11
    @hakoonamatata11 5 หลายเดือนก่อน

    "On delete cascade" is a SQL command used when connecting multiple tables using foreign key. When a data from parent table is deleted, the child tables can break but cascade commands prevents it from breaking.

  • @meetshihora
    @meetshihora 5 หลายเดือนก่อน

    mene pura youtube chhan mara lekin Django ka best containt nahi mila ae best hai sir

  • @nature09997
    @nature09997 2 หลายเดือนก่อน

    In databases, **CASCADE** is a rule used in foreign key constraints. It automatically updates or deletes related records in child tables when a record in the parent table is updated or deleted.

  • @AcezeroGame
    @AcezeroGame 5 หลายเดือนก่อน +1

    Great day to learn. Love from Nepal 🇳🇵 ❤️

  • @anonymous-hf9ju
    @anonymous-hf9ju หลายเดือนก่อน

    love the debugging process please continue to show us

  • @learner9-b8w
    @learner9-b8w 2 หลายเดือนก่อน

    The best part for me is the error debugging so don't remove that part sir keep introducing us to new errors every time.

  • @jankipatel118
    @jankipatel118 หลายเดือนก่อน

    Thank you sir it is perfect series for starting learning Django

  • @viraj-08-yt
    @viraj-08-yt 4 หลายเดือนก่อน

    Thanks for the django series, please keep the debugging in the videos. It helps us a lot.

  • @raj.indian72
    @raj.indian72 5 หลายเดือนก่อน

    Please hitesh also build websocket based projects in django your teaching skills are very unique 😊 I am so thankful to you.

  • @AshutoshRaj-ns4vy
    @AshutoshRaj-ns4vy 5 หลายเดือนก่อน

    Cascade: Specifies that if an attempt is made to delete or update a row with a key referenced by foreign keys in existing rows in other tables, all rows containing those foreign keys are also deleted or updated.

  • @ArbazSiddique-ki4cp
    @ArbazSiddique-ki4cp 4 หลายเดือนก่อน

    Cascade delete is used to automatically delete related data. When a record in a parent table is deleted, all related records in the referenced child table are also automatically deleted.

  • @sagarikasahoo1044
    @sagarikasahoo1044 2 หลายเดือนก่อน

    Sir you made Django easier!! Thank you so muchhhhhh!

  • @sagarikasahoo1044
    @sagarikasahoo1044 2 หลายเดือนก่อน

    Thank you for sharing the docs as well! They are so much helpful!

  • @pronitparida6786
    @pronitparida6786 5 หลายเดือนก่อน

    Debugging Code is just part of development process, seeing you working on it gives us an idea how does debugging the code works. I get such type of bugs even in small projects i build.

  • @shyampatidar6642
    @shyampatidar6642 2 หลายเดือนก่อน +1

    CASCADE in SQL is used to simultaneously delete or update an entry from both the child and parent table.

  • @hassanghani8039
    @hassanghani8039 4 หลายเดือนก่อน

    CASCADE in SQL is used to simultaneously delete or update an entry from both the child and parent table. The keyword CASCADE is used as a conjunction while writing the query of ON DELETE or ON UPDATE

  • @kaushikdey9404
    @kaushikdey9404 4 หลายเดือนก่อน

    The debugging sections really help a lot, sir

  • @chiraggupta4651
    @chiraggupta4651 12 วันที่ผ่านมา

    Thankyou Sir
    Got to learn so much
    Keep making such videos and helping students

  • @Freak_15
    @Freak_15 5 หลายเดือนก่อน +1

    Chai aur Django mei attendance laga do sir. Video 7 ko already notify mei rakh dia hai, kayi dino se chalta hua ye intezaar aaj kthm hone mei hai. Suna tha aap course videos record krne mei busy the, koi baat nahi humne bhi unn dino beth ke React ko thoda aur seekh lia....
    Btana chahunga ki Chai aur backend with Javascript abhi tak maine nahi dekha hai, Django hi mera first Backend work hai, Django ke baare mei aur padha thoda deep mei toh pta chala ki naa toh ye opinionated hai aur naa hi completely unopinioned, Best of both worlds likha tha... Koshish yahi rahegi ki Django ko hindi mei seekhu or Backend with Javascript ko Hitesh Choudary english channel pr seekhu, Usme aapne bola tha ki harr baar aapne bar raise hi kia hai, uss wali series me vo sb toh hogi hi jo isme tha pr Deployment, AWS, Docker vgera bhi cover karne ke plan mei ho.
    Vaise toh shayad hi tab tak ka intezaar karunga kyunki jab already Chai aur Backend hai toh Intezaar jyada kar paunga ya nhi pta nahi, ek baar Jisse react padh rha hu usse react ho jaye toh Project mei dimaag jyada chalega, Appwrite vagera ke jo aapke projects hain unhe bhi dhyan denge. Chai aur Backend vaha se shuru toh karunga pr tab tak I'm sure kaafi videos aa hi jayengi English channel pr, Itni toh aajayengi ki work kar pau, optimization vagera toh aap baad me btaoge hi shayad
    Baki freecodecamp vagera toh hai hi, Lage haath git ko bhi thoda brush up kar lunga, 2-3 din hi toh lagenge :)

  • @GyanendraSingh-rz4ej
    @GyanendraSingh-rz4ej 5 หลายเดือนก่อน

    Sir, your series are very good and another level. Thank you a lot Sir.

  • @InvisibleNatures
    @InvisibleNatures 9 วันที่ผ่านมา

    When you use on_delete=models.CASCADE, it means that if the referenced object (parent) is deleted, all related objects (children) will also be deleted.from django.db import models
    class Category(models.Model):
    name = models.CharField(max_length=100)
    def __str__(self):
    return self.name
    class Product(models.Model):
    name = models.CharField(max_length=100)
    price = models.DecimalField(max_digits=10, decimal_places=2)
    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    def __str__(self):
    return self.name

  • @saharanstudio8683
    @saharanstudio8683 4 หลายเดือนก่อน

    Amazing teaching style. Love it

  • @reachrehman
    @reachrehman 5 หลายเดือนก่อน

    Best Teaching Method in the World From PK 🥰🥰

  • @KukuG28
    @KukuG28 5 หลายเดือนก่อน

    Never found a better series on Django than this in Hindi.

  • @ZuhaibMirza-c2r
    @ZuhaibMirza-c2r 5 หลายเดือนก่อน

    12:41 Cascade, when we use it when the parent it will delete the children automatically i.e. when we delete a data all the data that is referenced to it will be deleted

  • @pushparajmehta
    @pushparajmehta 5 หลายเดือนก่อน

    I have learnt js and react from you your content are always great and this django series is mind blowing ❤

  • @shadullahsad9700
    @shadullahsad9700 5 หลายเดือนก่อน

    Sir u r the best..
    We want real world development.. Dont cut it viya..

  • @lolf390
    @lolf390 2 หลายเดือนก่อน

    Yes please keep teaching us how to debug and fix errors as well

  • @SaiSreeRamChavali
    @SaiSreeRamChavali 4 หลายเดือนก่อน

    The on_delete=models.CASCADE part means that if an Chai instance is deleted, all ChaiReview instances related to that Chai will also be deleted.This industrial practice is used for data integrity , Ensures that there are no orphaned records in the database.

  • @trickyplay
    @trickyplay 4 หลายเดือนก่อน

    I was looking to learn relationship, best video

  • @zuhaibmirza4320
    @zuhaibmirza4320 5 หลายเดือนก่อน +1

    2:32 Sir ji comment targt completed agla video please jaldi laye ga❤❤

  • @Kumar-tz5qh
    @Kumar-tz5qh 5 หลายเดือนก่อน +1

    01💯tahnku sir pls aur video bnaiye sir

  • @ashishtiwari-ee2mm
    @ashishtiwari-ee2mm 5 หลายเดือนก่อน

    sir ji, chai aur docs me kya use kiya hai apne next js ya django, bahut khoobsurat and clean banaya hai

  • @TechAlgorithms
    @TechAlgorithms 5 หลายเดือนก่อน +1

    Excited for upcoming video lectures

  • @ahtritcodes7219
    @ahtritcodes7219 5 หลายเดือนก่อน +1

    Sir keep the debugging part that helps to read and understand errors

  • @kotlashashank4767
    @kotlashashank4767 4 หลายเดือนก่อน

    Hello Hitesh sir! plz don't cut the debugging part in video. I like to see the how you fix the issues

  • @aakashchauhan5459
    @aakashchauhan5459 5 หลายเดือนก่อน

    ON DELETE CASCADE is used to specify that when a row is deleted from the parent table, all rows in the child table that reference the deleted row should also be deleted.

  • @bhabanisankarnayak75
    @bhabanisankarnayak75 5 หลายเดือนก่อน

    35:51 sir please ese hi debugging part ko rakhiye... It's very useful for beginners like me

  • @HandsomeMoves
    @HandsomeMoves 2 หลายเดือนก่อน

    Django me "models.CASCADE" ka matlab hai ke jab aik model (parent model) ka object delete hota hai, to us se related doosre model (child model) ke saare objects bhi automatically delete ho jate hain. Yeh ek foreign key relationship ko define karte waqt use hota hai.
    Detail Explanation
    Foreign Key Relationship:
    Django me "ForeignKey" aik field hoti hai jo do models ke darmiyan aik relationship banati hai. Yeh field ek model ko doosre model ke object ke sath link karti hai.
    models.CASCADE:
    Jab aap models.CASCADE ko aik ForeignKey me use karte hain, to iska matlab hai ke agar parent model ka object delete ho jata hai, to saare child model ke objects jo is parent model se related hain, wo bhi delete ho jate hain.

  • @adnanaliSDE
    @adnanaliSDE 5 หลายเดือนก่อน

    CASCADE effect specifies that when the row of parent table is deleted the row from child table that references the row From parent table be deleted.
    Example: If you delete a chai
    On delete CASCADE on ChaiReviews will delete all the ChaiReviews associated with that chai

  • @manojagarwal5554
    @manojagarwal5554 5 หลายเดือนก่อน

    Wow 😲 I am new to this channel and its best django playlist

  • @Sarita.739
    @Sarita.739 5 หลายเดือนก่อน

    Best channel i joined today 😃

  • @utkarshsingh1128
    @utkarshsingh1128 3 หลายเดือนก่อน

    23:00 Admin panel for models (creating classes in admin)
    34:30 Sorting issue

  • @riteshkapoor4589
    @riteshkapoor4589 5 หลายเดือนก่อน +1

    this is the best playlist for django

  • @PavanPatil-rw1je
    @PavanPatil-rw1je 2 หลายเดือนก่อน

    Sir, you're doing the best job and thank for all of this

  • @k.chetankumar6533
    @k.chetankumar6533 5 หลายเดือนก่อน

    Sir aap bas video bante raho... Hum target complete karte rahenge

  • @WorldOfMini
    @WorldOfMini 3 หลายเดือนก่อน

    I prefer more of you videos over docs as its intresting

  • @MEB_KunalArya
    @MEB_KunalArya 5 หลายเดือนก่อน

    bhaiya target poora hogya hai please share the next video

  • @nonstopcodingcodewithadity8238
    @nonstopcodingcodewithadity8238 5 หลายเดือนก่อน

    😮😮sir bhot accha padhaye hai

  • @ArtiGulia-h9g
    @ArtiGulia-h9g 5 หลายเดือนก่อน

    Sir ap bhoot acha padhata ho thanks sir

  • @int_topics
    @int_topics 2 หลายเดือนก่อน

    good video. I find it little bit difficult. might watch once more. going to read docs, it might help. Overall, playlist is great. Keep debugging part as it helps us how to debug while building projects.

  • @Dev-KD569
    @Dev-KD569 3 หลายเดือนก่อน

    11:49 in simple words sir cascade e query hai jo tab use ati hai jab user data ko delete kar ta hai aur us time hi jo bhi tables hoti hai us user kae naam ki vo bhi delete ho jati hai

  • @adityaf17
    @adityaf17 4 หลายเดือนก่อน

    I am loving the documentation!

  • @Waleedkkhan594
    @Waleedkkhan594 5 หลายเดือนก่อน

    Best teacher on the TH-cam

  • @samimanvar8248
    @samimanvar8248 4 หลายเดือนก่อน

    Using models.CASCADE ensures that your database remains consistent by automatically removing dependent records that should not exist without their parent record. This helps maintain referential integrity and prevents orphaned records.

  • @NishuSingh12951
    @NishuSingh12951 5 หลายเดือนก่อน

    Django is fun when learning from hitesh sir :)

  • @prabhatpani5495
    @prabhatpani5495 4 หลายเดือนก่อน

    Awesome tutorial Hitesh, Thanks so much

    • @chaiaurcode
      @chaiaurcode  4 หลายเดือนก่อน

      Most welcome!

  • @Waleedkkhan594
    @Waleedkkhan594 5 หลายเดือนก่อน

    One of the best series on Django

  • @adarshjhaxiif-1289
    @adarshjhaxiif-1289 5 หลายเดือนก่อน

    Btw, sir 300K hone wala hai, kuch special treat dijiye❤, 50K se follow kar rha hun aapko, but regret hota hai, ki 100 Subs se kyun nhi recommend kiya youtube aapka channel

  • @nonstopcodingcodewithadity8238
    @nonstopcodingcodewithadity8238 5 หลายเดือนก่อน

    class City(models.Model):
    # define model fields for a city
    class Property(models.Model):
    city = models.ForeignKey(City, on_delete = models.CASCADE)
    # define model fields for a property

  • @KunalPatil-il4je
    @KunalPatil-il4je 5 หลายเดือนก่อน

    studing django second time, aab dheere dheere samaz aa raha hai....

  • @PersonalMobile-w4g
    @PersonalMobile-w4g 3 หลายเดือนก่อน

    CASCADE:
    When we set the on_delete parameter as CASCADE, deleting the reference object will also delete the referred object. This option is most useful in many relationships. Suppose a post has comments; when the Post is deleted, all the comments on that Post will automatically delete. We don't want a comment saving in the database when the associated Post is deleted.

  • @sagarghosh2897
    @sagarghosh2897 5 หลายเดือนก่อน

    ye wala comment target kuch zada hi jaldi pura ho gaya. jokes apart, Sir you keep providing and we will keep supporting.

    • @Vandita940
      @Vandita940 5 หลายเดือนก่อน +1

      😅vo Mane karvaya tha

  • @jr.devasana
    @jr.devasana 4 หลายเดือนก่อน

    Actual seekhne ko to debugging me milta hai. Agar concepts and flow sahi karna hai to errors achy hi hai.

  • @divyanshuchaudhary4887
    @divyanshuchaudhary4887 4 หลายเดือนก่อน

    great and most detailed content as always

  • @TirthPrajapati-by9mu
    @TirthPrajapati-by9mu 5 หลายเดือนก่อน

    amazing way of teaching

  • @paavanadattas
    @paavanadattas 3 หลายเดือนก่อน

    This is the best django series