SlideShare a Scribd company logo
International Journal of Engineering and Technical Research (IJETR)
ISSN: 2321-0869, Volume-1, Issue-10, December 2013
46 www.erpublication.org

Abstract— “Update” is a command in database language like
SQL etc. to update a/some column value of a particular row of a
given table leaving all the other column unchanged in that
particular row of that given table. We will discuss in this paper
how to remove “Update” command from the database language
like SQL and also “History” table from the database by adding
another column removing also a column “LAST_UPDATED”
from a given table. We will also discuss the process from GUI
level.
Index Terms— SQL, GUI level, database language.
I. INTRODUCTION
A. Content
1) What is ―Update‖ command.
2) Example.
3) What is ―History‖ table.
4) Example.
5) How to remove ―Update‖ command and ―History‖
table.
6) Removal of EDIT/UPDATE option from GUI.
7) Advantages.
8) Pareto Efficiency.
9) Pareto improvement in existing system.
10) Invention is efficient or not.
II. WHAT IS ―UPDATE‖ COMMAND
In SQL ―Update‖ command is used to update a/some column
value of a particular row of a given table by leaving other
column values of that particular row of the given table
unchanged.
Example
Let us consider the following data of a company in database.
Manuscript received December 02, 2013.
Shubhankar Paul, Passed BE in Electrical Engineering from Jadavpur
University in 2007. Worked at IBM as Manual Tester with designation
Application Consultant for 3 years 4 months.
We have considered 3 rows and 4 columns. Now, let say,
JOB_ROLE of Paul is promoted to ―Officer‖ from ―Jr.
Officer‖. Here we will use the below command to update the
JOB_ROLE only leaving ROW_ID, EMP_ID, NAME
unchanged.
UPDATE EMPLOYEE_TABLE
SET JOB_ROLE = ‗Officer‘
WHERE EMP_ID = ‗9072‘;
And the result will be as given below in the image :
This is how ―Update‖ command works.
III. WHAT IS ―HISTORY‖ TABLE
―History‖ table stores all previous data of a row which has
been updated one or multiple time(s).
Example
Let us consider the following data of employees of a given
company :
Removal of History table from Database & Update
Command from SQL & Edit option from GUI
Shubhankar Paul
Removal of History table from Database & Update Command from SQL & Edit option from GUI
47 www.erpublication.org
Let, Paul is promoted to ―Officer‖ from ―Jr. Officer‖ on
3/4/2006 and Jack is demoted to ―Officer‖ from ―Sr. Officer‖
on 1/2/2005. The update command will change the
EMPLOYEE_TABLE as below :
Now, the ―History‖ table will store the previous records
which were previously and updated as shown below :
How to remove ―Update‖ command and ―History‖ table:
We can do it in two ways. We will define a new operator, say,
―Cross‖ or we can add a new column to the existing table and
remove LAST_UPD.
1. Cross operator :
a(cross)b means the record whose ROW_ID (primary key) = a
has been updated (b-1) times and 1 time it was created. For
example, 2(cross)5 means second record is created and
updated 4 times after creation. 5(cross)2 means fifth record
created and updated 1 time after creation. So, 2(cross)5 is not
equal to 5(cross)2 (not to confuse with general multiplication
where 2*5 = 5*2 = 10).
2. Adding one column and removing LAST_UPD
column :
The column that will be added will contain value 1 when a
record is created and will take values 2, 3, 4, ... when updated.
So, Primary key of a record in a given table will be composed
of 2 columns viz. ROW_ID and NEW_COLUMN. When a
record will be searched it will show the last numbered
NEW_COLUMN. We have seen in the Example of ―History‖
table we need LAST_UPD column to track when it was last
updated. Here we will see in an example with previous data
how NEW_COLUMN will help unnecessary of ―History‖
table and ―LAST_UPD‖ column.
Please note UPD_DATE is not a new column. It should exist
in every table to track when the record was created. Now, Paul
is promoted to ―Officer‖ from ―Jr. Officer‖ on 3/4/2006 and
Jack is demoted to ―Officer‖ from ―Sr. Officer‖ on 1/2/2005.
Without using ―Update‖ command we will use ―INSERT
INTO‖ as below :
INSERT INTO EMPLOYEE_TABLE (ROW_ID,
NEW_COLUMN, NAME, J_ROLE, UPD_DATE)
SELECT ROW_ID, NEW_COLUMN, NAME
FROM EMPLOYEE_TABLE
WHERE ROW_ID = 2
SET J_ROLE = ‗Officer‘, NEW_COLUMN =
‗NEW_COLUMN+1‘;
This command will insert a new row in the table with same
ROW_ID and all other column except J_ROLE which is
updated to ‗Officer‘ and NEW_COLUMN is set to 2.
Similarly, for Paul,
INSERT INTO EMPLOYEE_TABLE (ROW_ID,
NEW_COLUMN, NAME, J_ROLE, UPD_DATE)
SELECT ROW_ID, NEW_COLUMN, NAME
FROM EMPLOYEE_TABLE
WHERE ROW_ID = 3
SET J_ROLE = ‗Officer‘, NEW_COLUMN =
‗NEW_COLUMN+1‘;
The updated table will look like below :
International Journal of Engineering and Technical Research (IJETR)
ISSN: 2321-0869, Volume-1, Issue-10, December 2013
48 www.erpublication.org
We see that History is already created in the UPD_DATE or
CREATE_DATE. All records are there in this table. So, we
do not need any ―History‖ table.
IV. REMOVAL OF EDIT/UPDATE OPTION FROM GUI
In GUI we will use ―Copy Record‖ option to update a record.
When we will click on ―Copy Record‖ option then that
particular row will be copied with NEW_COLUMN =
NEW_COLUMN+1 value and it will be editable until saved.
Then we can put updated value for a/some column we want to
update. Then it will be saved in database with same ROW_ID
but different NEW_COLUMN. As we have already discussed
primary key will be composition of ROW_ID and
NEW_COLUMN.
Note : We can also define ―Copy Row‖ in database level also
like GUI.
V. ADVANTAGES
1. A table space (History table) is removed without
affecting anything else. This will enhance the
efficiency of database.
2. A command ―Update‖ is removed from database
language like SQL.
3. EDIT/UPDATE option is removed from GUI.
Sometimes it happens due to unconsciousness a data
is updated. This type of error is removed as it will be
read-only in GUI as well for ADMIN.
4. Removal of an option from GUI (EDIT/UPDATE)
will increase the efficiency of Business layer.
5. Every record that is deleted will be given a NULL or 0
value in NEW_COLUMN. It will help the system to
search for the maximum value of NEW_COLUMN
otherwise the system will not be able to understand
the maximum value of NEW_COLUMN. For
example, say a record is created and updated 2 times
and second record i.e. the record with
NEW_COLUMN = 2 value is deleted. Then query
command will not find 3 as after 1 it will not find 2.
But if it finds a NULL or 0 for NEW_COLUMN
then it will understand record 2 is deleted. Then it
will search for record 3 and output the maximum
valued NEW_COLUMN record. We can calculate
the number of record with NEW_COLUMN =
NULL or 0. Now {(Total number of record – Record
with NEW_COLUMN = NULL or 0)/Total number
of records}*100 will give the consciousness of a
team working on a particular project. Because we are
not supposed to delete record if it is not mistyped
any column due to unconsciousness.
6. It is convenient to use 2 digit integer for
NEW_COLUMN because a record will not be
updated for more than 99 times. It will reduce the
database level memory as the column
LAST_UPDATED, which is a date-time stamp, is
more memory occupying, is removed.
7. The more NEW_COLUMN value the interaction of
that customer is more with the company as the data is
getting updated for NEW_COLUMN – 1 times.
NEW_COLUMN value can also be greater if record
is deleted due to unconsciousness of an employee as
discussed in point 5. So, we can define a measure to
calculate interaction of a customer as, Interaction =
{(Maximum NEW_COLUMN value – number of
records with NEW_COLUMN = NULL or 0 with
given ROW_ID)/Maximum NEW_COLUMN
value}*100%. The more the value the interaction of
that particular customer with company is more.
8. The efficiency of GUI also increase as an option is
removed from there.
9. If we define cross operator then NEW_COLUMN is
not needed.
VI. PARETO EFFICIENCY
We start with the following definition: if we can find a
way to make some people better off without making
anybody else worse off, we have a Pareto improvement.
If an allocation allows for a Pareto improvement, it is
called Pareto inefficient; if an allocation is such that no
Pareto improvements are possible, it is called Pareto
efficient.
In our given system we are not making the system worse
off in any condition and we can find lots of advantages as
discussed. So, there is a Pareto Improvement in the
system is possible. According to above definition the
system is Pareto inefficient.
Invention is Efficient or not :
From the Pareto Efficiency section we can see that we
find a Pareto improvement. So, the invention is efficient.
REFERENCES
[1] Intermediate Microeconomics A modern approach 8th edition by
Hal. R. Varian.
[2]http://stackoverflow.com/questions/9156340/how-to-copy-a-row-
nd-insert-in-same-table-with-a-autoincrement-field-in-mysql
Shubhankar Paul, Passed BE in Electrical Engineering from Jadavpur
University in 2007. Worked at IBM as Manual Tester with designation
Application Consultant for 3 years 4 months. Worked at IIT Bombay for 3
months as JRF. Published 2 papers at International Journal.

More Related Content

What's hot

Les09
Les09Les09
Les12[1]Creating Views
Les12[1]Creating ViewsLes12[1]Creating Views
Les12[1]Creating Views
siavosh kaviani
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
DataminingTools Inc
 
MYSQL
MYSQLMYSQL
MYSQL
ARJUN
 
Les05[1]Aggregating Data Using Group Functions
Les05[1]Aggregating Data  Using Group FunctionsLes05[1]Aggregating Data  Using Group Functions
Les05[1]Aggregating Data Using Group Functions
siavosh kaviani
 
Les10[1]Creating and Managing Tables
Les10[1]Creating and Managing TablesLes10[1]Creating and Managing Tables
Les10[1]Creating and Managing Tables
siavosh kaviani
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
SANTOSH RATH
 
My sql.ppt
My sql.pptMy sql.ppt
Les10 Creating And Managing Tables
Les10 Creating And Managing TablesLes10 Creating And Managing Tables
Oracle: PLSQL Commands
Oracle: PLSQL CommandsOracle: PLSQL Commands
Oracle: PLSQL Commands
DataminingTools Inc
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
Hema Prasanth
 
Les11 Including Constraints
Les11 Including ConstraintsLes11 Including Constraints
Columnrename9i
Columnrename9iColumnrename9i
Columnrename9i
oracle documents
 
