5. MY SQL CRUD Operations

Duration: 6 min

This video lesson is available to enrolled students.

Return to /learn/DSSSB-TGT-COMPUTER-SCIENCE-PAPER-2/python-language/functions-modules/python-sql/asset-5-my-sql-crud-operations after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. About Course: About the Course
  2. Programming and Data Structures: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling, Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing, Language Design, Intro to Compilers, Visual Basics, Syntax Analysis: Bottom-Up
  3. C++ and Java Programming: OOPS with C++, Java Fundamentals, Array, String, IO & References, OOPS with Java, Generic & Collections, Multithreading, File Handling & I/O, Java, Object Oriented Technology
  4. Computer Networks, TCP/IP & Network Security: Introduction to CN, Data Communication, DLL: Flow Control, DLL: Access Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Access Technologies, Network Security, Cloud Computing, Mobile Computing, Net Layer:Routing Protocol, Cyber Safety and Security
  5. Teaching Methodology / शिक्षण विधि: Growth and Development / वृद्धि और विकास, शिक्षा का अर्थ, उद्देश्य एवं दर्शन / Meaning, Aims and Philosophy of Education, Theories of Development / विकास के सिद्धांत, Inclusive Education / समावेशी शिक्षा, विज्ञान शिक्षणशास्त्र / Science Pedagogy, Assessment and Evaluation / आकलन और मूल्यांकन, Socialisation and Gender / समाजीकरण और जेंडर, शिक्षा, समाज एवं जेंडर / Education, Society and Gender, Cognitive Processes / संज्ञानात्मक प्रक्रियाएँ, Teaching Planning and Teaching Skills / शिक्षण योजना और शिक्षण कौशल, Personality Development / व्यक्तित्व विकास, Teaching Methods / शिक्षण विधियाँ, Learning and Behavioural Theories / अधिगम और व्यवहारवादी सिद्धांत, व्यक्तिगत भिन्नताएँ, क्षमताएँ और व्यक्तित्व / Individual Differences, Abilities and Personality, अभिप्रेरणा और स्वनिर्देशित अधिगम / Motivation and Self-Directed Learning, Teaching Methods and Approaches / शिक्षण विधियाँ एवं उपागम, Teaching-Learning Process and Classroom Management / शिक्षण-अधिगम प्रक्रिया एवं कक्षा प्रबंधन, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री एवं शैक्षिक तकनीकी, Microteaching and Classroom Communication / सूक्ष्म शिक्षण एवं कक्षा संप्रेषण, Assessment and Evaluation / आकलन एवं मूल्यांकन, Curriculum, Arts and Co-curricular Areas / पाठ्यचर्या, कला एवं सह-शैक्षिक क्षेत्र, Education of Children with Disabilities / दिव्यांग बच्चों की शिक्षा, Teacher: Qualities, Professional Ethics and Development / शिक्षक: गुण, व्यावसायिक नैतिकता एवं विकास, समावेशी शिक्षा / Inclusive Education, Social Psychology / सामाजिक मनोविज्ञान, Data Collection and Measurement / आँकड़ा संग्रह एवं मापन, Educational Objectives and Bloom's Taxonomy / शैक्षिक उद्देश्य एवं ब्लूम का वर्गीकरण, Lesson Planning / पाठ योजना, Guidance and Counselling / निर्देशन एवं परामर्श, Educational Psychology / शैक्षिक मनोविज्ञान, Mental Health and Guidance / मानसिक स्वास्थ्य और मार्गदर्शन, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री और शैक्षिक तकनीकी, वाक्य-विचार, लेखन, पत्रकारिता और प्रयोजनमूलक हिंदी, हिंदी शिक्षणशास्त्र, Phonetics and Linguistics, Transformation of Sentences, Writing Skills, Indian, American and World Literature, Foundations of Communication / संचार की मूल अवधारणाएँ, Language, Culture and Nonverbal Signals / भाषा, संस्कृति और अभाषिक संकेत, Listening, Conversation and Communication Skills / श्रवण, वार्तालाप और संचार कौशल, Research: Meaning, Characteristics and Types / शोध: अर्थ, विशेषताएँ एवं प्रकार, Methods of Research and Research Design / शोध विधियाँ एवं अभिकल्प, Research Ethics / शोध नैतिकता, Paper, Article and Academic Events / शोध-पत्र, लेख एवं शैक्षिक आयोजन, अनुक्रम, श्रेणी और संयोजन / Sequences, Series and Combinatorics, आव्यूह और रैखिक बीजगणित / Matrices and Linear Algebra, वास्तविक और सम्मिश्र विश्लेषण / Real and Complex Analysis, Mathematics Pedagogy / गणित शिक्षणशास्त्र, Science and Scientific Inquiry / विज्ञान एवं वैज्ञानिक जाँच, Social Science Pedagogy / सामाजिक विज्ञान शिक्षणशास्त्र, संस्कृतशिक्षणम्, Natural Hazards and Disasters / प्राकृतिक संकट एवं आपदाएँ, Teaching Geography / भूगोल शिक्षण, Pedagogy of Economics / अर्थशास्त्र का शिक्षणशास्त्र, भारतीय राजनीति और जनभागीदारी / Indian Politics and Participation, Molecular Basis of Inheritance / वंशागति का आणविक आधार, Pedagogy of Biology / जीव विज्ञान का शिक्षणशास्त्र, Pedagogy of History / इतिहास शिक्षणशास्त्र, Society, Community and Social Groups / समाज, समुदाय और सामाजिक समूह, Family, Marriage and Kinship / परिवार, विवाह और नातेदारी, Social Stratification and Inequality / सामाजिक स्तरीकरण और असमानता, Physical Education Pedagogy and Inclusion / शारीरिक शिक्षा का शिक्षणशास्त्र एवं समावेशन, Apparel Design and Care / परिधान डिज़ाइन और देखभाल, Extension Education and Development Communication / प्रसार शिक्षा और विकास संचार, Nature, History and Schools of Psychology / मनोविज्ञान का स्वरूप, इतिहास और सम्प्रदाय, Research Methods and Statistics / अनुसंधान विधियाँ और सांख्यिकी, Biological Bases of Behaviour / व्यवहार के जैविक आधार, Sensation, Attention and Perception / संवेदन, अवधान और प्रत्यक्षण, Learning / अधिगम, Thinking, Language, Intelligence and Creativity / चिंतन, भाषा, बुद्धि और सृजनात्मकता, Motivation and Emotion / अभिप्रेरणा और संवेग, Self, Personality and Stress / आत्म, व्यक्तित्व और तनाव, Psychological Disorders / मनोवैज्ञानिक विकार, Therapeutic Approaches / चिकित्सा उपागम, Industrial and Organisational Psychology / औद्योगिक और संगठनात्मक मनोविज्ञान, Fundamentals, Media and Techniques of Art / कला के मूल तत्व, माध्यम और तकनीक, Indian Miniature Painting Schools / भारतीय लघुचित्र शैलियाँ, Modern Western Art / आधुनिक पाश्चात्य कला, Indian and Western Aesthetics / भारतीय और पाश्चात्य सौन्दर्यशास्त्र, Art Pedagogy / कला शिक्षण, Fundamentals of Dance / नृत्य के मूल तत्व, History of Indian Dance and Treatises / नृत्य का इतिहास और शास्त्रीय ग्रंथ, Music Aesthetics and Music Teaching / संगीत सौंदर्यशास्त्र एवं संगीत शिक्षण, General Concepts of Philosophy / दर्शन के सामान्य प्रत्यय, Modern Western Philosophy: Descartes to Hume / आधुनिक पाश्चात्य दर्शन: देकार्त से ह्यूम, Social and Political Philosophy / सामाजिक एवं राजनीतिक दर्शन, Statement-Based Reasoning / कथन आधारित तार्किक विवेचन, Data Sufficiency and Decision Making / आँकड़ों की पर्याप्तता एवं निर्णय क्षमता, Educational Policies, Acts and Administration / शैक्षिक नीतियाँ, अधिनियम एवं प्रशासन, Vocabulary, Sentence Structure and Common Errors, मानव विकास / Human Development
  6. Digital Electronics / Boolean Logic: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation, Analog-Digital Conversion
  7. Operating Systems & Linux: Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Threads & Process Creation, Deadlock, Memory Management, Virtual Memory, File Management, Disc Scheduling, Unix OS, Linux OS, Distributed Systems, Windows OS
  8. Data Base Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, Relational Algebra, SQL, File Organization & Indexing, Transaction Management, Concurrency Control, Database Security & Authorization, Database Recovery, Data Warehousing & Mining
  9. Internet & Web Technologies: Website, Browser & Services, Internet Fundamentals, Web Design & Development, Protocols & Services, Web Publishing & Hosting, Server Side & Security, Emerging Technologies, HTML Basics, CSS, JavaScript-Basics, .Net Programming, Electronic Data Interchange and E-Commerce, XML, Ajax
  10. Computer Fundamentals, IT Basics & Architecture: Basics of COA, Cache Memory Organization, Input Output Organisation, Register Transfer and Microoperations, Control Unit Design, Programming the Basic Computer, Instr Formats & Modes, Floating Point Rep
  11. Python Language: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis
  12. Software Engineering: Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management, extras, Fundamentals of Systems and Information Systems
  13. Design & Analysis of Algorithms: Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Advanced Algorithms
  14. Mathematics - I, II, III, IV / गणित - I, II, III, IV: Permutation and Combination / क्रमचय और संचय, Logarithm / लघुगणक, Linear Algebra / रैखिक बीजगणित, Algebra / बीजगणित, Calculus / कलन, Trigonometry / त्रिकोणमिति, Vectors / सदिश, Set Theory, Functions, Relations, Propositional and Predicate Logic, Research Process Steps / शोध प्रक्रिया के चरण, Graph Theory, Sets, Relations, Functions and Discrete Mathematics / समुच्चय, संबंध, फलन और विविक्त गणित, Number Systems and Number Theory / संख्या पद्धति और संख्या सिद्धांत, Euclidean Geometry and Mensuration / यूक्लिडीय ज्यामिति और क्षेत्रमिति, Statistics and Probability / सांख्यिकी और प्रायिकता, Coordinate Geometry, Vectors and 3D Geometry / निर्देशांक ज्यामिति, सदिश और त्रिविमीय ज्यामिति, Polynomials, Equations and Complex Numbers / बहुपद, समीकरण और सम्मिश्र संख्याएँ, Plane Mensuration / समतल क्षेत्रमिति, Sampling / प्रतिचयन, Percentage / प्रतिशत, Simplification, Indices and Surds / सरलीकरण, घातांक और करणी, Ratio and Proportion / अनुपात और समानुपात
  15. Computer Graphics, Multimedia & Mobile Computing: Basics of Computer Graphics, 2-D Geometrical Transforms and Viewing, 3-D Object Representation, Geometric Transformations and Viewing, Multimedia
  16. AI & Emerging Trends: Emerging Trends and AI, Knowledge Representation, Natural Language Processing
  17. Society, Ethics and Cyber Laws: Society, Law & Ethics, Computer Software, डिजिटल समाज, नैतिकता और साइबर कानून / Digital Society, Ethics and Cyber Law, Digital India and Online Services, Culture, Socialisation and Social Control / संस्कृति, समाजीकरण और सामाजिक नियंत्रण
  18. Statistical Techniques / सांख्यिकीय तकनीकें: Probability / प्रायिकता, Statistics / सांख्यिकी, Average / औसत, Mixture and Alligation / मिश्रण और एलिगेशन, Simple and Compound Interest / साधारण और चक्रवृद्धि ब्याज, Solid Mensuration / घन क्षेत्रमिति, Number System / संख्या पद्धति, Age Problems / आयु संबंधी प्रश्न, Partnership / साझेदारी
  19. Interpolation - DI / अंतर्वेशन - DI: Data Interpretation / आँकड़ा निर्वचन
  20. Basis of Physics / भौतिकी का आधार: Scientific Achievements and Research / वैज्ञानिक उपलब्धियाँ और अनुसंधान, 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 / चुम्बकत्व, प्रेरण और प्रत्यावर्ती धारा, विद्युतचुम्बकीय तरंगें और विकिरण / Electromagnetic Waves and Radiation, Optics and Photonics / प्रकाशिकी और फोटोनिकी, Quantum Physics and Relativity / क्वांटम भौतिकी और आपेक्षिकता, Atoms, Nuclei and Astrophysics / परमाणु, नाभिक और खगोल भौतिकी, Solid State Physics and Electronics / ठोस अवस्था भौतिकी और इलेक्ट्रॉनिकी
  21. Business Studies and Management / व्यवसाय अध्ययन एवं प्रबंधन: Video Lectures, Business Communication / व्यावसायिक संचार, Principles and Functions of Management / प्रबंध के सिद्धांत एवं कार्य, Accounting Fundamentals and Recording of Transactions / लेखांकन के आधार एवं लेन-देनों का अभिलेखन, Depreciation, Final Accounts and Computerised Accounting / ह्रास, अंतिम खाते व कंप्यूटरीकृत लेखांकन, Knowledge Management & New Economy / ज्ञान प्रबंधन और नई अर्थव्यवस्था, Business Foundations and Entrepreneurship / व्यवसाय के आधार एवं उद्यमिता, Consumer Behaviour and Demand / उपभोक्ता व्यवहार एवं माँग, Internet and Web Services, Introduction to Economics / अर्थशास्त्र का परिचय, Production and Costs / उत्पादन एवं लागत, National Income Accounting / राष्ट्रीय आय लेखांकन, Determination of Income and Employment / आय एवं रोज़गार का निर्धारण, Public Finance and Government Budget / लोक वित्त एवं सरकारी बजट, Economic Growth and Development / आर्थिक संवृद्धि एवं विकास, भारतीय अर्थव्यवस्था / Indian Economy, Consumer Finance, Careers and Entrepreneurship / उपभोक्ता वित्त, करियर और उद्यमिता, Profit, Loss and Discount / लाभ, हानि और बट्टा, Special Accounts / विशेष लेखे, Partnership Accounts / साझेदारी लेखांकन, Company Accounts / कंपनी लेखांकन, Analysis of Financial Statements / वित्तीय विवरणों का विश्लेषण, Cost and Management Accounting / लागत एवं प्रबंध लेखांकन, अंकेक्षण / Auditing, Business Finance, Banking and Financial Markets / व्यावसायिक वित्त, बैंकिंग एवं वित्तीय बाज़ार, Business Law and Taxation / व्यावसायिक विधि एवं कराधान, Business Mathematics and Statistics / व्यावसायिक गणित एवं सांख्यिकी, Banking, Insurance and Financial Markets / बैंकिंग, बीमा एवं वित्तीय बाजार, Sentence Completion (Fill in the blanks)
  22. MIS / DSS / Expert Systems: Information Systems, MS Office Applications, Terms & Abbreviations
  23. E-Commerce: Volume - I, Volume - II
  24. Previous Year Paper:
  25. Full Mock Test:
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…