Practice end-to-end flight booking for automation testing: log in, search flights, pick a flight and seats, enter passenger details and pay with dummy test data. Every element has a stable id and data-testid for Selenium and Playwright practice.
Dummy Ticket Booking Website
SkyTrip practice airline: a safe, fake booking flow for automation testing. No real flights or payments.
Signed in as Test User
1Search
2Select flight
3Passengers
4Seats
5Payment
6Confirmation
Select your flight
Choose your seats
Pick a seat for each traveller on each flight. Infants sit on an adult’s lap.
FreeExtra legroom ₹800OccupiedSelected travellerYour other travellers
The is_selected() method in Selenium is used to check whether a web element, such as a checkbox, radio button, or option in a dropdown, is currently selected or not. It returns True if the element is selected and False if it is not.
IntermediateLesson 68 of 697 min read5 queries run on MySQL 8.4
REVOKE is the opposite of GRANT: it takes privileges away from an account or role. You need it when someone changes team, when an application no longer needs write access, or after an audit finds an account with too much power. The privileges are removed immediately.
IntermediateLesson 67 of 6910 min read7 queries run on MySQL 8.4
GRANT gives an account (or a role) permission to do something: read a table, insert rows, create tables, run a procedure. It is the core of DCL (Data Control Language). Granting exactly what each account needs, and nothing more, is the most effective database security measure you can take.
In this lesson
Grant privileges at global, database, table and column level
mysql> CREATE USER 'hr_assistant'@'localhost' IDENTIFIED BY 'Hr
Query OK, 0 rows affected
mysql> GRANT SELECT (emp_id, first_name, last_name, dept_id, job_title) ON co…
Query OK, 0 rows affected
mysql> GRANT UPDATE (job_title) ON company.employees TO 'hr_assistant'@'local…
Query OK, 0 rows affected
mysql> SHOW GRANTS FOR 'hr_assistant'@'localhost'
Grants for hr_assistant@localhost
GRANT USAGE ON *.* TO `hr_assistant`@`localhost`
GRANT SELECT (`dept_id`, `emp_id`, `first_name`, `job_title`, `last_name`), UPDATE (`job_title`) ON `company`.`employees` TO `hr_assistant`@`localhost`
2 rows in set
How this query works, step by step
SELECT (columns) allows reading only the listed columns; SELECT salary FROM employees would fail for this account.
UPDATE (job_title) allows changing that one column only.
Security through views
Column grants cannot filter rows. A view can: give a regional manager only Mumbai employees:
WITH GRANT OPTION lets the account pass its own privileges on to others. Give it only to administrators.
GRANT ALL PRIVILEGES ON company.* TO ... gives every database-level privilege, including DROP. Convenient for a developer’s own test database, dangerous for an application account.
mysql> CREATE USER 'team_lead'@'localhost' IDENTIFIED BY 'L3ad
Query OK, 0 rows affected
mysql> GRANT ALL PRIVILEGES ON company.* TO 'team_lead'@'localhost' WITH GRAN…
Query OK, 0 rows affected
mysql> SHOW GRANTS FOR 'team_lead'@'localhost'
Grants for team_lead@localhost
GRANT USAGE ON *.* TO `team_lead`@`localhost`
GRANT ALL PRIVILEGES ON `company`.* TO `team_lead`@`localhost` WITH GRANT OPTION
2 rows in set
Errors
Granting on an account that does not exist fails in MySQL 8 (older versions silently created it):
MySQL
GRANTSELECTONcompany.*TO'ghost'@'localhost';
ResultMySQL 8.4
ERROR 1410 (42000): You are not allowed to create a user with GRANT
Quick quiz
1. What does ON company.* mean?
db.* is the database level.
2. How do you let an account read only some columns of a table?
Column privileges list the columns in parentheses.
3. Which tool restricts which rows an account can see?
Grant SELECT on the view instead of the table.
4. What does WITH GRANT OPTION allow?
Give it only to trusted administrators.
GRANT FAQ
What is the GRANT command in SQL?
A Data Control Language statement that gives privileges, such as SELECT or INSERT, on databases, tables, columns or routines to accounts or roles.
How do I see the privileges of a MySQL user?
SHOW GRANTS FOR 'user'@'host'; For your own account, SHOW GRANTS;.
Do I need FLUSH PRIVILEGES after GRANT?
No. GRANT, REVOKE, CREATE USER and similar statements take effect immediately. FLUSH PRIVILEGES is only needed after editing the grant tables directly, which you should not do.
SQL Tutorial › Database Design › DROP TABLE & DATABASE
SQL DROP TABLE and DROP DATABASE
BeginnerLesson 58 of 697 min read7 queries run on MySQL 8.4
DROP removes a database object completely: the table’s structure, data, indexes and triggers, or a whole database with every table in it. It is instant and cannot be undone with ROLLBACK, so it is the one command where a typo hurts most. This lesson shows how to drop safely.
In this lesson
Remove a table with DROP TABLE
Make scripts re-runnable with IF EXISTS
Drop tables that are referenced by foreign keys
Drop a database, and compare DROP, TRUNCATE and DELETE
order_items references orders, and orders references customers.
Dropping in child-to-parent order satisfies every foreign key.
The three tables are gone; departments, employees and products remain.
Watch out
You may see scripts that run SET FOREIGN_KEY_CHECKS = 0; to drop tables in any order. That also lets broken data in, so use it only in throw-away development databases and switch it back on immediately.