teleren/devto huggingface dataset:
Relational VS Non-Relational Databases
Tags: javascript, react, database, webdev
Published: 2021-12-23 17:35:50

For storing data of application choosing the right database is very important. Sometimes choosing the relational database might seem more natural but sometimes this choice may not be successful. Here I am trying to explain the differences between relational and non-relational databases.

##**Relational Database**
A relational database organizes data into one or more tables which consists of columns and rows. All data is organized in the table where columns indicate attributes and every row indicates a single data item which is called records. In simple words, All the information in Relational Database is structured and is organized in tables. Here the primary key is something that identifies each item uniquely and a primary key can contain one or more columns of a table. Different tables can establish relations between them by different foreign keys. SQL is used for executing queries, retrieve data, and editing data. It is used for communicating with a Relational Database.

**Advantages of Relational Database**
A relational database is great for structured data. And it uses an existing query language (SQL) for making the relation between them. It can handle lots of complex queries and database transactions of data as here data in tables are very well connected by using unique keys. It is great for complex queries and it has easy data navigation. For a high level of data integration transactions are secure and it is very high reliability.
 
**Disadvantages of Relational Databases**
It has an up-front schema definition that means it has to maintain schema always. Here Relational Database has no adaptation to changing requirements. For that dynamic changes can affect all the other items in the same table and here data processing is slow. For getting high-performance expensive hardware is required.

## **Non-Relational Database**
A non-relational database refers to a database that has no tabular schema of rows and columns. It maintains an optimized storage model which is very flexible. 
It is also known as a NoSQL database that means “Not Only SQL”. The Meaning of that line is you don't need to use just SQL only to query the database, you can use any language which you prefer. 
 
**Advantages of Non-Relational Database**
Non-Relational Databases are designed for use with low-cost commodity hardware. Here huge volumes of data can be easily handled. It can be easily installed in cheap commodity hardware. That means we can process and store more data within less cost. Non-Relational databases need no schemas.  Non-Relational databases technologies have excellent integrated caching capabilities.
  
**Disadvantages of Non-Relational Database**
Non-Relational databases don’t have reliability functions. It is not compatible with SQL. We need a manual query language that makes things slower and more complex. It is less stable and may have fewer functionalities compared with a relational database.
Backend Concept.
Tags: node
Published: 2021-12-23 17:29:58

**Node.js:**
-It’s open server system, free, run on various platforms like ‘Windows, Linux, Mac OS’.
-It runs asynchronously, non-blocking way, maintain single-threaded.
-It can 
1-Generate dynamic page,
2-Collect form data,
3-Create,delete,read,write,open,close files on the server.
4-Add,delete,modify data in database.


Uses Companies:
1-LinkedIn,
2-Uber,
3-PayPal,
4-NASA,
5-Medium,
6-Mozila.
MongoBD:
--Mogodb is NoSQL database, NoSQL means non-relational, non-relational means that ‘MongoDB’ is not based on 
table.
--MongoBD storage format name is called BSON (Binary JavaScript Object Notation), BSON is similar to JSON 
format.

 
**Causes of node.js ,MongoDB with React.js**

---React.js is a client-side JavaScript libraray, So need, database for data store by Mongodb, when 
database used then need server , node.js is used for server.
also express.js is node framework
Node Js In Depth Analysis
Published: 2021-12-23 17:27:47

Node Js is an open source JavaScript runtime environment that interprets JavaScript language and runs the code. Node Js compared to PHP is faster because node js doesn’t wait for files to be read or written. Node js is ready to handle the next request right after sending tasks to the computer’s file system. 

So what does Node actually do? Node Js generate page contents that are dynamic. Node js collects data and adds, deletes, modifies data in the database. Node js also can create a file, open, write, read, close and delete files from the server.

Modules

Modules in Node js are like libraries in JavaScript. It includes a set of functions that’s needed in the application. A function named require() is used to include a module. You can also create modules of your own. For example:  exports.roadSize = (){ return Size(); };
File System

So, Node allows you to work with the file system on the computer. Basically in Node js file system you can read, create, update, delete and rename files. 
fs.readFile() method is used to read files on the computer.

To create files node js file system has 3 types of methods; fs.appendFile(), fs.open() and fs.writeFile(). The fs.appendFile() adds  content to a file. A new file will be created if the file does not exist. fs.open() method takes a “flag” as a second argument. If the flag is “w” the file will be opened for writing. An empty file will be created if the file doesn’t exist. Fs.writeFile() method replaces a file and content. If the file doesn’t exist, a new file with content will be created instead.

For updating files there are 2 methods; fs.appendFile() and fs.writeFile()

For deleting files there’s a method called fs.unlink() which deletes a specific file.

To rename files a method named fs.rename() is used. It, as the name suggests, renames a specific file.

You can also upload files with Node js. A module named “Formidable” helps upload files. You can download the module using “npm install formidable”.

To upload a file you first have to create a file. A file is created that can write an HTML form with an upload field. Then include formidable module to parse the uploaded file and send it to the server. When the file reaches the server it’s placed on a temporary folder. To move the file, simply use the file system module and rename the file.

Events

Events are basically every action that is performed on the computer. There are modules in Node js called “Events” that creates, fires and listens for the events. And of course you have to use “require()” to include the module. To assign handlers on those events, use EventEmitter object. To fire an event use the “emit()” method. These objects in Nodejs fire events. Events occur whenever you open or close a file.

URL Modules

There are built-in url modules in Nodejs. URL modules split up a web address into readable parts. As usual to include this module, use the “require()” method. To breakdown a web address use the url.parse() method to break the web address into readable parts which are properties of that url object.
CRUD Operation
Tags: crud, beginners, tutorial, programming
Published: 2021-12-23 17:27:08

CRUD stands for create, read, update and delete. These are the four basic functions of persistent storage. Organizations that keep track of customer data, accounts, payment information, and other records require data storage hardware and applications that provide persistent storage. This data is typically organized into a database.

**Create:**
To create resources in a REST environment, we most commonly use the HTTP POST method. POST creates a new resource of the specified resource type. let’s imagine that we are adding a new package to the stored list of packages for this tourism website, and the package objects are stored in a packages resource. If we wanted to create a new item, we would use a POST request.

```
Request:
POST http://www.tourism.com/packages/
Body -
{
  "package": {
    "name": “Goa Tour”,
    "price":20,000
  }
}

```
So, This creates a new package with a name value of “Goa Tour” and a price value of 20,000BDT.
After Created successfully the server should return a header with a link.For example,

```
Response:
Status Code - 201 (CREATED)
Body -
{
  "package": {
    "id": 123,
    "name": “Goa Tour”,
    "price":20,000
  }
}
```
So, for this response, we can see that the newly added package was created successfully. 

**Read:**
We use the GET method to read resources in a REST environment.GET can be used to read an entire list of items. If we call GET on the same information 10 times in a row, you should get the same response on the first call that we get on the last call.

Update:
For UPDATE we use the PUT  method for the CRUD operation. For example, if the price of the Goa Tour has gone up, We can do this with a PUT request.

```

PUT http://www.tourism.com/packages/123
Body -
{
  "package": {
    "name": “Goa Tour”,
    "price":21,000
  }
}
```
This request should change this package with id 123 and now still have the name “Goa Tour”, but the price value should now be 21,000, whereas before it was 20,000. The response includes a Status Code of 200 (OK) to signify that the operation was successful. For example,

```
Response:
Status Code -200 (OK)
Body -
{
  "package": {
    "name": “Goa Tour”,
    "price":21,000
  }
}

```



**Delete:**

For Delete, we use the DELETE method for the CRUD operation. For example, if we want to remove this Goa tour package we know has an id of 123.

```
Request:
DELETE http://www.tourism.com/packages/123
```
So after this DELETE call would return the original list of dishes with the {"id": 123, "name": “Goa Tour”, "price": 21,000} entry removed. All other dish objects in the package resource should remain unchanged.
what is best language for game apps?
Tags: java, unity3d, kotlin
Published: 2021-12-23 17:25:23

hello all,
I am an intermediate in app creation. I have used java previously to build apps. Now heading forward, i want to put my hand in game development. Wanna create games like [hill climb racing 2 mod apk](https://apkcurrent.com/hill-climb-racing-2-mod-apk/), among us, traffic rider etc. What is the best way to create one like them, should i continue with java, or unity, or kotlin? Please guide me in this regard based upon your experience.
will be thankful to your response.
What is CRUD?
Tags: crud, node, express, mongodb
Published: 2021-12-23 17:24:30


**What is CRUD?**
CRUD stands for Create, Read, Update, and Delete.
Create — To insert any record to the database.
Read — To retrieve records from the database.
Update — To update a record in the database.
Delete — To delete a record in the database.
If you are new to Node and Express JS, do visit my previous blogs on Node JS, which explains the basics of Node and Express JS.
CRUD Operations discussion.
Published: 2021-12-23 17:22:18

CRUD stands for Create, Read, Update, and Delete. These are the four most basic operations that can be performed with most traditional database systems and they are the backbone for interacting with any database. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information using computer-based forms and reports. Many HTTP services also model CRUD operations through REST or REST-like APIs.
For example: to get the product whose ID is 30, the client sends a GET request for http://hostname/api/products/30

The ability to create, read, update and delete items in a web application is crucial to most full-stack projects. For example, if we're creating a store front, blog posting page, to-do list or social media clone, without CRUD actions we'll get stuck very quickly.
A customer may use CRUD to create an account and access that account when returning to a particular site. The user may then update personal data or change billing information. On the other hand, an operations manager might create product records, then call them when needed or modify line items.
MongoDB CRUD operations
Tags: mongodb
Published: 2021-12-23 17:22:16

We can use MongoDB for building a web and mobile application, or analysis of data, or administrator of a MongoDB database. In all these cases we need to interact with the MongoDB server to perform certain operations like entering new data into the application, deleting data from the application,  updating data into the application, and reading the data of the application.
MongoDB provides a set of some most essential operations that will help us to easily interact with the MongoDB server and these operations are known as 
CRUD operations.
 
Create Operations –
The create operations are used to add new documents to the collection. If a collection does not exist, then it will create a new collection in the database. create operations using the following methods provided by the MongoDB:
db.collection.insertOne() : It is used to insert a single document in the collection.

db.collection.insertMany() : It is used to insert multiple documents in the collection.

Read Operations –
The Read operations are used to retrieve documents from the collection or query a collection for a document. read operation using the following method provided by the MongoDB:
db.collection.find() : It is used to retrieve documents from the collection.

 
 
Update Operations –
The update operations are used to update or modify the existing document in the collection. update operations using the following methods provided by the MongoDB:
db.collection.updateOne() : It is used to update a single document in the collection.

db.collection.updateMany() : It is used to update multiple documents in the collection.

db.collection.replaceOne() : It is used to replace single document in the collection.

Delete Operations –
The delete operation is used to delete or remove the documents from a collection.delete operations using the following methods provided by the MongoDB:
db.collection.deleteOne() : It is used to delete a single document from the collection.

db.collection.deleteMany() : It is used to delete multiple documents from the collection.
Dec 23: Dev Holidays Guide ⛄️
Tags: stateofdevs, bahhumbugtip, mentalhealth, tips
Published: 2021-12-23 17:21:45

Bah Humbug Tips are my own way of coping & recovering from burnout & holiday stress.

###🎄  Today's Bah Humbug Tip of the Day. 
{% twitter 1474035844700729348 %}

######🎁 Today's Options 
{% twitter 1474035846193958912 %}

You can find more tips here & on [Twitter](https://twitter.com/stateofdevs). Let me know in the comments if any of these tips helps.

> If you're struggling w/ burnout & open to sharing your story, please [take the State Of Devs survey](https://stateofdevs.com/helps/dev). 🗳 Thanks!
Using JavaScript To Compare Two Strings Containing Deleting Element(s) – Two Versions
Tags: javascript, programming
Published: 2021-12-23 17:21:27

There are always several ways to code a solution and an example of this will be shown here. One is presented with two strings to be compared and the program should yield “true” if they match and “false” if they don’t. These strings can contain one or more of the symbol “$”. Each “$” deletes in turn its preceding letter. The comparison of the strings should take this into consideration.

In order to take Big O time consideration into account, “const” (the faster option) is used instead of “let”. Since the loops are not nested, we have O(n) instead of O(n^2).

The beginning is the same for both versions. A variable compareStrings is created which represents a function that takes in 2 parameters. We first eliminate the simplest case so if the strings match as they are then the return is “true”. If not, then 2 new empty arrays are created.

**VERSION 1 CONTINUATION:**

The letter “i” represents the index for the first argument and the string is iterated over. If the symbol “$” appears, then the last letter entered in the array is removed. If the item at that index is a letter, then it is added to the array. The same is done for the second argument except that the letter "j" is utilized. The arrays are then converted into strings and compared. If they are equivalent then ‘true” is returned, otherwise the return is “false”. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijfcsi129q4raidl7lgg.png)

**VERSION 2 CONTINUATION:**

A variable loopLength is created and Math.max() is used to determine which argument’s length is longer. This is the number that the “i” which is the letter representing the index to iterate over the strings must be less than to ensure that even the longer string is completely iterated over. For each string it is first determined that the string is not undefined. If it is not then if the symbol “$” appears, then the last letter entered in the array is removed. If the item at that index is a letter, then it is added to the array. The same is done for the second argument. The arrays are then converted to strings and compared utilizing a ternary operator. If they are equivalent then ‘true” is returned, otherwise the return is “false”. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cs06eo9n06ylv3tbukwz.png)

