5. MY SQL CRUD Operations

Duration: 6 min

This video lesson is available to enrolled students.

Return to /learn/RSSB-BASIC-COMPUTER-INSTRUCTOR/paper-2-python/functions-modules/python-sql/asset-5-my-sql-crud-operations after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. About the Course: About the Course
  2. Paper-1 & 2 | Basic Numeracy / आधारभूत संख्यात्मक योग्यता: Ratio and Proportion / अनुपात और समानुपात, Divisibility Rules / विभाज्यता के नियम, Mixture and Alligation / मिश्रण और एलिगेशन, Permutation and Combination / क्रमचय और संचय, Logarithm / लघुगणक, Number System / संख्या पद्धति, HCF and LCM / महत्तम समापवर्तक और लघुत्तम समापवर्त्य, अनुक्रम, श्रेणी और संयोजन / Sequences, Series and Combinatorics, Time, Speed and Distance / समय, चाल और दूरी, Percentage / प्रतिशत, Average / औसत, Solid Mensuration / घन क्षेत्रमिति, Age Problems / आयु संबंधी प्रश्न, Arithmetic / अंकगणित, Statistics / सांख्यिकी, Probability / प्रायिकता, Profit, Loss and Discount / लाभ, हानि और बट्टा, Simple and Compound Interest / साधारण और चक्रवृद्धि ब्याज, Partnership / साझेदारी, Speed Mathematics and Basic Mathematics / द्रुत गणित और आधारभूत गणित, Algebra / बीजगणित, Simplification, Indices and Surds / सरलीकरण, घातांक और करणी, Time and Work / समय और कार्य, Pipe and Cistern / नल और टंकी, RSSB Specific Videos - Basic Numeracy / RSSB विशेष वीडियो - आधारभूत संख्यात्मक योग्यता, Sets, Relations, Functions and Discrete Mathematics / समुच्चय, संबंध, फलन और विविक्त गणित, Number Systems and Number Theory / संख्या पद्धति और संख्या सिद्धांत, Coordinate Geometry, Vectors and 3D Geometry / निर्देशांक ज्यामिति, सदिश और त्रिविमीय ज्यामिति, Polynomials, Equations and Complex Numbers / बहुपद, समीकरण और सम्मिश्र संख्याएँ, वास्तविक और सम्मिश्र विश्लेषण / Real and Complex Analysis, Plane Mensuration / समतल क्षेत्रमिति, आव्यूह और रैखिक बीजगणित / Matrices and Linear Algebra, Production and Costs / उत्पादन एवं लागत, Business Finance, Banking and Financial Markets / व्यावसायिक वित्त, बैंकिंग एवं वित्तीय बाज़ार, Euclidean Geometry and Mensuration / यूक्लिडीय ज्यामिति और क्षेत्रमिति, Statistics and Probability / सांख्यिकी और प्रायिकता, Integers & Rational Numbers / पूर्णांक और परिमेय संख्याएँ
  3. Paper-1 & 2 | Data Interpretation / आँकड़ों की व्याख्या: Data Interpretation / आँकड़ा निर्वचन
  4. Paper-1 & 2 | General Mental Ability / सामान्य मानसिक योग्यता: Mental Ability / मानसिक योग्यता, RSSB Specific Videos - Mental Ability / RSSB विशेष वीडियो - मानसिक योग्यता
  5. Paper-1 & 2 | Logical Reasoning and Analytical Ability / तार्किक तर्कणा एवं विश्लेषणात्मक क्षमता: Series / श्रेणी, Coding-Decoding / कूट लेखन एवं कूट वाचन, Data Sufficiency / आँकड़ों की पर्याप्तता, Non-Verbal Reasoning / अशाब्दिक तर्क, Syllogisms / न्यायवाक्य, Seating Arrangement and Puzzles / बैठक व्यवस्था एवं पहेलियाँ, Blood Relations / रक्त संबंध, Direction and Distance / दिशा एवं दूरी, Analytical Reasoning (Counting Figures Reasoning) / विश्लेषणात्मक तर्क (आकृति गणना तर्क), Mathematical Operations and Missing Numbers / गणितीय संक्रियाएँ एवं लुप्त संख्या, Calendar and Clock / कैलेंडर एवं घड़ी, Clock / घड़ी, Cubes, Dice and Figure Counting / घन, पासा एवं आकृतियों की गिनती, Venn Diagrams, Syllogism and Inequalities / वेन आरेख, न्याय वाक्य एवं असमानता, Analogy and Classification / सादृश्यता एवं वर्गीकरण, Order and Ranking / क्रम एवं रैंकिंग, Statement-Based Reasoning / कथन आधारित तार्किक विवेचन, Data Arrangement / आँकड़ों की व्यवस्था, Alphabet and Number Test / वर्णमाला एवं संख्या परीक्षण, Crypt Arithmetic / कूट अंकगणित, Data Sufficiency and Decision Making / आँकड़ों की पर्याप्तता एवं निर्णय क्षमता, Maps, Remote Sensing and Geographical Techniques / मानचित्र, सुदूर संवेदन एवं भौगोलिक तकनीकें, Partnership Accounts / साझेदारी लेखांकन, Inequality / असमानता
  6. Paper-1 & 2 | Decision Making and Problem Solving / निर्णय लेना एवं समस्या समाधान: Data Sufficiency and Decision Making / आँकड़ों की पर्याप्तता एवं निर्णय क्षमता
  7. Paper-1 | General Science / सामान्य विज्ञान: Scientific Achievements and Research / वैज्ञानिक उपलब्धियाँ और अनुसंधान, कोशिका: संरचना एवं कार्य / Cell: Structure and Function, ऊष्मागतिकी एवं साम्यावस्था / Thermodynamics and Equilibrium, RSSB Specific Videos / RSSB विशेष वीडियो, Agronomy and Farming Systems / शस्य विज्ञान एवं कृषि प्रणालियाँ, Evolution / विकास, Biotechnology / जैव प्रौद्योगिकी, Periodic Classification and Chemical Bonding / आवर्त वर्गीकरण एवं रासायनिक आबंधन, d- and f-Block Elements and Coordination Compounds / d- एवं f-ब्लॉक तत्व तथा उपसहसंयोजन यौगिक, Organic Chemistry: Basic Principles and Isomerism / कार्बनिक रसायन: मूल सिद्धांत एवं समावयवता, Organic Compounds Containing Oxygen and Nitrogen / ऑक्सीजन एवं नाइट्रोजन युक्त कार्बनिक यौगिक, Geography as a Discipline and Geographical Thought / भूगोल: एक विषय एवं भौगोलिक चिंतन, पृथ्वी: उत्पत्ति, आंतरिक संरचना एवं विवर्तनिकी / The Earth: Origin, Interior and Tectonics, Geomorphic Processes and Landforms / भू-आकृतिक प्रक्रियाएँ एवं स्थलरूप, Atmosphere and Climate / वायुमंडल एवं जलवायु, जैवमंडल, मृदा एवं पर्यावरण / Biosphere, Soils and Environment, Natural Hazards and Disasters / प्राकृतिक संकट एवं आपदाएँ, संसाधन, कृषि, खनिज एवं ऊर्जा / Resources, Agriculture, Minerals and Energy, Industries, Services, Transport and Trade / उद्योग, सेवाएँ, परिवहन एवं व्यापार, द्रव्य एवं रसायन विज्ञान की मूल अवधारणाएँ / Matter and Basic Concepts of Chemistry, परमाणु संरचना एवं नाभिकीय रसायन / Structure of Atom and Nuclear Chemistry, States of Matter and Solutions / द्रव्य की अवस्थाएँ एवं विलयन, Redox Reactions and Electrochemistry / अपचयोपचय अभिक्रियाएँ एवं वैद्युतरसायन, Chemical Kinetics and Surface Chemistry / रासायनिक बलगतिकी एवं पृष्ठ रसायन, धातुकर्म, s-ब्लॉक एवं p-ब्लॉक तत्व / Metallurgy, s-Block and p-Block Elements, हाइड्रोकार्बन, हैलोऐल्केन एवं हैलोऐरीन / Hydrocarbons, Haloalkanes and Haloarenes, Biomolecules, Polymers and Everyday Chemistry / जैव-अणु, बहुलक एवं दैनिक जीवन में रसायन, Analytical Chemistry and Spectroscopy / विश्लेषणात्मक रसायन एवं स्पेक्ट्रमिकी, Measurement and Mathematical Methods / मापन और गणितीय विधियाँ, गति और गति के नियम / Motion and Laws of Motion, कार्य, ऊर्जा, शक्ति और घूर्णी गति / Work, Energy, Power and Rotational Motion, Gravitation / गुरुत्वाकर्षण, Mechanical Properties of Matter / पदार्थ के यांत्रिक गुण, Thermal and Statistical Physics / तापीय और सांख्यिकीय भौतिकी, Oscillations and Mechanical Waves / दोलन और यांत्रिक तरंगें, Electrostatics and Current Electricity / स्थिरवैद्युतिकी और धारा विद्युत, Magnetism, Induction and Alternating Current / चुम्बकत्व, प्रेरण और प्रत्यावर्ती धारा, Optics and Photonics / प्रकाशिकी और फोटोनिकी, Quantum Physics and Relativity / क्वांटम भौतिकी और आपेक्षिकता, Atoms, Nuclei and Astrophysics / परमाणु, नाभिक और खगोल भौतिकी, जीव जगत एवं जैविक वर्गीकरण / Living World and Biological Classification, Plant Physiology / पादप कार्यिकी, मानव कार्यिकी / Human Physiology, Molecular Basis of Inheritance / वंशागति का आणविक आधार, Biology in Human Welfare / मानव कल्याण में जीव विज्ञान, पारिस्थितिकी एवं पर्यावरण / Ecology and Environment, Family, Marriage and Kinship / परिवार, विवाह और नातेदारी, Soil Science / मृदा विज्ञान, Plant Nutrition, Manures and Fertilizers / पादप पोषण, खाद एवं उर्वरक, Fruit Science and Orchard Management / फल विज्ञान एवं बाग प्रबंधन, Floriculture, Landscaping and Protected Cultivation / पुष्प विज्ञान, भूदृश्य एवं संरक्षित खेती, Plant Breeding and Seed Technology / पादप प्रजनन एवं बीज प्रौद्योगिकी, Plant Protection / पादप संरक्षण, Anatomy and Physiology / शरीर रचना एवं शरीर क्रिया विज्ञान, Kinesiology and Biomechanics / कायनेसियोलॉजी एवं बायोमैकेनिक्स, Sports Psychology, Growth and Sociology / खेल मनोविज्ञान, वृद्धि एवं समाजशास्त्र, Sports Training and Physical Fitness / खेल प्रशिक्षण एवं शारीरिक पुष्टि, Sports Medicine, Injuries and Rehabilitation / खेल चिकित्सा, चोटें एवं पुनर्वास, Test, Measurement and Evaluation / परीक्षण, मापन एवं मूल्यांकन, Food and Nutrients / भोजन और पोषक तत्त्व, Nutrition Processes and Meal Planning / पोषण प्रक्रियाएँ और आहार नियोजन, Food Science, Processing and Food Safety / खाद्य विज्ञान, प्रसंस्करण और सुरक्षा, Public Nutrition, Health and First Aid / जन पोषण, स्वास्थ्य और प्राथमिक उपचार, Textile Science and Indian Textiles / वस्त्र विज्ञान और भारतीय वस्त्र, Extension Education and Development Communication / प्रसार शिक्षा और विकास संचार, Solid State Physics and Electronics / ठोस अवस्था भौतिकी और इलेक्ट्रॉनिकी, Main-group and Periodic Chemistry / मुख्य समूह एवं आवर्त रसायन, Biochemistry and Bioenergetics / जैवरसायन एवं जैवऊर्जिकी, Non-chordate Diversity / अरज्जुकी विविधता, Plant Morphology and Anatomy / पादप आकारिकी और शारीर, Animal Reproduction and Development / जंतुओं में जनन एवं परिवर्धन
  8. Paper-1 | General Awareness / सामान्य जागरूकता: State-Specific General Knowledge / राज्य विशेष सामान्य ज्ञान, Current Affairs / समसामयिकी, प्रादेशिक एवं राजनीतिक भूगोल / Regional and Political Geography, Social Problems and Welfare / सामाजिक समस्याएँ और कल्याण, Guidance and Counselling / निर्देशन एवं परामर्श, Digital India and Online Services, भारत का भौतिक पर्यावरण / India: Physical Environment, जनसंख्या, मानव विकास एवं सांस्कृतिक भूगोल / Population, Human Development and Cultural Geography, Human Settlements / मानव बस्तियाँ, Sources and Historiography / इतिहास के स्रोत एवं इतिहास-लेखन, Prehistoric Cultures and the Harappan Civilisation / प्रागैतिहासिक संस्कृतियाँ एवं हड़प्पा सभ्यता, Harsha and Early Medieval India / हर्ष एवं पूर्व मध्यकालीन भारत, Delhi Sultanate and the Deccan Kingdoms / दिल्ली सल्तनत एवं दक्कन के राज्य, Mughal Empire and the Marathas / मुगल साम्राज्य एवं मराठा, European Arrival, British Expansion and 1857 / यूरोपीय आगमन, ब्रिटिश विस्तार एवं 1857, Modern and Contemporary World / आधुनिक एवं समकालीन विश्व, Culture, Socialisation and Social Control / संस्कृति, समाजीकरण और सामाजिक नियंत्रण, Vegetables and Specialty Crops / सब्जी एवं विशिष्ट फसलें, Animal Husbandry and Dairy Science / पशुपालन एवं दुग्ध विज्ञान, Olympic Movement, Sports Bodies and Awards / ओलंपिक आंदोलन, खेल संस्थाएँ एवं पुरस्कार, Athletics (Track and Field) / एथलेटिक्स (ट्रैक एवं फील्ड), खेल एवं क्रीड़ाएँ / Games and Sports, Sports Management and Tournaments / खेल प्रबंधन एवं प्रतियोगिताएँ, Indian Architecture, Temple Sculpture and Bronzes / भारतीय स्थापत्य, मंदिर मूर्तिकला और कांस्य, Indian Miniature Painting Schools / भारतीय लघुचित्र शैलियाँ, Folk Art and Crafts / लोक कला और हस्तशिल्प, Folk and Contemporary Dance / लोक और समकालीन नृत्य, Cultural and Language Awareness / संस्कृति और भाषा परिचय, Defence and Security Awareness / रक्षा और सुरक्षा परिचय
  9. Paper - 2 | Digital Logic Systems: Digital Systems & Boolean Basics, Logic Gates & Hardware, Combinational Circuit, Sequential Circuits
  10. Paper-2 | Database Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, Relational Calculus, Relational Algebra, SQL, NoSQL
  11. Paper-2 | Data Structures & Algorithms: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Algorithm Analysis, Sorting Algorithms, Intro to Compilers, Hashing
  12. Paper 2 | Data Communication and Network Security: Introduction to CN, Data Communication, Data Link Layer - Ethernet, DLL: Error Control, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Application Layer, Hardware basics, Network Security, Ethical Hacking
  13. Paper-2 | Operating Systems: Introduction to OS, Process Management, Memory Management, File Management, Deadlock
  14. Paper-2 | Computer Organization and Architecture: Basics of COA, Floating Point Rep, Cache Memory Organization, Input Output Organisation, Instr Formats & Modes, Control Unit Design, Register Transfer and Microoperations, Programming the Basic Computer, Number System, Number Representation
  15. Paper 2 | System Analysis and Design: Fundamentals of Systems and Information Systems, Fundamentals of Software Engineering, SDLC and Development Approaches, Software Documentation and Software Requirements Specification (SRS), SDD and Quality Assurance, Security, Risk Management & Maintenance, Software Testing
  16. Paper-2 | C Programming: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling
  17. Paper 2 | OOPS , C++ , JAVA: Language Design, OOPS with C++, Java, .Net Programming, Java Fundamentals
  18. Paper 2 | Python: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis
  19. Emerging Trends and AI: Emerging Trends and AI, Trade, Marketing and Consumer Protection / व्यापार, विपणन एवं उपभोक्ता संरक्षण, Internet of Things, Cloud Computing
  20. Paper-2 | Data Processing (Ms-Office): MS Office Applications
  21. Paper-2 | Internet and Web Technologies: HTML Basics, CSS, XML, JavaScript-Basics, Internet Fundamentals, Protocols & Services, Web Publishing & Hosting, Server Side & Security, Emerging Technologies, Terms & Abbreviations, Cyber Threats and Malware Attacks, Role of Internet and Web Services, Security in Mobile and Wireless Computing, Network Access Technologies, Society, Law & Ethics
  22. Paper 2 | Pedagogy / शिक्षाशास्त्र: Growth and Development / वृद्धि और विकास, Theories of Development / विकास के सिद्धांत, शिक्षा का अर्थ, उद्देश्य एवं दर्शन / Meaning, Aims and Philosophy of Education, Inclusive Education / समावेशी शिक्षा, विज्ञान शिक्षणशास्त्र / Science Pedagogy, Assessment and Evaluation / आकलन और मूल्यांकन, Cognitive Processes / संज्ञानात्मक प्रक्रियाएँ, Socialisation and Gender / समाजीकरण और जेंडर, शिक्षा, समाज एवं जेंडर / Education, Society and Gender, Teaching-Learning Process and Classroom Management / शिक्षण-अधिगम प्रक्रिया एवं कक्षा प्रबंधन, Teaching Methods and Approaches / शिक्षण विधियाँ एवं उपागम, Lesson Planning / पाठ योजना, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री एवं शैक्षिक तकनीकी, Teacher: Qualities, Professional Ethics and Development / शिक्षक: गुण, व्यावसायिक नैतिकता एवं विकास, Assessment and Evaluation / आकलन एवं मूल्यांकन, Curriculum, Arts and Co-curricular Areas / पाठ्यचर्या, कला एवं सह-शैक्षिक क्षेत्र, Education of Children with Disabilities / दिव्यांग बच्चों की शिक्षा, Educational Psychology / शैक्षिक मनोविज्ञान, अभिप्रेरणा और स्वनिर्देशित अधिगम / Motivation and Self-Directed Learning, व्यक्तिगत भिन्नताएँ, क्षमताएँ और व्यक्तित्व / Individual Differences, Abilities and Personality, Mental Health and Guidance / मानसिक स्वास्थ्य और मार्गदर्शन, Teaching Methods / शिक्षण विधियाँ, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री और शैक्षिक तकनीकी, Research: Meaning, Characteristics and Types / शोध: अर्थ, विशेषताएँ एवं प्रकार, Methods of Research and Research Design / शोध विधियाँ एवं अभिकल्प, Mathematics Pedagogy / गणित शिक्षणशास्त्र, Science and Scientific Inquiry / विज्ञान एवं वैज्ञानिक जाँच, Social Science Pedagogy / सामाजिक विज्ञान शिक्षणशास्त्र, Teaching Geography / भूगोल शिक्षण, Society, Community and Social Groups / समाज, समुदाय और सामाजिक समूह, Apparel Design and Care / परिधान डिज़ाइन और देखभाल, Nature, History and Schools of Psychology / मनोविज्ञान का स्वरूप, इतिहास और सम्प्रदाय, Research Methods and Statistics / अनुसंधान विधियाँ और सांख्यिकी, Biological Bases of Behaviour / व्यवहार के जैविक आधार, Sensation, Attention and Perception / संवेदन, अवधान और प्रत्यक्षण, Thinking, Language, Intelligence and Creativity / चिंतन, भाषा, बुद्धि और सृजनात्मकता, Motivation and Emotion / अभिप्रेरणा और संवेग, Self, Personality and Stress / आत्म, व्यक्तित्व और तनाव, Psychological Disorders / मनोवैज्ञानिक विकार, Therapeutic Approaches / चिकित्सा उपागम, Social Psychology / सामाजिक मनोविज्ञान, Industrial and Organisational Psychology / औद्योगिक और संगठनात्मक मनोविज्ञान, Modern Western Art / आधुनिक पाश्चात्य कला, Indian and Western Aesthetics / भारतीय और पाश्चात्य सौन्दर्यशास्त्र, Art Pedagogy / कला शिक्षण, Fundamentals of Dance / नृत्य के मूल तत्व, General Concepts of Philosophy / दर्शन के सामान्य प्रत्यय, Social and Political Philosophy / सामाजिक एवं राजनीतिक दर्शन, Microteaching and Classroom Communication / सूक्ष्म शिक्षण एवं कक्षा संप्रेषण, Educational Policies, Acts and Administration / शैक्षिक नीतियाँ, अधिनियम एवं प्रशासन, Learning and Behavioural Theories / अधिगम और व्यवहारवादी सिद्धांत, Teaching Planning and Teaching Skills / शिक्षण योजना और शिक्षण कौशल, मानव विकास / Human Development
  23. Live Classes:
  24. Paper 1 - Full Mock Tests:
  25. Paper 2 - Full Mock Tests:
  26. BCI Previous Year Papers:
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This educational video provides a comprehensive guide to performing CRUD (Create, Read, Update, Delete) operations in MySQL using Python. The instructor systematically demonstrates how to interact with a database, starting with inserting data and moving through retrieval methods, updating records, and finally deleting entries. The lesson is structured around practical code examples displayed on a screen, ensuring students understand the syntax and execution flow required for database management.

Chapters

  1. 0:00 – 2:00 00:00-02:00

    The session begins with an introduction to MySQL CRUD operations. The presenter focuses first on the INSERT operation, specifically inserting a single record. The screen displays the SQL command: sql = "INSERT INTO students (id, name, branch, marks) VALUES (%s, %s, %s, %s)". He defines a tuple values = (1, "Ankush", "CSE", 95) to match the placeholders. The explanation covers cursor.execute(sql, values) to run the query and conn.commit() to save the transaction. He emphasizes that the values must be passed as a tuple to the execute function. He underlines the SQL string and the values tuple on the screen to draw attention to the syntax.

  2. 2:00 – 5:00 02:00-05:00

    The lecture progresses to inserting multiple records simultaneously. The code shows a list of tuples named data, containing entries for Ravi, Neha, and Aman. The method cursor.executemany(sql, data) is used to execute the insert statement for all items in the list. Next, the SELECT operation is introduced. The presenter explains fetchall() to retrieve all rows, fetchone() to get just the first row, and fetchmany(n) to fetch a specific number of rows. The section concludes with the UPDATE operation, where the SQL UPDATE students SET marks = %s WHERE id = %s is used to change a record's data, followed by checking cursor.rowcount to verify the update. He circles the SQL string and the values tuple on the screen.

  3. 5:00 – 5:57 05:00-05:57

    The final segment covers the DELETE operation. The presenter writes the SQL command sql = "DELETE FROM students WHERE id = %s". He highlights the importance of passing the value as a tuple, specifically value = (3,), noting the comma is necessary for a single-element tuple. The execution follows the same pattern: cursor.execute(sql, value) and conn.commit(). He again uses cursor.rowcount to confirm the number of rows deleted. The video concludes with a "Thanks" slide, wrapping up the tutorial on database operations. He underlines the value tuple to emphasize the syntax.

The video effectively structures the learning process by breaking down database interactions into distinct CRUD categories. It moves logically from creating data (single and bulk inserts) to reading it (various fetch methods), modifying it (updates), and removing it (deletes). The consistent use of cursor.execute() and conn.commit() reinforces the standard workflow for Python database connectivity. By providing concrete code snippets for each operation, the lesson ensures that students can replicate the examples to build functional database applications. The emphasis on parameterized queries using %s placeholders also highlights best practices for preventing SQL injection, although this specific security concept is implied through the syntax used.

Loading lesson…