SShortSingh.
Back to feed

DDL vs DML in SQL: Understanding the Core Difference Between Structure and Data

0
·4 views

DDL (Data Definition Language) and DML (Data Manipulation Language) are two fundamental categories of SQL commands that serve distinct purposes. DDL commands such as CREATE, ALTER, DROP, TRUNCATE, and RENAME deal with the structure of database tables — defining, modifying, or removing them entirely. DML commands, including SELECT, INSERT, UPDATE, and DELETE, operate on the actual data stored within those tables without altering their structure. A key practical distinction is that DROP deletes an entire table along with its data, while TRUNCATE removes only the rows but preserves the table structure. In short, DDL shapes the container, while DML manages what goes inside it.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Fresh Cloud Servers Hit With Hundreds of Intrusion Attempts Within Minutes of Going Online

A developer rented three servers in Frankfurt, New York, and Singapore without registering them in DNS or sharing their addresses, then monitored unsolicited connection attempts for roughly 45 minutes per region. The first uninvited connection arrived just 48 seconds after the Singapore server booted, with Frankfurt and New York following shortly after. In total, the three servers logged 3,480 connection attempts from 860 unique IP addresses, including over 1,000 attempts using real login credentials. The most targeted port was telnet (port 23), reflecting persistent botnet activity aimed at IoT devices such as routers and cameras. The experiment, which cost under three cents, showed that any public IP address faces roughly 700 to 800 unsolicited connection attempts per hour simply by being reachable on the internet.

0
ProgrammingDEV Community ·

SQL Window Functions vs GROUP BY: Key Differences Every Beginner Should Know

Both GROUP BY and window functions help summarize data in SQL, but they behave differently in how they return results. GROUP BY collapses multiple rows into a single summary row per group, losing individual row details in the process. Window functions, by contrast, retain every original row while adding a new calculated column alongside each one. Functions like AVG() with OVER/PARTITION BY, RANK(), and LAG() allow comparisons and rankings without reducing the dataset. Knowing which tool to use depends on whether you need a condensed summary or per-row calculations with context.

0
ProgrammingDEV Community ·

How to Write Status Updates That Actually Help Teams Make Decisions

A post by Asael Shinder on DEV Community argues that most workplace status updates fail because they list completed tasks rather than answering what stakeholders truly need to know. Effective updates should convey three things: where the work stands against its deadline, what has changed since the last update, and what is needed from whom and by when. The author distinguishes between vague terms like 'blocked' and actionable ones, such as 'blocked on a decision from Marco by Wednesday.' Slippages should be communicated as soon as they are anticipated, not after they become unavoidable, so others can adjust their plans. A well-structured update, the author contends, can take three minutes to write yet eliminate the need for follow-up meetings entirely.

0
ProgrammingDEV Community ·

How to Stream n8n AI Workflows to React 19 Using Vercel AI SDK Without Buffering Issues

Developers integrating n8n (v2.38+) as an AI agent orchestrator with React 19 frontends face a streaming mismatch where reverse proxies like Nginx and Cloudflare buffer SSE chunks until a 4KB threshold, breaking real-time typewriter effects. A recommended fix involves placing a lightweight Next.js App Router edge route between the React client and the n8n webhook to normalize the stream using Vercel AI SDK's createDataStreamResponse utility. The edge route also forwards the client's abort signal to n8n, ensuring that when a user cancels a response, the upstream execution thread is properly terminated rather than left running and consuming LLM tokens. On the client side, the useChat hook from @ai-sdk/react binds directly to the edge API route, with React 19's concurrent rendering helping prevent UI hitching during rapid data bursts. The article notes that compute and multi-model API access used in the evaluation were sponsored by AI gateway provider b-lost.com.