← Back to MySQL Course | Chapter 1: Introduction & Basics | Lesson 1 of 8

MySQL RDBMS

एक relational database data को rows और columns की structured tables में organize करता है, और एक RDBMS वह software है, जैसे MySQL, जो उन tables और उनके बीच के relationships को बनाता और manage करता है।

एक Relational Database क्या है?

एक relational database data को rows और columns से बनी structured tables में organize करता है, और एक relational database management system, या RDBMS, वह software है जो उन tables को बनाता, store करता है, और आपको SQL इस्तेमाल करके उन्हें query करने देता है।

उदाहरण: What is a Relational Database?

sql
CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50));
SELECT * FROM users;

Tables, Rows, और Columns

किसी relational database की हर table columns से बनी होती है, जो define करते हैं कि किस तरह का data store हो सकता है (जैसे एक name या email address), और rows, जहाँ हर row हर column के लिए एक value से बना एक पूरा record represent करता है।

उदाहरण: Tables, Rows, and Columns

sql
CREATE TABLE contacts (
  name VARCHAR(50),
  email VARCHAR(100)
);
INSERT INTO contacts VALUES ('Priya', '[email protected]');

Primary Keys और Relationships

एक primary key किसी table की हर row को uniquely identify करती है, और एक table में एक foreign key दूसरी table में एक primary key को reference कर सकती है, जो है कि एक relational database अलग-अलग तरह के data के बीच relationships, जैसे customers और उनके orders, कैसे model करता है।

उदाहरण: Primary Keys and Relationships

sql
CREATE TABLE authors (id INT PRIMARY KEY, name VARCHAR(50));
CREATE TABLE books (
  id INT PRIMARY KEY,
  title VARCHAR(100),
  author_id INT,
  FOREIGN KEY (author_id) REFERENCES authors(id)
);

RDBMS बनाम दूसरे Database Types

एक RDBMS tables के बीच एक fixed table structure और strict relationships enforce करता है, जो non-relational (NoSQL) databases से अलग है जो अक्सर बिना predefined columns या formal relationships के flexible, schema-less documents store करती हैं।

उदाहरण: RDBMS vs Other Database Types

sql
CREATE TABLE orders (
  id INT PRIMARY KEY,
  customer_id INT NOT NULL,
  total DECIMAL(10,2) NOT NULL
);

Popular RDBMS Systems

MySQL PostgreSQL, Microsoft SQL Server, और Oracle Database के साथ-साथ कई popular RDBMS products में से एक है, और जबकि हर एक same core relational concepts implement करता है, उनका exact SQL syntax और available features अलग हो सकते हैं।

उदाहरण: Popular RDBMS Systems

sql
-- MySQL, PostgreSQL, SQL Server, and Oracle all implement core relational concepts
SELECT VERSION();

⚠️ This is MySQL-specific syntax. It cannot run in the browser editor. Practice this on your local MySQL installation.

Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. हर order row में किसी customer का पूरा address जैसा repeated data store करना, जबकि एक key से linked एक अलग table duplication से बचाती है।
  2. बिना PRIMARY KEY के एक table बनाना, ताकि rows को uniquely identify या दूसरी tables से reliably reference न किया जा सके।
  3. एक relational database को एक spreadsheet की तरह treat करना और एक cell में कई values डालना, जैसे 'red,blue', related rows इस्तेमाल करने के बजाय।
🔒

Chapter Quiz — Complete all 8 topics to unlock

0/8 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.