Mysql
MysqlMysql
Mysql
MysqlMysql
Les06[1]Subqueries
Les06[1]SubqueriesLes06[1]Subqueries
Les06[1]Subqueries
siavosh kaviani
 
Oracle: DML
Oracle: DMLOracle: DML
Oracle: DML
DataminingTools Inc
 
2 sql - single-row functions
2   sql - single-row functions2   sql - single-row functions
2 sql - single-row functions
Ankit Dubey
 
T sql denali code Day of .Net
T sql denali code Day of .NetT sql denali code Day of .Net
T sql denali code Day of .Net
KathiK58
 
Oracle views
Oracle viewsOracle views
Oracle views
Balqees Al.Mubarak
 

What's hot (20)

Les09
Les09Les09
Les09
 
Les12[1]Creating Views
Les12[1]Creating ViewsLes12[1]Creating Views
Les12[1]Creating Views
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
 
MYSQL
MYSQLMYSQL
MYSQL
 
Les05[1]Aggregating Data Using Group Functions
Les05[1]Aggregating Data  Using Group FunctionsLes05[1]Aggregating Data  Using Group Functions
Les05[1]Aggregating Data Using Group Functions
 
Les10[1]Creating and Managing Tables
Les10[1]Creating and Managing TablesLes10[1]Creating and Managing Tables
Les10[1]Creating and Managing Tables
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
Les10 Creating And Managing Tables
Les10 Creating And Managing TablesLes10 Creating And Managing Tables
Les10 Creating And Managing Tables
 
