Skip to content

VIJAYAPANDIANT/Elevate-Labs-SQL-Task1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Elevate Labs - SQL Task 1

Welcome to SQL Task 1 of my Elevate Labs internship! This project demonstrates my ability to set up a SQL environment and perform fundamental database operations, including schema definition and data manipulation.

🎯 Task Objective

The primary goal of this task is to:

  • Initialize: Create and configure a local SQL database.
  • Define Schema: Design a robust table structure for student data.
  • Populate: Insert sample records to ensure data integrity.
  • Query: Perform basic CRUD-style operations to retrieve and filter information.

πŸ› οΈ Prerequisites

To successfully run the scripts in this project, ensure you have the following:

  • SQL Server: MySQL, MariaDB, or any compatible SQL engine.
  • SQL Client: A command-line interface (CLI) or a graphical tool like MySQL Workbench.

πŸ—οΈ Database Schema

The project focuses on a centralized students table designed to store essential academic information.

students Table Structure

Column Name Data Type Description
πŸ”‘ id INT Primary Key, Auto-incremented
πŸ‘€ name VARCHAR(50) Full name of the student
πŸ“§ email VARCHAR(100) Unique email address of the student
πŸ“… age INT Age of the student

πŸ“– How to Use

Follow these steps to initialize and test the database:

  1. Start Server: Ensure your SQL server instance is running.
  2. Connect: Use your preferred SQL client to connect to the server.
  3. Execute Script: Open and run the task1.sql file.
    source path/to/task1.sql;
  4. Verify: Check the output to ensure the task1 database and students table are correctly created and populated.

πŸ” Key Operations Included

The task1.sql script includes several essential SQL operations:

1. Database Initialization

CREATE DATABASE task1;
USE task1;

2. Table Definition

CREATE TABLE students (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(50),
    email VARCHAR(100),
    age INT
);

3. Data Retrieval & Filtering

  • All Data: SELECT * FROM students;
  • Specific Columns: SELECT name, email FROM students;
  • Conditional Search: SELECT * FROM students WHERE age > 20;

Tip

Always ensure you are using the correct database context (USE task1;) before running subsequent queries to avoid errors.


Submitted by: Vijayapandian T | Elevate Labs SQL Internship Task 1

About

SQL Task 1 for Elevate Labs Internship: Implementation of core database setup, schema definition, and fundamental CRUD operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors