Skip to content

Commit 7fdbca6

Browse files
Merge branch 'CodeHarborHub:main' into main
2 parents cb9fe22 + 6e6741e commit 7fdbca6

File tree

107 files changed

+13073
-2740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+13073
-2740
lines changed

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ body:
1111
options:
1212
- label: I have searched the existing issues
1313
required: true
14+
1415
- type: textarea
1516
id: issue-description
1617
attributes:
@@ -19,6 +20,7 @@ body:
1920
placeholder: Describe the improvement or correction you'd like to see in the documentation.
2021
validations:
2122
required: true
23+
2224
- type: textarea
2325
id: suggested-change
2426
attributes:
@@ -27,14 +29,16 @@ body:
2729
placeholder: Explain how the documentation should be updated or corrected.
2830
validations:
2931
required: true
32+
3033
- type: textarea
3134
id: rationale
3235
attributes:
3336
label: Rationale
3437
description: Why is this documentation update necessary or beneficial?
3538
placeholder: Explain the importance or reasoning behind the suggested change.
3639
validations:
37-
required: False
40+
required: false
41+
3842
- type: dropdown
3943
id: urgency
4044
attributes:
@@ -47,14 +51,34 @@ body:
4751
default: 0
4852
validations:
4953
required: true
54+
5055
- type: checkboxes
5156
id: terms
5257
attributes:
53-
label: Record
58+
label: Acknowledgements
59+
description: Ensure you have read and agree to the project's guidelines.
5460
options:
55-
- label: "I have read the Contributing Guidelines"
61+
- label: I have read the Contributing Guidelines
5662
required: true
57-
- label: "I'm a GSSOC'24 contributor"
63+
- label: I'm a GSSOC'24 contributor
5864
required: false
59-
- label: "I have starred the repository"
65+
- label: I have starred the repository
66+
required: true
67+
- label: I have read and followed the Contribution Guidelines
68+
required: true
69+
- label: I have followed the code style guidelines of this project
70+
required: true
71+
- label: I have checked for any existing open issues that my pull request may address
72+
required: true
73+
- label: I have ensured that my changes do not break any existing functionality
74+
required: true
75+
- label: Each contributor is allowed to create a maximum of 4 issues per day. This helps us manage and address issues efficiently
76+
required: true
77+
- label: I have read the resources for guidance listed below
78+
required: true
79+
- label: I have not used AI-generated content (e.g., ChatGPT, other AI tools)
80+
required: true
81+
- label: I have not used content from existing sites (e.g., text, images)
82+
required: true
83+
- label: I have followed all security rules and only shared trusted resources
6084
required: true

.github/workflows/issue_creation_workflow.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [opened]
66

77
jobs:
8-
check-contributor-issues:
8+
check-issue:
99
runs-on: ubuntu-latest
1010

1111
steps:
@@ -17,24 +17,33 @@ jobs:
1717
with:
1818
node-version: '14'
1919

20-
- name: Retrieve Contributors
20+
- name: Retrieve Contributor's Open Issues
21+
id: retrieve-issues
2122
run: |
22-
CONTRIBUTORS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/contributors | jq -r '.[].login')
23-
echo "::set-output name=contributors::$CONTRIBUTORS"
24-
25-
- name: Count Open Issues for Each Contributor
26-
id: count-issues
27-
run: |
28-
for contributor in ${{ steps.retrieve-contributors.outputs.contributors }}; do
29-
ISSUE_COUNT=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/search/issues?q=is:open+author:${contributor}+repo:${{ github.repository }}" | jq -r '.total_count')
30-
echo "::set-output name=${contributor}_issue_count::$ISSUE_COUNT"
31-
done
23+
ISSUE_COUNT=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/search/issues?q=is:open+author:${{ github.event.issue.user.login }}+repo:${{ github.repository }}" | jq -r '.total_count')
24+
echo "::set-output name=issue_count::$ISSUE_COUNT"
3225
3326
- name: Check Contributor's Open Issues Count
3427
run: |
35-
contributor=${{ github.event.issue.user.login }}
36-
issue_count=${{ steps.count-issues.outputs["${contributor}_issue_count"] }}
28+
issue_count=${{ steps.retrieve-issues.outputs.issue_count }}
3729
if [ "$issue_count" -ge 4 ]; then
38-
echo "Contributor $contributor has $issue_count open issues. Please complete your existing open issues before creating a new one."
30+
echo "Contributor ${{ github.event.issue.user.login }} has $issue_count open issues. Please complete your existing open issues before creating a new one."
31+
exit 1
32+
fi
33+
34+
- name: Validate Issue Content
35+
id: validate-issue
36+
run: |
37+
issue_body="${{ github.event.issue.body }}"
38+
if [[ "$issue_body" == *"AI-generated content"* ]] || [[ "$issue_body" == *"existing sites"* ]]; then
39+
echo "Issue body contains disallowed content."
40+
exit 1
41+
fi
42+
43+
- name: Check for Security and Trust
44+
run: |
45+
issue_body="${{ github.event.issue.body }}"
46+
if [[ "$issue_body" != *"security"* ]] || [[ "$issue_body" != *"trust"* ]]; then
47+
echo "Issue does not mention security or trust."
3948
exit 1
4049
fi
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: PR Creation Workflow
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited]
6+
7+
jobs:
8+
check-pr:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '14'
19+
20+
- name: Validate PR Description
21+
id: validate-pr
22+
run: |
23+
pr_body="${{ github.event.pull_request.body }}"
24+
required_checkboxes=(
25+
"I have performed a self-review of my code."
26+
"I have read and followed the Contribution Guidelines."
27+
"I have tested the changes thoroughly before submitting this pull request."
28+
"I have provided relevant issue numbers, screenshots, and videos after making the changes."
29+
"I have commented my code, particularly in hard-to-understand areas."
30+
"I have followed the code style guidelines of this project."
31+
"I have checked for any existing open issues that my pull request may address."
32+
"I have ensured that my changes do not break any existing functionality."
33+
"Each contributor is allowed to create a maximum of 4 issues per day. This helps us manage and address issues efficiently."
34+
"I have read the resources for guidance listed below."
35+
"I have not used AI-generated content (e.g., ChatGPT, other AI tools)."
36+
"I have not used content from existing sites (e.g., text, images)."
37+
"I have followed all security rules and only shared trusted resources."
38+
)
39+
for checkbox in "${required_checkboxes[@]}"; do
40+
if [[ "$pr_body" != *"$checkbox"* ]]; then
41+
echo "Missing required checkbox: $checkbox"
42+
exit 1
43+
fi
44+
done
45+
46+
- name: Retrieve Contributors
47+
run: |
48+
CONTRIBUTORS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/contributors | jq -r '.[].login')
49+
echo "::set-output name=contributors::$CONTRIBUTORS"
50+
51+
- name: Count Open Issues for Each Contributor
52+
id: count-issues
53+
run: |
54+
for contributor in ${{ steps.retrieve-contributors.outputs.contributors }}; do
55+
ISSUE_COUNT=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/search/issues?q=is:open+author:${contributor}+repo:${{ github.repository }}" | jq -r '.total_count')
56+
echo "::set-output name=${contributor}_issue_count::$ISSUE_COUNT"
57+
done
58+
59+
- name: Check Contributor's Open Issues Count
60+
run: |
61+
contributor=${{ github.event.pull_request.user.login }}
62+
issue_count=${{ steps.count-issues.outputs["${contributor}_issue_count"] }}
63+
if [ "$issue_count" -ge 4 ]; then
64+
echo "Contributor $contributor has $issue_count open issues. Please complete your existing open issues before creating a new one."
65+
exit 1
66+
fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Now, resolve your all doubts and communicate with our all contributors.
2929

3030
## Getting Started
3131

32-
⚠ new update: Read carefully👉 https://github.com/CodeHarborHub/codeharborhub.github.io/discussions/1028
32+
new update: Read carefully👉 https://github.com/CodeHarborHub/codeharborhub.github.io/discussions/1028
3333

3434
To get started with contributing to CodeHarborHub, please refer to our [Contributing Guidelines](CONTRIBUTING.md).
3535

blog/authors.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ ajay-dhangar_2020:
2121
url: https://github.com/ajay-dhangar
2222
image_url: https://avatars.githubusercontent.com/u/99037494?v=4
2323

24+
hitesh-gahanolia:
25+
name: Hitesh Gahanolia
26+
tile: Final Year Student At MNNIT ALLAHABAD
27+
url: https://github.com/Hitesh4278
28+
image_url: https://avatars.githubusercontent.com/u/97452642?v=4
29+
2430
abhijith-m-s:
2531
name: Abhijith M S
2632
title: Full Stack Developer

blog/sql.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: 'SQL'
3+
sidebar_label: SQL - Structured Query Language
4+
authors: [hitesh-gahanolia]
5+
tags: [sql , databases , data]
6+
date: 2024-06-12 5:17
7+
hide_table_of_contents: true
8+
---
9+
10+
Structured query language (SQL) is a programming language for storing and processing information in a relational database. A relational database stores information in tabular form, with rows and columns representing different data attributes and the various relationships between the data values. You can use SQL statements to store, update, remove, search, and retrieve information from the database. You can also use SQL to maintain and optimize database performance.
11+
12+
## Why is SQL important?
13+
14+
Structured query language (SQL) is a popular query language that is frequently used in all types of applications. Data analysts and developers learn and use SQL because it integrates well with different programming languages. For example, they can embed SQL queries with the Java programming language to build high-performing data processing applications with major SQL database systems such as Oracle or MS SQL Server. SQL is also fairly easy to learn as it uses common English keywords in its statements
15+
16+
### History
17+
SQL was invented in the 1970s based on the relational data model. It was initially known as the structured English query language (SEQUEL). The term was later shortened to SQL. Oracle, formerly known as Relational Software, became the first vendor to offer a commercial SQL relational database management system.
18+
19+
20+
## Process of SQL
21+
When we are executing the command of SQL on any Relational database management system, then the system automatically finds the best routine to carry out our request, and the SQL engine determines how to interpret that particular command.
22+
23+
Structured Query Language contains the following four components in its process:
24+
- Query Dispatcher
25+
- Optimization Engines
26+
- Classic Query Engine
27+
- SQL Query Engine, etc.
28+
29+
A classic query engine allows data professionals and users to maintain non-SQL queries. The architecture of SQL is shown in the following diagram:
30+
![image](https://static.javatpoint.com/sqlpages/images/sql-process.png)
31+
32+
## What are the components of a SQL system?
33+
Relational database management systems use structured query language (SQL) to store and manage data. The system stores multiple database tables that relate to each other. MS SQL Server, MySQL, or MS Access are examples of relational database management systems. The following are the components of such a system.
34+
35+
### SQL table
36+
A SQL table is the basic element of a relational database. The SQL database table consists of rows and columns. Database engineers create relationships between multiple database tables to optimize data storage space.
37+
38+
For example, the database engineer creates a SQL table for products in a store:
39+
![image](https://media.geeksforgeeks.org/wp-content/uploads/20230405171604/Screenshot-from-2023-04-05-17-15-53.png)
40+
41+
42+
### SQL statements
43+
SQL statements, or SQL queries, are valid instructions that relational database management systems understand. Software developers build SQL statements by using different SQL language elements. SQL language elements are components such as identifiers, variables, and search conditions that form a correct SQL statement.
44+
45+
For example, the following SQL statement uses a SQL INSERT command to store Mattress Brand A, priced $499, into a table named Mattress_table, with column names brand_name and cost:
46+
47+
INSERT INTO Mattress_table (brand_name, cost)
48+
49+
`VALUES(‘A’,’499’);`
50+
51+
### Stored procedures
52+
Stored procedures are a collection of one or more SQL statements stored in the relational database. Software developers use stored procedures to improve efficiency and performance. For example, they can create a stored procedure for updating sales tables instead of writing the same SQL statement in different applications.
53+
54+
## What are SQL commands?
55+
Structured query language (SQL) commands are specific keywords or SQL statements that developers use to manipulate the data stored in a relational database. You can categorize SQL commands as follows.
56+
57+
### Data definition language
58+
Data definition language (DDL) refers to SQL commands that design the database structure. Database engineers use DDL to create and modify database objects based on the business requirements. For example, the database engineer uses the CREATE command to create database objects such as tables, views, and indexes.
59+
60+
### Data query language
61+
Data query language (DQL) consists of instructions for retrieving data stored in relational databases. Software applications use the SELECT command to filter and return specific results from a SQL table.
62+
63+
### Data manipulation language
64+
Data manipulation language (DML) statements write new information or modify existing records in a relational database. For example, an application uses the INSERT command to store a new record in the database.
65+
66+
### Data control language
67+
Database administrators use data control language (DCL) to manage or authorize database access for other users. For example, they can use the GRANT command to permit certain applications to manipulate one or more tables.
68+
69+
### Transaction control language
70+
The relational engine uses transaction control language (TCL) to automatically make database changes. For example, the database uses the ROLLBACK command to undo an erroneous transaction.
71+
72+
## What is MySQL?
73+
MySQL is an open-source relational database management system offered by Oracle. Developers can download and use MySQL without paying a licensing fee. They can install MySQL on different operating systems or cloud servers. MySQL is a popular database system for web applications.
74+
75+
### SQL vs. MySQL
76+
Structured query language (SQL) is a standard language for database creation and manipulation. MySQL is a relational database program that uses SQL queries. While SQL commands are defined by international standards, the MySQL software undergoes continual upgrades and improvements.
77+
78+
## What is NoSQL?
79+
NoSQL refers to non-relational databases that don't use tables to store data. Developers store information in different types of NoSQL databases, including graphs, documents, and key-values. NoSQL databases are popular for modern applications because they are horizontally scalable. Horizontal scaling means increasing the processing power by adding more computers that run NoSQL software.
80+
81+
### SQL vs. NoSQL
82+
Structured query language (SQL) provides a uniform data manipulation language, but NoSQL implementation is dependent on different technologies. Developers use SQL for transactional and analytical applications, whereas NoSQL is suitable for responsive, heavy-usage applications.
83+
84+
## Advantages of SQL
85+
SQL provides various advantages which make it more popular in the field of data science. It is a perfect query language which allows data professionals and users to communicate with the database. Following are the best advantages or benefits of Structured Query Language:
86+
87+
1. No programming needed
88+
89+
SQL does not require a large number of coding lines for managing the database systems. We can easily access and maintain the database by using simple SQL syntactical rules. These simple rules make the SQL user-friendly.
90+
91+
2. High-Speed Query Processing
92+
93+
A large amount of data is accessed quickly and efficiently from the database by using SQL queries. Insertion, deletion, and updation operations on data are also performed in less time.
94+
95+
3. Standardized Language
96+
97+
SQL follows the long-established standards of ISO and ANSI, which offer a uniform platform across the globe to all its users.
98+
99+
4. Portability
100+
101+
The structured query language can be easily used in desktop computers, laptops, tablets, and even smartphones. It can also be used with other applications according to the user's requirements.
102+
103+
5. Interactive language
104+
105+
We can easily learn and understand the SQL language. We can also use this language for communicating with the database because it is a simple query language. This language is also used for receiving the answers to complex queries in a few seconds.
106+
107+
6. More than one Data View
108+
109+
The SQL language also helps in making the multiple views of the database structure for the different database users.
110+
111+
## Disadvantages of SQL
112+
With the advantages of SQL, it also has some disadvantages, which are as follows:
113+
114+
1. Cost
115+
116+
The operation cost of some SQL versions is high. That's why some programmers cannot use the Structured Query Language.
117+
118+
2. Interface is Complex
119+
120+
Another big disadvantage is that the interface of Structured query language is difficult, which makes it difficult for SQL users to use and manage it.
121+
122+
3. Partial Database control
123+
124+
The business rules are hidden. So, the data professionals and users who are using this query language cannot have full database control.

0 commit comments

Comments
 (0)