<reponame>rohanpatankar926/Consignment-Pricing-Using-Mlops-DVC<filename>Major Project WD - May batch ( P. Rohith Reddy )-20220924T063313Z-001/Major Project WD - May batch ( P. Rohith Reddy )/studentsdata.js<gh_stars>0                                       // Inserting Students Data to postgreSQL using Node JS


// First install pg package using command " npm install pg "
// install express js using command " npm install express "


const {Pool,Client} = require('pg')
const pool=new Pool({
    user:"postgres",
    host:"localhost",
    database:"onlinevidya by rohith",
    password:"@7780586887",
    port:5432
})
pool.query("INSERT INTO students(name,phone,email,course)values('Rohith',7780586887,'ychag@example.com','Web Development')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Praveen',8735492051,'lyhxr@example.com','React JS')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Nikitha',7340643295,'lyhxr@example.com','Angular JS')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Ajay',9398653065,'lyhxr@example.com','Artificial Intelligence')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Sam',6453109846,'envkt@example.com','Digital Marketing')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Sneha',9000381840,'efpyi@example.com','Java')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Ramya',9898757543,'anpch@example.com','Python')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Madhuri',6300846290,'hzdkv@example.com','Data structures')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Mahesh',9658318070,'hzdkv@example.com','Cyber Security')",(err,res)=>{
    console.log(err,res)
    pool.end()
})
pool.query("INSERT INTO students(name,phone,email,course)values('Bhargavi',9965694301,'nnheo@example.com','Full stack development')",(err,res)=>{
    console.log(err,res)
    pool.end()
})