Oracle: PLSQL Commands
Oracle: PLSQL CommandsOracle: PLSQL Commands
Oracle: PLSQL Commands
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
 
Les11 Including Constraints
Les11 Including ConstraintsLes11 Including Constraints
Les11 Including Constraints
 
Columnrename9i
Columnrename9iColumnrename9i
Columnrename9i
 
Mysql
MysqlMysql
Mysql
 
Mysql
MysqlMysql
Mysql
 
Les06[1]Subqueries
Les06[1]SubqueriesLes06[1]Subqueries
Les06[1]Subqueries
 
Oracle: DML
Oracle: DMLOracle: DML
Oracle: DML
 
2 sql - single-row functions
2   sql - single-row functions2   sql - single-row functions
2 sql - single-row functions
 
T sql denali code Day of .Net
T sql denali code Day of .NetT sql denali code Day of .Net
T sql denali code Day of .Net
 
Oracle views
Oracle viewsOracle views
Oracle views
 

Similar to Ijetr012023

Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
N/A
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
metsarin
 
Sql Queries
Sql QueriesSql Queries
Sql Queries
webicon
 
235689260 oracle-forms-10g-tutorial
235689260 oracle-forms-10g-tutorial235689260 oracle-forms-10g-tutorial
235689260 oracle-forms-10g-tutorial
homeworkping3
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
TheVerse1
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
prathap kumar
 
Stack in C.pptx
Stack in C.pptxStack in C.pptx
Stack in C.pptx
RituSarkar7
 
Les09.ppt
Les09.pptLes09.ppt
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
Mohd Tousif
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 
Commands
CommandsCommands
Commands
Ayushi Goyal
 
Oracle tips and tricks
Oracle tips and tricksOracle tips and tricks
Oracle tips and tricks
Yanli Liu
 
Cursors, triggers, procedures
Cursors, triggers, proceduresCursors, triggers, procedures
Cursors, triggers, procedures
Vaibhav Kathuria
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
NIRMAL FELIX
 
Triggers
TriggersTriggers
Triggers
Pooja Dixit
 
SQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureSQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update feature
Frans Jongma
 
SQL Notes
SQL NotesSQL Notes
Les08
Les08Les08
Advance Features In Procedues And Triggers
Advance Features In Procedues And TriggersAdvance Features In Procedues And Triggers
Advance Features In Procedues And Triggers
Keshav Murthy
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
Achmad Solichin
 

Similar to Ijetr012023 (20)

Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Sql Queries
Sql QueriesSql Queries
Sql Queries
 
235689260 oracle-forms-10g-tutorial
235689260 oracle-forms-10g-tutorial235689260 oracle-forms-10g-tutorial
235689260 oracle-forms-10g-tutorial
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
Stack in C.pptx
Stack in C.pptxStack in C.pptx
Stack in C.pptx
 
Les09.ppt
Les09.pptLes09.ppt
Les09.ppt
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
Commands
CommandsCommands
Commands
 
Oracle tips and tricks
Oracle tips and tricksOracle tips and tricks
Oracle tips and tricks
 
Cursors, triggers, procedures
Cursors, triggers, proceduresCursors, triggers, procedures
Cursors, triggers, procedures
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
Triggers
TriggersTriggers
Triggers
 
SQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureSQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update feature
 
SQL Notes
SQL NotesSQL Notes
SQL Notes
 
Les08
Les08Les08
Les08
 
Advance Features In Procedues And Triggers
Advance Features In Procedues And TriggersAdvance Features In Procedues And Triggers
Advance Features In Procedues And Triggers
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
 

More from ER Publication.org

Ijetr011101
Ijetr011101Ijetr011101
Ijetr011101
ER Publication.org
 
Ijetr021232
Ijetr021232Ijetr021232
Ijetr021232
ER Publication.org
 
Ijetr021229
Ijetr021229Ijetr021229
Ijetr021229
ER Publication.org
 
Ijetr021228
Ijetr021228Ijetr021228
Ijetr021228
ER Publication.org
 
Ijetr021226
Ijetr021226Ijetr021226
Ijetr021226
ER Publication.org
 
