100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten
logo-home
Common Database Operations: CRUD and Beyond $4.99
In winkelwagen

Overig

Common Database Operations: CRUD and Beyond

 0 keer verkocht

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.

Voorbeeld 2 van de 7  pagina's

  • 29 januari 2025
  • 7
  • 2024/2025
  • Overig
  • Onbekend
Alle documenten voor dit vak (249)
avatar-seller
rileyclover179
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;

Dit zijn jouw voordelen als je samenvattingen koopt bij Stuvia:

Bewezen kwaliteit door reviews

Bewezen kwaliteit door reviews

Studenten hebben al meer dan 850.000 samenvattingen beoordeeld. Zo weet jij zeker dat je de beste keuze maakt!

In een paar klikken geregeld

In een paar klikken geregeld

Geen gedoe — betaal gewoon eenmalig met iDeal, creditcard of je Stuvia-tegoed en je bent klaar. Geen abonnement nodig.

Direct to-the-point

Direct to-the-point

Studenten maken samenvattingen voor studenten. Dat betekent: actuele inhoud waar jij écht wat aan hebt. Geen overbodige details!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper rileyclover179. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor $4.99. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 66456 samenvattingen verkocht

Opgericht in 2010, al 15 jaar dé plek om samenvattingen te kopen

Begin nu gratis
$4.99
  • (0)
In winkelwagen
Toegevoegd