MySQL Introduction
In this page:
MySQL क्या है?
MySQL एक open-source relational database management system है जो structured data को tables में store करता है और applications को इसे reliably scale पर query करने देता है। यह modern web के एक बड़े हिस्से को underpin करता है क्योंकि यह fast, free, और रोज़ लाखों records handle करने वाली companies द्वारा battle-tested है।
उदाहरण: What is MySQL?
SELECT VERSION();
एक Relational Database क्या है?
एक relational database data को rows और columns से बनी tables में organize करता है, एक spreadsheet जैसा, लेकिन keys के through tables के बीच relationships के crucial addition के साथ। यह structure duplicate data रोकता है और आपको एक single query में कई tables से information combine करने देता है।
उदाहरण: What is a Relational Database?
CREATE TABLE departments (id INT PRIMARY KEY, name VARCHAR(50));
CREATE TABLE employees (
id INT PRIMARY KEY,
dept_id INT,
FOREIGN KEY (dept_id) REFERENCES departments(id)
);
SQL और MySQL
SQL (Structured Query Language) relational databases से बात करने के लिए standard language है, जबकि MySQL वह actual server software है जो आपके SQL को parse और execute करता है। यहाँ SQL सीखने का मतलब है कि skill सीधे PostgreSQL, SQL Server, और दूसरे relational systems में transfer होती है।
उदाहरण: SQL and MySQL
SELECT 1 + 1; -- SQL is the language; MySQL is the server executing it
MySQL क्यों चुनें?
MySQL का open-source license का मतलब है कि आप इसे licensing fees के बिना production में चला सकते हैं, और इसका cross-platform support (Linux, Windows, macOS) इसे नए projects के लिए एक safe default choice बनाता है। इसकी maturity का मतलब extensive documentation और community troubleshooting help भी है।
उदाहरण: Why Choose MySQL?
-- MySQL is free, open-source, and runs on Linux, Windows, and macOS
SELECT 'MySQL runs here' AS platform_note;
आपके पहले SQL Commands
आपका type किया हर SQL statement एक instruction है जिसे MySQL parse और execute करता है, और trailing semicolon server को बताता है कि एक statement कहाँ खत्म होता है और अगला कहाँ शुरू होता है। इसे भूल जाना कई commands को chain करते समय सबसे common beginner mistakes में से एक है।
उदाहरण: Your First SQL Commands
SELECT 'Hello, MySQL!';
- यह मान लेना कि MySQL और SQL same चीज़ हैं, जबकि SQL language है और MySQL इसे समझने वाला एक database system है।
- यह भूल जाना कि किसी query चलाने से पहले एक MySQL server चलना चाहिए और आपको इससे connect करना चाहिए।
- किसी table को spreadsheet की तरह treat करना और बिना
ORDER BYके rows को एक fixed order में वापस आने की उम्मीद करना।
Chapter Quiz — Complete all 8 topics to unlock
0/8 topics done
Complete these topics first: