ClearMyBench
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Ruby concepts part 2 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Ruby concepts part 2
#4642
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
If there are multiple INSERTs at a time then preparing a statement first and then executing it multiple times within a loop is more efficient than invoking do each time through the loop
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4643
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
READ Operation:

READ Operation on any databasse means to fetch some useful information from the database.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4644
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Once our database connection is established, we are ready to make a query into this database.


We can use either do method or prepare and execute methods to fetech values from a database table
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4645
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Record fetching takes following steps

1.Prearing SQL query based on required conditions.

This will be done using prepare method.

2.Executing SQL query to select all the results from the database. This will be done using execute method
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4646
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
3.Fetching all the results one by one and printing those results.

This will be done using fetch method.

4. Releasing Stattement handle. This will be done using finish method
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4647
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Update Operation:

UPDATE Operation on any databasse means to update one or more records which are already available in the database
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
logo footer   Copyright 2009 - 2013 HotRecruiter.Com - All Rights Reserved