Please note that since “$” is eliminated, if that symbol appears at the beginning meaning that there were no letters to pop from the array, it will not change the “true” or “false” response.

Thanks for reading!
CRUD Operations
Tags: javascript, database, crud, webdev
Published: 2021-12-23 17:21:27

## _CRUD Operations_


**CRUD stands for Create, Read, Update and Delete. They are the four basic operations that are necessary for storage application.** 


The capacity to create, read, update and delete items in a web application is important for the development of a website and making it interactive. For example: if we are making a blog page and someone wants to post blogs, without CRUD operations it would be a real problem. 



_Create_

The create allows adding items or data to the database. It will add a new row on the database table for adding that data. To create data, the HTTP Post method is used, it is used to create new data for the database. 


_Read_

The read allows reading from the database. It would never change the data. To read a resource HTTP Get method is used. No matter how many times you call the Get method, you’ll get the same data stored in there. 


_Update_

The update is used to update any data from the database. If you store the price of stocks and after a few days it has gone up, you would want to change the previous price to the current price. It means you would update the price from the previous one. The PUT method is used for updating data from the database. After updating it, the data will be changed from the database, also the updated data will be displayed on the website.


_Delete_

The delete is used to delete data from the database or remove any resource from the system. For example, you stored your favorite dishes on the database. You want to remove pizza from the list(Don't think anyone would do that!), then you’ll use the delete operation. For that HTTP Delete method will be used.
CRUD OPERATION

Published: 2021-12-23 17:18:13

**CRUD** is an acronym that stands for Create, Read, Update, and Delete. 
These are the four most basic operations that can be performed with most traditional database systems and they are the backbone for interacting with any database. 
Let’s get started to understand the concepts of CRUD operations in SQL Server

**Create**
The first letter of CRUD, 'C,' stands for CREATE, which is also known as add or insert. The SQL insert statement will be used to insert a new record in this operation. To add new records to a table, SQL uses the INSERT INTO statement.

**Read**
The SELECT (data retrieval) operation is represented by the second letter of CRUD, 'R.' The word ' read' refers to retrieving data or record sets from a table that has been listed (s). The data is retrieved using SQL's SELECT command. You can use SQL Server Management Studio, SQL Server Data Tools, or sqlcmd to run queries, depending on your preferences.

**Update**
The Update operation is represented by the third letter of CRUD, 'U.' SQL makes a change to the table's existing record(s) by using the Update keyword. You'll need to define the target table and the columns that need to be updated, as well as the associated values, when performing an update. You may also need to know which rows need to be updated. To avoid lock escalation and concurrency issues, you should keep the number of rows to a minimum.
**
Delete**
The CRUD operation ends with the letter 'D,' which refers to removing a record from a table. The DELETE command in SQL is used to delete the record(s) from the table.
When writing a DELETE statement, you'll specify the target table as well as the rows you want to remove. In its most basic form, the syntax is the DELETE keyword followed by the table name. In some cases, running a query without a WHERE clause will delete ALL existing rows from the table. Use the WHERE clause followed by the expression to add a condition clause to the SQL DELETE statement (s).

Thank you for your interest in reading this article. I hope you found it straightforward and useful.
CRUD operation of MongoDb
Published: 2021-12-23 17:12:22

Hello and welcome my MERN developer friends !
Today I am going to explain the CRUD operation of mongodb.
 
CRUD Operations:
CRUD stands for Create, Read, Update and Delete any document. This four function are described below:
Create: Basically we can add a new document to the database by using this operation. Create operation call insert operation also. We can insert or create document using two different methods -
=> insert one: We can insert one or a single collection of documents by using this method. Insert one code is given below: 
db.users.insertOne(
{
name: “alamgir”,
Age: 32,
status: “pending”
}
)
=> insert many: We can insert many collections of documents by using this method. Insert many code is given below: 
db.users.insertMany(
[<document1>,<document2>,<document3>],
{
writeConcern: <document>,
Ordered: <boolean>
}
)
Read: We can retrieve documents from a collection by using read operation. Read code is given below:
db.users.find(
{age: {$gt:18}},
{name:1,address:1}
).limit(5)
Update: update operation modify existing data in the database. There are 3 way to update document, these are: i) update one(), ii) update many() and iii) replace one(). We can use below code to update any document or collection in mongodb:
db.users.updateMany(
{age:{$lt:18}},
{$set:{status:”reject”}}
)
Delete: We can remove any collection by using delete operation from database. There are two types of delete operation, i) delete one() ii) delete many(). Sample code is given below:
db.users.deleteMany(
{status:”reject”}
)
CRUD operation is one of the important function of web development, not only web development, it is an important function of any type of software development. CRUD operation makes any system reusable.