• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 7 páginas
Otro

Common Database Operations: CRUD and Beyond

Document preview thumbnail
Vista previa 2 fuera de 7 páginas

This document explains common database operations, including CRUD (Create, Read, Update, Delete), and other essential tasks like indexing and joins. It covers how these operations are used to manage and manipulate data in both relational and NoSQL databases.

Vista previa del contenido

Common Database Operations
Database operations can be broadly categorized into two main groups: Data
Definition Operations and Data Manipulation Operations. Let’s break them
down:



1. Data Definition Operations
These operations define and modify the structure of the database. They include:

a. CREATE

 The CREATE operation is used to define a new database object, such as a
table, view, index, or database itself.
 SQL Example:

CREATE TABLE Employees (
ID INT PRIMARY KEY,
Name VARCHAR(100),
Age INT,
Department VARCHAR(50)
);

b. ALTER

 The ALTER command modifies an existing database object, such as adding,
deleting, or modifying columns in a table.
 SQL Example:

ALTER TABLE Employees ADD COLUMN Salary DECIMAL(10, 2);

c. DROP

 The DROP operation removes a database object, such as a table, index, or
view, and permanently deletes its data.
 SQL Example:

, DROP TABLE Employees;

d. TRUNCATE

 The TRUNCATE operation removes all rows from a table but does not
remove the table structure itself. It is faster than DELETE as it does not log
individual row deletions.
 SQL Example:

TRUNCATE TABLE Employees;


2. Data Manipulation Operations
These operations deal with the actual data inside the database and include:

a. SELECT

 The SELECT statement is used to retrieve data from one or more tables.
 SQL Example:

SELECT Name, Age FROM Employees WHERE Department = 'HR';

b. INSERT

 The INSERT operation adds new records (rows) into a table.
 SQL Example:

INSERT INTO Employees (ID, Name, Age, Department)
VALUES (1, 'Alice', 30, 'HR');

c. UPDATE

 The UPDATE operation modifies existing records in a table.
 SQL Example:

UPDATE Employees
SET Age = 31
WHERE ID = 1;

Información del documento

Subido en
29 de enero de 2025
Número de páginas
7
Escrito en
2024/2025
Tipo
Otro
Personaje
Desconocido
$5.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
252
Última venta
-




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes