Adt Lab New
Adt Lab New
manual
TIRUCHIRAPPALLI- 620024
Name : …………………………….
Semester : …………………………….
BONAFIDE CERTIFICATE
INSTALLATION PROCEDURE:
STEP 2: After the Login process the MongoDb Atlas Ask some question
STEP 5: A Window Pop up for Creating Username and password, then click the “Create
Username”
STEP 6: After that MongoDb database were created and Click the “Connect” button
STEP 8: The Last step to access the MongoDb via Command prompt
STEP 9; After installation the Mongosh, copy the command string in system command prompt
and Enter the password then the Database were Connected.
SAMPLE DATA:
QUERIES:
//CREATE
>use MCA_Placement
//INSERT
>db.user.insertMany([{Student_id:"1",Student_name:"Nandhu",Company:"Zoho",Salary:'70000'}
,{Student_id:"2",Student_name:"Vijay",Company:"TCS",Salary:'75000'},{Student_id:"3",Student
// DISPLAY
>db.user.find()
//UPDATE
>db.user.updateOne({Student_name:"Nandhu"}, {$set: {Salary:'80000'}})
>db.user.find()
//DELETE
>db.user.deleteOne({Student_name:"Nandhu"})
>db.user.find()
//INDEXING
>db.user.createIndex({id:1})
>db.user.getIndexes()
//DROP INDEX
>db.user.dropIndex({id:1})
>db.user.getIndexes()
OUTPUT:
QUERIES:
cqlsh: create keyspace amaazon with replication
{‘class’:’Networktopologystrategy’,’datacenter1’:1};
cqlsh: use amaazon;
//CREATE
cqlsh: amaazon >create table booksellers(book_id int PRIMARYKEY, book_name text,
book_author text, book_rating float, book_price varint);
//INSERT
Cqlsh: amaazon >insert into booksellers (book_id, book_name, book_author, book_rating,
book_price) values (1,’The Power of Your Subconscious Mind’,’Joseph Murphy’,4.5,149);
OUTPUT:
STEP 4: In orientdb folder, open bin folder and run the server and enter password and user
name in server.
STEP 6: In readme file, copy this link http://localhost:2480 and paste it in chrome.
SAMPLE DATA:
USER_ID USER_NAME USER_AGE USER_GENDER
QUERIES:
create database LinkedIn;
use LinkedIn;
//CREATE
create table profile(user_id varchar(30), user_name varchar(20),user_age int);
//INSERT
insert into profile values("@acer198","san_jay",21);
insert into profile values("@carrier11","sree_ram",21);
insert into profile values("@hittachi090","giri_dharan",21);
insert into profile values("@today00","revi",21);
insert into profile values("@adobe07","jay_chandran",21);
select * from profile;
//ALTER
alter table profile add user_gender varchar(10);
//UPDATE
update profile set user_gender="male";
select * from profile;
//DELETE
delete from profile where user_id="@today00";
OUTPUT:
//INSERT
//DROP:
STEP 1: Make Sure Tick the Hidden items and The “ProgramData” was Shown in Folder
STEP 2: Create the Server in Mysql Workbench
Click the Plus Button near the Mysql Connections to Create the Server
Create the First Server named as Server A and Do the Same process for Server B.
Click the Test Connection for both the Server and Click Ok.
SERVER A:
server-id=1
log-bin="mysql-bin"
binlog-ignore-db=information_schema
replicate-ignore-db=information_schema
relay-log="mysql-relay-log"
auto-increment-increment = 2
SERVER B:
server-id=2
log-bin="mysql-bin"
binlog-ignore-db=information_schema
replicate-ignore-db=information_schema
relay-log="mysql-relay-log"
auto-increment-increment = 2
1. Create the replicator user in either Server A and Server B. You can do that using MySql shell
using the following commands:
3. To Connect Server B to Server A as a Slave to Master Host, type the following sql
command in Mysql Workbench:
4. Now Connect to Server B via Mysql Workbench and type the following sql command:
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST = 'Server A IP Address', MASTER_USER =
'replicator', MASTER_PASSWORD = '[replicator_password]', MASTER_LOG_FILE =
'mysql-bin.000001', MASTER_LOG_POS = 10
START SLAVE;
5. Lastly go to Server A and type sql command to show the slaves which were connected
to Master Host
INSTALLATION PROCEDURE:
STEP 1: Firstly, choose the MySQL version and operating system. Then, we download the
desired MSI installer on your system by clicking the 'Download' button shown in the image
below. This installer is suitable for both 32-bit and 64-bit systems
STEP 2: Then, we will be redirected to another file download page. Here, ignore the prompts
asking to log in or sign up and directly start downloading by clicking on the link as shown in the
image.
STEP 3: Once the installer is downloaded, run it to start the MySQL installation.
STEP 5: In the next step, select MySQL Server, MySQL Workbench, MySQL Shell (all latest
versions) to be installed. We can also choose more products available as per necessity. Click Next
STEP 6: The installation process will now begin. However, path conflicts might arise if there
exists a path directory with the same name. After the installation is done, click Next.
STEP 8: Then, we need to set the Authentication method to access MySQL root user. So, choose
the strong password encryption method (as it is recommended) and click Next.
STEP 9: Set a password for the root account. This password must always be used to log into the
root account in every session. After setting password, click Next.
STEP 11: Now, set the file permissions as required and click Next.
STEP 12: As shown in the image below, the specified configuration steps will be applied on
clicking Execute.
STEP 13: The installation is now complete. Uncheck the options asking to start MySQL
Workbench and Shell after setup, so that they will not run after setup. Click Finish.
The MySQL Server is now installed in the Windows Operating System. We can now access it via
the Command Prompt or the UI products we installed with it (Shell and Workbench)
SAMPLE DATA:
Name Location
Restaurant 1 -26.66115 40.95858
Restaurant 2 -26.68685 40.93992
Restaurant 3 -31.11924 42.39557
//CREATE
mysql> CREATE TABLE restaurants (name VARCHAR (100), location GEOMETRY NOT
NULL, SPATIAL INDEX (location));
//INSERT
//ALTER
// DELETE
//DROP
OUTPUT
QUERIES:
create database
Toll; use Toll;
//CREATE
create table vehicle(vehicle_number varchar(20),vehicle_model varchar(20), entry_time
datetime);
//INSERT
insert into vehicle
values("TN_55_0001","BMW_M5",now()); insert into
vehicle values("TN_55_6969","ALTO 800",now()); select *
from vehicle;
//ALTER
ALTER TABLE vehicle ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY;
OUTPUT:
STEP 1: Firstly, choose the MySQL version and operating system. Then, we download the
desired MSI installer on your system by clicking the 'Download' button shown in the image
below. This installer is suitable for both 32-bit and 64-bit systems
STEP 2: Then, we will be redirected to another file download page. Here, ignore the prompts
asking to log in or sign up and directly start downloading by clicking on the link as shown in the
image.
STEP 4: Now, we can see the installer community window, asking to choose a Setup type for our
MySQL products. Choose Custom and click Next to decide what products we want to actually
install.
STEP 5: In the next step, select MySQL Server, MySQL Workbench, MySQL Shell (all latest
versions) to be installed. We can also choose more products available as per necessity. Click Next.
STEP 7: In this step, we will be asked to set Type and Networking of MySQL. Unless there is any
particular change we want to make, it is recommended to keep the settings as they are, and
click Next.
STEP 9: Set a password for the root account. This password must always be used to log into the
root account in every session. After setting password, click Next.
STEP 11: Now, set the file permissions as required and click Next.
Once it is completed, click Finish. The next window will display the products on which the
configuration is applied. Click Next to finish the installation.
The MySQL Server is now installed in the Windows Operating System. We can now access it via
the Command Prompt or the UI products we installed with it (Shell and Workbench).
SAMPLE DATA:
User id followers
local_logu 220
astro_vj 120
lovely_nandhu 340
QUERIES:
OUTPUT:
TABLE CREATION:
Biodata.xml
<?xml version = "1.0"?>
<?xml-stylesheet type = "text/xsl" href = "stu_detail.xsl"?>
<biodata>
<student>
<Reg_no>01</Reg_no>
<Student_Name>sara</Student_Name>
<DOB>09-01-2002</DOB>
<Gender>female</Gender>
<Department>MCA</Department>
</student>
<student>
<Reg_no>20</Reg_no>
<Student_Name>Deepak</Student_Name>
<DOB>21-09-2000</DOB>
<Gender>male</Gender>
OUTPUT:
STEP 1: Visit the Microsoft SQL Server website to download the Developer Edition: SQL Server
Downloads
Run the downloaded installer.
1. Go to the Microsoft SQL Server Management Studio download page: SSMS Download
STEP 3: Connect Microsoft SQL Server Management Studio with SQL Server
DECLARE @x xml
SET @x='
<social_media>
<instagram>
<user>
<id>astro_vj</id>
<name>Vijay</name>
<age>22</age>
<city>Thoothukudi</city>
</user>
<user>
<id>local_logu</id>
<name>Loganathan</name>
<age>22</age>
<city>Devakottai</city>
</user>
<user>
<id>lovely_nandhu</id>
<name>Shree Nandhan</name>
SELECT @x.query('
for $b in social_media/instagram/user
let $a := $b/id
let $p := $b/name
where $a="lovely_nandhu"
order by ($p)[1]
return $b
')
OUTPUT:
STEP 3: Give the Cluster (or) Database name and proceed to Deployment the Server
STEP 5: After that MongoDb database were created and Click the “Connect” button
STEP 6: After that the window will popped out, then click the “Compass menu”
STEP 8: After installation the Mongo Compass, copy the command string in system command
prompt and Enter the password then the Database were Connected.
STEP 10: Create a Database name and Collection name. Finally import the values in JSON Format.
QUERIES:
[
{
"id": "1",
"Name": "Nandhu",
"Present_Days": "50",
"Absent_Days": "10",
"OnDuty_Days": "15"
},
{
"id": "2",
"Name": "Loganathan",
"Present_Days": "55",
"Absent_Days": "7",
"OnDuty_Days": "13"
},
{
"id": "3",
"Name": "Vijay",
"Present_Days": "65",
"Absent_Days": "8",
"OnDuty_Days": "2"
},
{
"id": "4",
"Name": "Sobiya",
"Present_Days": "68",
"Absent_Days": "7",
"OnDuty_Days": "0"
},
{
"id": "5",
"Name": "Jerish",
"Present_Days": "65",
"Absent_Days": "9",
"OnDuty_Days": "1"
},
{
"id": "6",
"Name": "Saranya",
OUTPUT: