SlideShare a Scribd company logo
1 of 3
Download to read offline
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 (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 NologgingN/A
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slidesmetsarin
 
Sql Queries
Sql QueriesSql Queries
Sql Querieswebicon
 
235689260 oracle-forms-10g-tutorial
235689260 oracle-forms-10g-tutorial235689260 oracle-forms-10g-tutorial
235689260 oracle-forms-10g-tutorialhomeworkping3
 
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 UsedTheVerse1
 
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 2007paulguerin
 
Oracle tips and tricks
Oracle tips and tricksOracle tips and tricks
Oracle tips and tricksYanli Liu
 
Cursors, triggers, procedures
Cursors, triggers, proceduresCursors, triggers, procedures
Cursors, triggers, proceduresVaibhav Kathuria
 
My sql with querys
My sql with querysMy sql with querys
My sql with querysNIRMAL FELIX
 
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 featureFrans Jongma
 
Advance Features In Procedues And Triggers
Advance Features In Procedues And TriggersAdvance Features In Procedues And Triggers
Advance Features In Procedues And TriggersKeshav 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 (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

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 

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.