MySQL & Python Skills Guide for IT Recruiters
MySQL Definitions
DDL (Data Definition Language): Commands that define the structure of a database.
- Examples: CREATE, ALTER, DROP
- CREATE TABLE employees (id INT, name VARCHAR(50));
DML (Data Manipulation Language): Commands that manage data inside tables.
- Examples: SELECT, INSERT, UPDATE, DELETE
- INSERT INTO employees VALUES (1, 'Arun');
DCL (Data Control Language): Commands that control access to the database.
- Examples: GRANT, REVOKE
- GRANT SELECT ON db_name TO 'user1';
TCL (Transaction Control Language): Commands that manage database transactions.
- Examples: COMMIT, ROLLBACK, SAVEPOINT
- BEGIN; UPDATE salary SET amount = 50000; COMMIT;
SQL Joins (Complete Guide)
1. INNER JOIN: Returns records that have matching values in both tables.
- SELECT employees.name, departments.dept_name FROM employees
INNER JOIN departments ON employees.dept_id = departments.id;
2. LEFT JOIN (or LEFT OUTER JOIN): Returns all records from the left table, and matched records from the right tab
- SELECT e.name, d.dept_name FROM employees e
LEFT JOIN departments d ON e.dept_id = d.id;
3. RIGHT JOIN (or RIGHT OUTER JOIN): Returns all records from the right table, and matched records from the left
- SELECT e.name, d.dept_name FROM employees e
RIGHT JOIN departments d ON e.dept_id = d.id;
4. FULL JOIN (or FULL OUTER JOIN): Returns all records when there is a match in either left or right table.
MySQL & Python Skills Guide for IT Recruiters
- Not supported directly in MySQL, but can be simulated using UNION.
- (SELECT ... FROM A LEFT JOIN B ...) UNION (SELECT ... FROM A RIGHT JOIN B ...)
MySQL & Python Skills Guide for IT Recruiters
Python Core Skills (Recap)
Variables & Data Types - e.g., name = 'Aravind', age = 25
Conditions & Loops - e.g., if age > 18:, for i in range(5):
Functions - e.g., def greet(): print('Hello')
Data Structures - e.g., list = [1,2,3], dict = {'id':1, 'name':'Aravind'}
Exception Handling - e.g., try: ... except:
File Handling - e.g., open('file.txt', 'r')
Libraries - pandas, numpy - e.g., import pandas as pd
OOP - class Employee: pass
MySQL & Python Skills Guide for IT Recruiters