- Polymorphism: Method overloading (not directly supported in Python as in C++/Java, but achieved through default arguments or variable arguments) and method overriding.
- Encapsulation and Data Hiding: Using private and protected members (conventionally).
- Stacks: LIFO principle, push, pop operations.
- Queues: FIFO principle, enqueue, dequeue operations.
- Connecting to a Database: Using
mysql.connectoror similar modules. - Executing SQL Queries:
CREATE,INSERT,SELECT,UPDATE,DELETE.
- Database Fundamentals:
- Database: An organized collection of interrelated data.
- DBMS (Database Management System): Software for managing databases (e.g., MySQL).
- RDBMS (Relational Database Management System): A type of DBMS where data is organized into tables (relations).
- Tables (Relations): Basic units of storage, composed of rows and columns.
- Rows (Tuples/Records): Individual entries in a table.
- Columns (Attributes/Fields): Define the type of data stored in a table.
- Database: An organized collection of interrelated data.
- Keys:
- Primary Key: Uniquely identifies each row in a table; cannot be NULL or duplicated.
- Candidate Key: Any attribute or set of attributes that can uniquely identify a row.
- Alternate Key: A candidate key that is not chosen as the primary key.
- Foreign Key: A column in one table that refers to the primary key of another table, establishing relationships.
- Primary Key: Uniquely identifies each row in a table; cannot be NULL or duplicated.
- Data Integrity:Concepts like data redundancy (duplication) and data inconsistency (mismatched data).
- DDL (Data Definition Language):Used for defining database structures.
CREATE DATABASE: To create a new database.CREATE TABLE: To create a new table with specified columns and data types.ALTER TABLE: To modify table structure (add/delete columns, change data types).DROP TABLE: To delete a table.
- DML (Data Manipulation Language):Used for manipulating data within tables.
INSERT INTO: To add new rows to a table.SELECT: To retrieve data from tables, including use ofWHEREclause for filtering,ORDER BYfor sorting, and aggregate functions (e.g.,COUNT,SUM,AVG,MIN,MAX).UPDATE: To modify existing data in a table.DELETE FROM: To remove rows from a table.
- Constraints:Rules applied to columns to maintain data integrity (e.g.,
NOT NULL,UNIQUE,PRIMARY KEY,FOREIGN KEY). - MySQL Data Types:Understanding various data types for numbers (e.g.,
INT,FLOAT), strings (e.g.,VARCHAR,CHAR), and dates/times.