Relational Database &CRUD Operation
Published: 2021-12-23 16:29:35

##Relational Database:
These three were particularly adept at the data display techniques using relational databases and data cubes.Since 2000, non-relational databases have become popular, known as NoSQL.MySQL AB is the inventor of MySQL, a relational database management system, as well as related to the MySQL clusters.The alternative approach to clauses has been already developed that has been digital for almost a decade before the mainframe relational database management system .MariadB is a GNU General Public, developed by software developers, supported by a commercial copy of the MySQL Relational Database Management System.It provides a framework for mapping a relational database object-based domain model.Spirit JDBC which is a list of the relational database management systems for MSQL drivers. Relational Database Management System "Minerva: An Event Based.
A Relational Database also called Relational Database Management System (RDBMS) or SQL database, stores data in tables and rows also referred to as records. A relational database work by linking information from multiple table used “key”.This key is unique identification which can be  assign to be a row of data contain within table.This unique identifier called a “primary key” can then be included in a record located the another table when that the table record has a relationship to the primary record in the main table. When this unique primary key is added to a record in another table, it is called a “foreign key” in the associated table. The connection between the primary and foreign key then creates the “relationship” between records contained across multiple tables.This image illustrates a primary/foreign key relationship between two tables. The Employees table contains a single row representing an employee with each employee assigned a unique id (primary key). In this case, the primary key is named EmployeeId. The second table, Sales, contains individual sales records that are then associated with the employee that made the sale. Because an employee can make multiple sales, their unique EmployeeId (primary key), can appear multiple times in the Sales table as a foreign key.

 
####In summary of relational database
What you need to know about relational databases are given below:

1. The7 work with structured data.
2. Relationships in the system have constraints, which promotes a high level of data integrity.
3. There are limitless indexing capabilities, which results in the faster query response times.
4. They are excellent at keeping data transactions secure.
5. They provide the ability to write complex SQL queries for data analysis and reporting.
6. Their models can ensure and enforce business rules at the data layer adding a level of data integrity not found in a non-relational database.
7. They are table and row oriented data transfer.
8. They Use SQL (structured query language) for shaping and manipulating data, which is very powerful.
9. SQL database examples: MySql, Oracle, Sqlite, Postgres and MS-SQL. NoSQL database examples: MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb.
10. SQL databases are best fit for heavy duty transactional type applications.
 
##CRUD Operations

CRUD operations is computer programming. Create, Read ,Update and Delete(CRUD) are the four basic operations of persistent Storage .It is also used user interface to database connection. User interface many information save the mongodb database. This save data collect and display user inter-face. CRUD Operation is the most important of the user interface and database connected. CRUD is also relevant at the user interface level of most application.
####CRUD Operation Fully works in website:

C= Create method or POST Method is User interface to new data transfer or storage in database for POST method use.

#####POST method used Front-End to new data pass Database Front-End Example code:
`fetch(‘URL/newData’,{
 method:’POST’,
 headers:{‘content-type’:’application/json’},
 body:JSON.Stringify(data) })`
#####POST method used Back-End data request pass to Database example code:
`app.post(‘/newData’,async(req,res)=>{
 const data=req.body;
 const result=await dataCollection.insertOne(data)
 res.json(result)})`
R= Read method or get Method is User interface used for collecting data in a database for GET method use.
#####GET method used use Front-End Example code:
`useEffect( ()=>{
 fetch(‘URL/useData’)
.then(res=>res.json())
.then(data=setData(data), [ ] })`
#####GET method used request data to Database example code:
`app.get(‘/useData’,async(req,res)=>{
 const result=await dataCollection.find({}).toArray();
 res.json(result) } )`
U= Update method used for User interface any data or information changing or updating  request in database for PUT method use.
#####PUT method used user-interface request data change or update to Database Front-End Example code:
`fetch(‘URL/updateData/${id}’,{
 method:’PUT’,
 headers:{‘content-type’:’application/json’},
 body:JSON.Stringify(data) })`
#####PUT method used Back-End data request data change or update example code:
      `app.put(‘/updateData/:id’,async(req,res)=>{
       const id=req.params.id;
      const updateData=req,body;
      const filter={_id:ObjectId(id)};
      const options={upsert:true};
      const updateDoc={
      $set:{name:updateData.name,email:updateData.email}}
      const result=await dataCollection.updateOne(filter,updateDoc,option)
      res.json(result) } )`                                                                                                                                                                                                                                                                                                                                                     
D= Delete method is User interface any specific data delete request in database for Delete method use.
#####DELETE method used user-interface id specific any necessary  data Delete or remove the Database Front-End Example code:
`fetch(‘URL/deleteData/${id}’,{
 method:’DELETE’,
 headers:{‘content-type’:’application/json’}})`
####DELETE method used request Database specific data delete example code:
`app.delete(‘/deleteData/:id’,async(req,res)=>{
const id=req.params.id;
const query={_id:ObjectId(id)};
const result=await dataCollection.deleteOne(query)
res.json(result)})`