Ijetr021224
Ijetr021224Ijetr021224
Ijetr021224
ER Publication.org
 
Ijetr021221
Ijetr021221Ijetr021221
Ijetr021221
ER Publication.org
 
Ijetr021220
Ijetr021220Ijetr021220
Ijetr021220
ER Publication.org
 
Ijetr021215
Ijetr021215Ijetr021215
Ijetr021215
ER Publication.org
 
Ijetr021211
Ijetr021211Ijetr021211
Ijetr021211
ER Publication.org
 
Ijetr021210
Ijetr021210Ijetr021210
Ijetr021210
ER Publication.org
 
Ijetr021207
Ijetr021207Ijetr021207
Ijetr021207
ER Publication.org
 
Ijetr021146
Ijetr021146Ijetr021146
Ijetr021146
ER Publication.org
 
Ijetr021145
Ijetr021145Ijetr021145
Ijetr021145
ER Publication.org
 
Ijetr021144
Ijetr021144Ijetr021144
Ijetr021144
ER Publication.org
 
Ijetr021143
Ijetr021143Ijetr021143
Ijetr021143
ER Publication.org
 
Ijetr021140
Ijetr021140Ijetr021140
Ijetr021140
ER Publication.org
 
Ijetr021139
Ijetr021139Ijetr021139
Ijetr021139
ER Publication.org
 
Ijetr021138
Ijetr021138Ijetr021138
Ijetr021138
ER Publication.org
 
Ijetr021135
Ijetr021135Ijetr021135
Ijetr021135
ER Publication.org
 

More from ER Publication.org (20)

Ijetr011101
Ijetr011101Ijetr011101
Ijetr011101
 
Ijetr021232
Ijetr021232Ijetr021232
Ijetr021232
 
Ijetr021229
Ijetr021229Ijetr021229
Ijetr021229
 
Ijetr021228
Ijetr021228Ijetr021228
Ijetr021228
 
Ijetr021226
Ijetr021226Ijetr021226
Ijetr021226
 
Ijetr021224
Ijetr021224Ijetr021224
Ijetr021224
 
Ijetr021221
Ijetr021221Ijetr021221
Ijetr021221
 
Ijetr021220
Ijetr021220Ijetr021220
Ijetr021220
 
Ijetr021215
Ijetr021215Ijetr021215
Ijetr021215
 
Ijetr021211
Ijetr021211Ijetr021211
Ijetr021211
 
Ijetr021210
Ijetr021210Ijetr021210
Ijetr021210
 
Ijetr021207
Ijetr021207Ijetr021207
Ijetr021207
 
Ijetr021146
Ijetr021146Ijetr021146
Ijetr021146
 
Ijetr021145
Ijetr021145Ijetr021145
Ijetr021145
 
Ijetr021144
Ijetr021144Ijetr021144
Ijetr021144
 
Ijetr021143
Ijetr021143Ijetr021143
Ijetr021143
 
Ijetr021140
Ijetr021140Ijetr021140
Ijetr021140
 
Ijetr021139
Ijetr021139Ijetr021139
Ijetr021139
 
Ijetr021138
Ijetr021138Ijetr021138
Ijetr021138
 
Ijetr021135
Ijetr021135Ijetr021135
Ijetr021135
 

Recently uploaded

skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 

Recently uploaded (20)

skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 

