Skip to content

Mindful-AI-Assistants/No-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


🛢️ NoSQL: Building Databases in Practice (Not Only SQL)



Sponsor Mindful AI Assistants



Automation Workflow



Developed during the 3rd semester of the Data Science and Humanistic Artificial Intelligence undergraduate program at PUC-SP (2025)

Under the guidance of Professor Doutor Daniel Gatti.


This project explores the fundamentals and practical applications of NoSQL (Not Only SQL) databases, showcasing the construction and management of databases using various database systems, including:


MySQL - Certificate
SQL Server - Certificate
T-SQL - Certificate
Redis MongoDB - Certificate
SQL on Linux - Certificate
Oracle - Certificate


Through this comprehensive guide, you will understand how to define, manipulate, and query data using SQL and NoSQL techniques, alongside practical examples.


🗄️ SQL Language Breakdown


The SQL language is divided into three main components:

  1. Data Definition Language (DDL)
    • Defines database schema and structures.
    • Examples: CREATE TABLE, ALTER TABLE, DROP TABLE.

  1. Data Manipulation Language (DML)
    • Manages data within schema objects.
    • Examples: INSERT, UPDATE, DELETE.

  1. Data Query Language (DQL)
    • Retrieves data from databases.
    • Example: SELECT.

✍️ Practical Examples

📋 DDL – Data Definition Language

CREATE TABLE Person (
    ID INT PRIMARY KEY,
    Name VARCHAR(100) NOT NULL,
    Age INT,
    Email VARCHAR(150) UNIQUE
);

ALTER TABLE Person ADD Telefone VARCHAR(15);

DROP TABLE Person;

🛠️ DML – Data Manipulation Language


INSERT INTO Person (ID, Name, Age, Email)
VALUES (1, 'Maria Silva', 30, 'maria.silva@example.com');

UPDATE Peson
SET Age = 31
WHERE ID = 1;

🔍 DQL – Data Query Language


SELECT Name, Email
FROM Person
WHERE Age > 25;

⚙️ Advanced SQL Concepts

CREATE TABLE Sale (
NumCliente INT NOT NULL IDENTITY(1,1),
CPF INT NOT NULL,
CONSTRAINT pkClient PRIMARY KEY (NumClient))

ALTER TABLE Perspn
ADD CONSTRAINT ckIdade CHECK (Age <= 100);

CREATE TABLE Produtos (
    ProdutoID INT IDENTITY(1,1) PRIMARY KEY,
    NomeProduto VARCHAR(100) NOT NULL
);

🍃 NoSQL – MongoDB Example

Examplea

// Inserting a single document
db.usuarios.insertOne({
    name: "João Silva",
    age: 28,
    email: "joao.silva@example.com"
});

// Inserting multiple documents
db.usuarios.insertMany([
    { name: "Ana Souza", age: 24, email: "ana.souza@example.com" },
    { name: "Carlos Lima", age: 35, email: "carlos.lima@example.com" }
]);

// Find users older than 25
db.usuarios.find({ age: { $gt: 25 } });

// Find user by email
db.usuarios.findOne({ email: "ana.souza@example.com" });

// Update user age
db.usuarios.updateOne(
    { name: "João Silva" },
    { $set: { idade: 29 } }
);

// Delete user
db.usuarios.deleteOne({ name: "Carlos Lima" });

🙌 Acknowledgements

Special thanks to Professor Daniel Gatti for guidance throughout this project.


Feel Free to Reach Out:


🛸๋ My Contacts Hub




────────────── ⊹🔭๋ ──────────────

➣➢➤ Back to Top

Copyright 2025 Mindful-AI-Assistants. Code released under the MIT license.