Ijetr012023

  • 1. International Journal of Engineering and Technical Research (IJETR) ISSN: 2321-0869, Volume-1, Issue-10, December 2013 46 www.erpublication.org  Abstract— “Update” is a command in database language like SQL etc. to update a/some column value of a particular row of a given table leaving all the other column unchanged in that particular row of that given table. We will discuss in this paper how to remove “Update” command from the database language like SQL and also “History” table from the database by adding another column removing also a column “LAST_UPDATED” from a given table. We will also discuss the process from GUI level. Index Terms— SQL, GUI level, database language. I. INTRODUCTION A. Content 1) What is ―Update‖ command. 2) Example. 3) What is ―History‖ table. 4) Example. 5) How to remove ―Update‖ command and ―History‖ table. 6) Removal of EDIT/UPDATE option from GUI. 7) Advantages. 8) Pareto Efficiency. 9) Pareto improvement in existing system. 10) Invention is efficient or not. II. WHAT IS ―UPDATE‖ COMMAND In SQL ―Update‖ command is used to update a/some column value of a particular row of a given table by leaving other column values of that particular row of the given table unchanged. Example Let us consider the following data of a company in database. Manuscript received December 02, 2013. Shubhankar Paul, Passed BE in Electrical Engineering from Jadavpur University in 2007. Worked at IBM as Manual Tester with designation Application Consultant for 3 years 4 months. We have considered 3 rows and 4 columns. Now, let say, JOB_ROLE of Paul is promoted to ―Officer‖ from ―Jr. Officer‖. Here we will use the below command to update the JOB_ROLE only leaving ROW_ID, EMP_ID, NAME unchanged. UPDATE EMPLOYEE_TABLE SET JOB_ROLE = ‗Officer‘ WHERE EMP_ID = ‗9072‘; And the result will be as given below in the image : This is how ―Update‖ command works. III. WHAT IS ―HISTORY‖ TABLE ―History‖ table stores all previous data of a row which has been updated one or multiple time(s). Example Let us consider the following data of employees of a given company : Removal of History table from Database & Update Command from SQL & Edit option from GUI Shubhankar Paul
  • 2. Removal of History table from Database & Update Command from SQL & Edit option from GUI 47 www.erpublication.org Let, Paul is promoted to ―Officer‖ from ―Jr. Officer‖ on 3/4/2006 and Jack is demoted to ―Officer‖ from ―Sr. Officer‖ on 1/2/2005. The update command will change the EMPLOYEE_TABLE as below : Now, the ―History‖ table will store the previous records which were previously and updated as shown below : How to remove ―Update‖ command and ―History‖ table: We can do it in two ways. We will define a new operator, say, ―Cross‖ or we can add a new column to the existing table and remove LAST_UPD. 1. Cross operator : a(cross)b means the record whose ROW_ID (primary key) = a has been updated (b-1) times and 1 time it was created. For example, 2(cross)5 means second record is created and updated 4 times after creation. 5(cross)2 means fifth record created and updated 1 time after creation. So, 2(cross)5 is not equal to 5(cross)2 (not to confuse with general multiplication where 2*5 = 5*2 = 10). 2. Adding one column and removing LAST_UPD column : The column that will be added will contain value 1 when a record is created and will take values 2, 3, 4, ... when updated. So, Primary key of a record in a given table will be composed of 2 columns viz. ROW_ID and NEW_COLUMN. When a record will be searched it will show the last numbered NEW_COLUMN. We have seen in the Example of ―History‖ table we need LAST_UPD column to track when it was last updated. Here we will see in an example with previous data how NEW_COLUMN will help unnecessary of ―History‖ table and ―LAST_UPD‖ column. Please note UPD_DATE is not a new column. It should exist in every table to track when the record was created. Now, Paul is promoted to ―Officer‖ from ―Jr. Officer‖ on 3/4/2006 and Jack is demoted to ―Officer‖ from ―Sr. Officer‖ on 1/2/2005. Without using ―Update‖ command we will use ―INSERT INTO‖ as below : INSERT INTO EMPLOYEE_TABLE (ROW_ID, NEW_COLUMN, NAME, J_ROLE, UPD_DATE) SELECT ROW_ID, NEW_COLUMN, NAME FROM EMPLOYEE_TABLE WHERE ROW_ID = 2 SET J_ROLE = ‗Officer‘, NEW_COLUMN = ‗NEW_COLUMN+1‘; This command will insert a new row in the table with same ROW_ID and all other column except J_ROLE which is updated to ‗Officer‘ and NEW_COLUMN is set to 2. Similarly, for Paul, INSERT INTO EMPLOYEE_TABLE (ROW_ID, NEW_COLUMN, NAME, J_ROLE, UPD_DATE) SELECT ROW_ID, NEW_COLUMN, NAME FROM EMPLOYEE_TABLE WHERE ROW_ID = 3 SET J_ROLE = ‗Officer‘, NEW_COLUMN = ‗NEW_COLUMN+1‘; The updated table will look like below :
  • 3. International Journal of Engineering and Technical Research (IJETR) ISSN: 2321-0869, Volume-1, Issue-10, December 2013 48 www.erpublication.org We see that History is already created in the UPD_DATE or CREATE_DATE. All records are there in this table. So, we do not need any ―History‖ table. IV. REMOVAL OF EDIT/UPDATE OPTION FROM GUI In GUI we will use ―Copy Record‖ option to update a record. When we will click on ―Copy Record‖ option then that particular row will be copied with NEW_COLUMN = NEW_COLUMN+1 value and it will be editable until saved. Then we can put updated value for a/some column we want to update. Then it will be saved in database with same ROW_ID but different NEW_COLUMN. As we have already discussed primary key will be composition of ROW_ID and NEW_COLUMN. Note : We can also define ―Copy Row‖ in database level also like GUI. V. ADVANTAGES 1. A table space (History table) is removed without affecting anything else. This will enhance the efficiency of database. 2. A command ―Update‖ is removed from database language like SQL. 3. EDIT/UPDATE option is removed from GUI. Sometimes it happens due to unconsciousness a data is updated. This type of error is removed as it will be read-only in GUI as well for ADMIN. 4. Removal of an option from GUI (EDIT/UPDATE) will increase the efficiency of Business layer. 5. Every record that is deleted will be given a NULL or 0 value in NEW_COLUMN. It will help the system to search for the maximum value of NEW_COLUMN otherwise the system will not be able to understand the maximum value of NEW_COLUMN. For example, say a record is created and updated 2 times and second record i.e. the record with NEW_COLUMN = 2 value is deleted. Then query command will not find 3 as after 1 it will not find 2. But if it finds a NULL or 0 for NEW_COLUMN then it will understand record 2 is deleted. Then it will search for record 3 and output the maximum valued NEW_COLUMN record. We can calculate the number of record with NEW_COLUMN = NULL or 0. Now {(Total number of record – Record with NEW_COLUMN = NULL or 0)/Total number of records}*100 will give the consciousness of a team working on a particular project. Because we are not supposed to delete record if it is not mistyped any column due to unconsciousness. 6. It is convenient to use 2 digit integer for NEW_COLUMN because a record will not be updated for more than 99 times. It will reduce the database level memory as the column LAST_UPDATED, which is a date-time stamp, is more memory occupying, is removed. 7. The more NEW_COLUMN value the interaction of that customer is more with the company as the data is getting updated for NEW_COLUMN – 1 times. NEW_COLUMN value can also be greater if record is deleted due to unconsciousness of an employee as discussed in point 5. So, we can define a measure to calculate interaction of a customer as, Interaction = {(Maximum NEW_COLUMN value – number of records with NEW_COLUMN = NULL or 0 with given ROW_ID)/Maximum NEW_COLUMN value}*100%. The more the value the interaction of that particular customer with company is more. 8. The efficiency of GUI also increase as an option is removed from there. 9. If we define cross operator then NEW_COLUMN is not needed. VI. PARETO EFFICIENCY We start with the following definition: if we can find a way to make some people better off without making anybody else worse off, we have a Pareto improvement. If an allocation allows for a Pareto improvement, it is called Pareto inefficient; if an allocation is such that no Pareto improvements are possible, it is called Pareto efficient. In our given system we are not making the system worse off in any condition and we can find lots of advantages as discussed. So, there is a Pareto Improvement in the system is possible. According to above definition the system is Pareto inefficient. Invention is Efficient or not : From the Pareto Efficiency section we can see that we find a Pareto improvement. So, the invention is efficient. REFERENCES [1] Intermediate Microeconomics A modern approach 8th edition by Hal. R. Varian. [2]http://stackoverflow.com/questions/9156340/how-to-copy-a-row- nd-insert-in-same-table-with-a-autoincrement-field-in-mysql Shubhankar Paul, Passed BE in Electrical Engineering from Jadavpur University in 2007. Worked at IBM as Manual Tester with designation Application Consultant for 3 years 4 months. Worked at IIT Bombay for 3 months as JRF. Published 2 papers at International Journal.