You are on page 1of 71

S.

No INDEX Page No
1.
2.
3
4
5
6
7
8
9
10
11
Abstract
1.1 Organization Profile
1.2 Problem Definition
System St!y
2.1 Existing System
2.2 Proposed System
System A"a#ys$s
3.1 Packages selected
3.2 Resorces Re!ired
3.3 System "lo# Diagram
System Des$g"
$.1 %npt deign
$.2 Otpt design
Im%#eme"tat$o"
&est$"g
'a$"te"a"ce
(ser 'a"a#
&.1 'ard#are Re!irement
&.2 Soft#are Re!irement
)o"c#s$o"
*e+ere"ces
A%%e"!$,es
11.1 Soft#are Profile
11.2 Sorce (ode
11.3 Screen S)ots
A-S&*A)&
Pro*ing o#ners)ip rig)ts on otsorced relational databases is a crcial isse in
today+s internet,based application en*ironments and in many content distribtion
applications. %n t)is paper- #e present a mec)anism for proof of o#ners)ip based on t)e
secre embedding of a robst imperceptible #atermark in relational data. .e formlate
t)e #atermarking of relational databases as a constrained optimization problem and
discss efficient tec)ni!es to sol*e t)e optimization problem and to )andle t)e
constraints. Or #atermarking tec)ni!e is resilient to #atermark sync)ronization errors
becase it ses a partitioning approac) t)at does not re!ire marker tples. Or approac)
o*ercomes a ma/or #eakness in pre*iosly proposed #atermarking tec)ni!es.
.atermark decoding is based on a t)res)old,based tec)ni!e c)aracterized by an optimal
t)res)old t)at minimizes t)e probability of decoding errors. .e implemented a proof of
concept implementation of or #atermarking tec)ni!e and s)o#ed by experimental
reslts t)at or tec)ni!e is resilient to tple deletion- alteration- and insertion attacks.
IN&*.D()&I.N/


0)e rapid gro#t) of internet and related tec)nologies )as offered an
nprecedented ability to access and redistribte digital contents. %n sc) a context-
enforcing data o#ners)ip is an important re!irement #)ic) re!ires articlated
soltions- encompassing tec)nical- organizational and legal aspects. 0)og) #e are still
far from sc) compre)ensi*e soltions- in t)e last years #atermarking tec)ni!es )a*e
emerged as an important bilding block #)ic) plays a crcial role in addressing t)e
o#ners)ip problem. Sc) tec)ni!es allo# t)e o#ner of t)e data to embed an
imperceptible #atermark into t)e data.
1 #atermark describes information t)at can be sed to pro*e t)e o#ners)ip of
data- sc) as t)e o#ner- origin- or recipient of t)e content. Secre embedding re!ires
t)at t)e embedded #atermark mst not be easily tampered #it)- forged- or remo*ed from
t)e #atermarked data. %mperceptible embedding means t)at t)e presence of t)e
#atermark is nnoticeable in t)e data. "rt)ermore- t)e #atermark detection is blinded-
t)at is- it neit)er re!ires t)e kno#ledge of neit)er t)e original data nor t)e #atermark.
.atermarking tec)ni!es )a*e been de*eloped for *ideo- images- adio- and text data
and also for soft#are and natral langage text.
2y contrast t)e problem of #atermarking relational data )as not been gi*en
appropriate attention. 0)ere are- )o#e*er- many application contexts for #)ic) data
represent an important asset- t)e o#ners)ip of #)ic) mst t)s be careflly enforced.
0)is is t)e case- for example- of #eat)er data- stock market data- po#er consmption-
consmer be)a*ior data- medical and scientific data.
.atermark embedding for relational data is made possible by t)e fact t)at real
data can *ery often tolerate a small amont of error #it)ot any significant degradation
#it) respect to t)eir sability. "or example #)en dealing #it) #eat)er data- c)anging
some daily temperatres of 1 or 2 degrees is a modification t)at lea*es t)e data still
sable.
0o date only a fe# approac)es to t)e problem of #atermarking relational data
)a*e been proposed. 0)ese tec)ni!es- )o#e*er- are not *ery resilient to #atermark
attacks. %n t)is pro/ect- #e present a #atermarking tec)ni!e for relational data t)at is
)ig)ly resilient compared to t)ese tec)ni!es. %n particlar- or proposed tec)ni!e is
resilient to tple deletion- alteration- and insertion attacks.
).'PAN0 P*.1I2E/
Softec) 3lobal Soltions #as incorporated in t)e year 1445- as a soft#are
ser*ices company. Since 1445- t)e company is in*ol*ed in *arios acti*ities like
Soft#are De*elopment- Systems %ntegration- (onsltancy Ser*ices and (orporate
0raining etc.-. 0)e (ompany is a )ig) tec)nology dri*en organization fonded and
managed by efficient and )ig)ly respected *isionaries #it) #ide range of experience and
expertise in t)e %0 related indstry. Or company mission is to sol*e traditional bsiness
problems in ne# #ays and )o# to address t)e ne# set of isses t)at come #it) progress.
.e )a*e t)e tec)nology and bsiness expertise to make it a reality.
0)e company is specializing in t)e areas like .eb de*elopment sing
62EE 0ec)nologies- .7et 0ec)nologies and so on. 0)e company also in*ol*es in t)e areas
like client ser*er tec)nologies- distribted compting- data #are)osing and .1P
tec)nologies. 0)e company )as a soft#are de*elopment centre at ()ennai )as a 2$ 8 9
spport facility for clients. 0)e (ompany )as its (orporate Office at : 7e# 7o:
12- ;nited %ndia (olony- 3
rd
(ross Street- <odambakkam- ()ennai , 5== =2$. 0)e office
space is 3=== s!ft #it) state of art infrastrctre #it) >= )ig)ly skilled professionals.
Prese"t -s$"ess Act$3$ty/
Or company is engaged in t)e acti*ities of Soft#are De*elopment-
Systems %ntegration- (onsltancy Ser*ices and (orporate 0raining. .e )a*e de*eloped
many .eb Portals- 1pplication Prodcts- (on*ersion Pro/ects- ?aintenance Pro/ects
and a #ide range of mini ERP soltions to *arios medim range indstries. 1lso #e
in*ol*ed in migration of applications from DOS based applications to 3;% based
applications.
.e )a*e de*eloped some applications like 1tomation soft#are for Sper
?arket- Soft#are for 0extile %ndstries- Soft#are for 0ra*el %ndstries and 1ccont
?anagement Soft#are for *arios companies. .e )a*e also set p #eb based intranet
soltions to its clients. .e are offering or ser*ices in t)e follo#ing areas of %0:
S.1&4A*E S.2(&I.NS/
1.De3e#o%$"g E5)ommerce Porta#s/
.e )a*e de*eloping and deploying .eb Portals for or cstomers in 222 and
22( applications. Or professional ser*ices for )elp in formlating E,bsiness strategy-
as #ell as in designing- cstomizing and implementing E,bsiness soltions. 1lso #e #ill
gi*e t)e spport for %nternet and %ntranet based applications for *arios
2. De3e#o%$"g '$"$ a"! '$cro E*P Pac6ages/
.e )a*e already de*eloped mini ERP soltions sing @2- 62EE and .7et
tec)nologies #it) *arios databases for its cstomers. .e )a*e planned to de*elop more
cstomized applications to sit medim scale establis)ments. .e )a*e also proposed to
de*elop ?icro ERP applications sing .eb 0ec)nologies #it) SAB ser*er as a database.
3. De3e#o%$"g A%%#$cat$o" Pro!cts/
Presently or team )as in*ol*ed in t)e en)ancement #ork for Bogistics
pro/ect. 0)is applications are sed as a front end as 1SP.net C @2.net. 0)ese applications
are mainly sed for (learing and "or#arding 1gents and (argo ?anagement prposes.
4. Pro+ess$o"a# Ser3$ces/
So+t7are )o"s#ta"t )o"tract$"g/
.e pro*ide )ig)ly skilled soft#are professionals for *arios companies
bot) in %ndia and O*erseas. .e )a*e a separate team #)o #ork for t)is prpose. .e are
crrently tied p #it) some ?7( companies for )man resorces on contract basis for
giants like %2?- .ipro and so on. .e are also tied p #it) ?ascon 3lobal- Satyam
(ompter Ser*ices- '(B 0ec)nologies for pro*iding resorces of *aried skill sets. .e
can pro*ide good- !alified- experienced and cltred resorces to sit t)e re!irements
of t)e clients.
5.)or%rate &ra$"$"g/
0raining is carried ot #it) #ell planned met)odology of t)eory and
pro/ect orientation #)ic) )elps to de*elop potential )man resorce for %0 sector. .e
)a*e also carried ot corporate 0raining to ma/or companies sc) as '(B- (0S- .%PRO-
S10D1?- (O@17SDS and etc.
6. .r 8ar$os )#$e"ts/
1ccentra Systems Pte Btd.- E?alaysiaF
?en+s Parc E()ennaiF
7ellai Stores E()ennaiF
Sri ?t)aramman Departmental Stores E()ennaiF
7e# 6ot)i Stores E()ennaiF
?acsoft 0ec)nologies E(oimbatoreF
Bogic soft Systems E7e# Del)iF


2. S0S0E' S&(D0
System stdy deals #it) t)e process of defining t)e fnctioning of existing
system. 0)e ad*antages and disad*antages of t)e existing system are elaborately
discssed to pro*e t)e #ay for t)e proposed system. 0)en t)e proposed system is defined
for t)e problem and t)e ad*antages of t)e proposed system are also defined.
2.1 EXIS&IN9 S0S&E'/
Existing #atermarking tec)ni!e t)at embeds #atermark bits in t)e data
statistics. 0)e data partitioning tec)ni!e sed is based on t)e se of special marker
tples #)ic) makes it *lnerable to #atermark sync)ronization errors reslting from
tple deletion and tple insertionG t)s sc) tec)ni!e is not resilient to deletion and
insertion attacks. Existing system recommend storing t)e marker tples to enable t)e
decoder to accrately reconstrct t)e nderlying partitionsG )o#e*er t)is *iolates t)e
blinded #atermark detection property.
Existing #atermarking algorit)m t)at embeds t)e #atermark bits in t)e least
significant bits EBS2F of selected attribtes of a selected sbset of tples. 0)is tec)ni!e
does not pro*ide a mec)anism for mltibit #atermarksG instead only a secret key is sed.
"or eac) tple- a secre message at)enticated code E?1(F is compted sing t)e secret
key and t)e tpleHs primary key. 0)e compted ?1( is sed to select candidate tples-
attribtes and t)e BS2 position in t)e selected attribtes.
2.2 P*.P.SED S0S&E'/

0)e main contribtions of t)e paper are smmarized as follo#s:
.e formlate t)e #atermarking of relational databases as a constrained
optimization problem- and discss efficient tec)ni!es to )andle t)e constraints. .e
present t#o tec)ni!es to sol*e t)e formlated optimization problem based on genetic
algorit)ms and pattern searc) tec)ni!es.
.e present a data partitioning tec)ni!e t)at does not depend on marker tples to
locate t)e partitions and t)s it is resilient to #atermark sync)ronization errors.
.e de*elop an efficient tec)ni!e for #atermark detection t)at is based on an
optimal t)res)old. 0)e optimal t)res)old is selected by minimizing t)e probability of
decoding error.
.it) a proof of concept implementation of or #atermarking tec)ni!e- #e )a*e
condcted experiments sing real,#orld data.

3. S0S&E' ANA20SIS
System analysis is t)e process of gat)ering and interpreting facts-
diagnosing problems of t)e existing system and sing t)ose facts for t)e design and
de*elopment of an impro*ed system t)at )elps to determine )o# and #)ere
compterized system can benefits all sers of t)e system.
3.1 Pac6age se#ecte! /
Operating system : .indo#s 2===
Bangage : (I
3.2 *esorces re:$re!/
So+t7are /
Operating system : .indo#s 2=== and abo*e
"ront end : 1SP.7et
2ackend : SAB Ser*er 2==>
;ar!7are/
Processor J System : Pentim %@
Processor Speed : 5==?'z
?ain ?emory : >12?2 R1?
'ard Disk : $=32
Secondary Storage : "DD1.$$?2C>28 (D RO?
<eyboard : 0E(',(O?1=9 keys
?onitor : KSamsang (olar monitor 1>L
7et#ork adapter : Et)ernet &=2.3
'o!#es/
1. Data set partitioning
2. .atermark embedding
3. Optimal t)res)old e*alation
$. 0)res)old based decoding
> . .atermark Decoding
1. Data set %art$t$o"$"g
2y sing t)e secret key <s t)e data set D is partitioned into m non,
o*erlapping partitions MS=- . . . - Sm.1N.0)e data set D is a database relation #it) sc)eme
DEP-1=- . . . - 1*,1F- #)ere P is t)e primary key attribte- 1=- . . . - 1*,1 are * attribtes
#)ic) are candidates for #atermarking and ODO is t)e nmber of tples in D. 0)e data set
D is to be partitioned into m non,o*erlapping partitions namely MS=- . . . - Sm,1N- sc)
t)at eac) partition Si contains on a*erage ODOCm tples from t)e data set D. Partitions do
not o*erlap- t)at is- for any t#o partitions Si and S/ sc) t)at i P / #e )a*e Si QS/ R MN.
"or eac) tple r S D t)e data partitioning algorit)m comptes a message at)enticated
code E?1(F #)ic) is considered to be secre and is gi*en by 'E<sOO'Er.POO<sFF- #)ere
r.P is t)e primary key of t)e tple r- 'EF is a secre )as) fnction and OO is t)e
concatenation operator. ;sing t)e compted ?1( tples are assigned to partitions. "or a
tple r its partition assignment is gi*en by partitionErF R 'E<sOO'Er.POO<sFF mod m ;sing
t)e property t)at secre )as) fnctions generate niformly distribted message digests
t)is partitioning tec)ni!e on a*erage places ODO C m tples in eac) partition. "rt)ermore-
an attacker cannot predict t)e tples,to,partition assignment #it)ot t)e kno#ledge of t)e
secret key <s and t)e nmber of partitions m #)ic) are kept secret. <eeping m secret is
not a re!irement. 'o#e*er- keeping it secret makes it )arder for t)e attacker to
regenerate t)e partitions.
2. 4atermar6 embe!!$"g
#atermark bit is embedded in eac) partition by altering t)e partition statistics
#)ile still *erifying t)e sability constraints in 3. 0)is alteration is performed by sol*ing
a constrained optimization problem.
"ormalizing t)e bit encoding as a constrained optimization problem. 0)en #e propose a
genetic algorit)m and a pattern searc) tec)ni!e t)at can be sed to efficiently sol*e sc)
optimization problem. 0)e selection of #)ic) optimization algorit)m to se is decided
according to t)e application time and processing re!irements. Or #atermarking
tec)ni!e is able to )andle tples #it) mltiple attribtes.
3. .%t$ma# t<res<o#! e3a#at$o"
0)e bit embedding statistics are sed to compte t)e optimal t)res)old 0T t)at
minimizes t)e probability of decoding error.
4. &<res<o#! base! !eco!$"g
0)e data partitioning algorit)m sed in E1- t)e data partitions are generated. 1fter
t)e statistics of eac) partition are e*alated and t)e embedded bit is decoded sing a
t)res)old based sc)eme based on t)e optimal t)res)old 0T.
5. 4atermar6 Deco!$"g
0)e #atermark bits are decoded sing a ma/ority *oting tec)ni!e. t)e #atermark
detection algorit)m #)ic) extracts t)e embedded #atermark sing t)e secret parameters
inclding <s- m- U- c- 0. 0)e algorit)m starts by generating t)e data partitions MS=- . . . -
Sm,1N sing t)e #atermarked data set D.- t)e secret key <s and t)e nmber of
partitions m as inpt to t)e data partitioning algorit)m.
t)e data partitioning algorit)m t)at partitions t)e data set based on a secret key <s. 0)e
data set D is a database relation #it) sc)eme DEP-1=- . . . - 1*,1F- #)ere P is t)e primary
key attribte- 1=- . . . - 1*,1 are * attribtes #)ic) are candidates for #atermarking and O
DO is t)e nmber of tples in D. 0)e data set D is to be partitioned into m non,
o*erlapping partitions namely MS=- . . . - Sm,1N- sc) t)at eac) partition Si contains on
a*erage ODOCm tples from t)e data set D. Partitions do not o*erlap- t)at is- for any t#o
partitions Si and S/ sc) t)at i P / #e )a*e Si QS/ R MN. "or eac) tple r S D t)e data
partitioning algorit)m comptes a message at)enticated code E?1(F #)ic) is
considered to be secre and is gi*en by 'E<sOO'Er.POO<sFF- #)ere r.P is t)e primary key of
t)e tple r- 'EF is a secre )as) fnction and OO is t)e concatenation operator. ;sing t)e
compted ?1( tples are assigned to partitions. "or a tple r its partition assignment is
gi*en by partitionErF R 'E<sOO'Er.POO<sFF mod m ;sing t)e property t)at secre )as)
fnctions generate niformly distribted message digests t)is partitioning tec)ni!e on
a*erage places ODO C m tples in eac) partition. "rt)ermore- an
attacker cannot predict t)e tples,to,partition assignment #it)ot t)e kno#ledge of t)e
secret key <s and t)e nmber of partitions m #)ic) are kept secret. <eeping m secret is
not a re!irement. 'o#e*er- keeping it secret makes it )arder for t)e attacker to
regenerate t)e partitions.

4. S0S&E' DESI9N
)o"ce%ts
0)e Design of an information system prodces t)e details t)at state )o# a system
#ill meet t)e re!irements identified dring analysis. 0)e emp)asis is on translating t)e
Performance- re!irements into design Specifications. 0)e *arios steps in designing t)e
K1n Efficient 0ime,2ond 'ierarc)ical <ey ?anagement Sc)eme for Secre
2roadcasting L are as follo#s
I"%t !es$g"
%npt design is t)e process of con*erting ser,oriented inpt into compter,
based format. 0)e goal of designing inpt data is to make data entry as easy as possible
and free from errors. Errors in t)e inpt are )andled in t)e inpt design. 0)e inpt data is
t)e lifeblood of a system and )a*e to be analyzed and designed #it) tmost case and
consideration. 0)e decisions made dring t)e inpt design are:
0o pro*ide cost effecti*e met)od of inpt
0o ac)ie*e t)e )ig)est possible le*el of accracy
0o ensre t)at inpt is nderstand by t)e ser
%n t)is pro/ect *arios resorces like textboxes- dropdo#n list- link bttons etc
are sed for accepting ser inpts. 0)e main type of inpts to t)is pro/ect is files #)ic)
can be a text file or image file. 0)e ot)er inpts to t)is pro/ect inclde file names-
destination ser name- integer *ales for splitting files into packets. 0)e file name is
not)ing bt t)e file t)at is to be spited into packets and transferred to t)e specified
destination. Destination ser name is t)e ser #)o is going to reassemble t)e spited
packets. 0aking into accont- all t)e abo*e needs of t)e inpt designing- t)e ne# process
designing cold )a*e t)e follo#ing featres. %n all cases processing s)old be atomatic
and manal #ork s)old be kept minimm.
Similarly- t)e ser inpt s)old also be kept minimm or least extend possible. 2y gi*ing
t)e abo*e inpt calclations s)old be atomatic. 0)e ato calclation is t)e motto of t)is
ne# process- #)ile pro*iding t)e ato calclation t)e reslts #it) minimm time
operation- s)old be accrate and free from errors.
.(&P(& DESI9N/
Otpt design generally refers to t)e reslts and informationHs t)at are generated
by t)e system for many end,sersG otpt is t)e main reason for de*eloping t)e system
and t)e basis on #)ic) t)ey e*alate t)e seflness of t)e application. 0)e basic
re!irements of otpt are t)at it s)old be accrate- timely and appropriate- in terms of
content- medim and layot for its intended prpose.
5.I'P2E'EN&A&I.N
0)e final and important p)ase in t)e system life cycle is t)e implementation of t)e
ne# system. 0)e term implementation )as different meanings ranging from t)e
con*ersion of a basic application to a complete replacement of a compter system. 0)e
procedres )o#e*er- are *irtally t)e same. %mplementation incldes all t)ose acti*ities
t)at take place to con*ert from old system to ne#. 0)e ne# system may be totally ne#
replacing an existing algorit)m. 0)e performance is *ery good- #)en #e compare to
existing system.
0)e met)od of implementation and time scale to be adopted is fond ot initially.
7ext t)e system is tested properly and at t)e same time t)e sers are trained in t)e ne#
procedre. Proper implementation is essential to pro*ide a reliable system to meet
organization re!irements. Sccessfl implementation may not garantee impro*ement in
t)e organization sing t)e ne# system- bt it #ill pre*ent improper installation.
SA'P2E ).DIN9/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Text;
using System.IO;
using System.Data.SqlClient;
namespace relationdataasewatermar!ing
"
pulic partial class Form#
"
$region de%inition
string pat& ' (c)**output**(;

$endregion
internal Form#+,
"
Initiali-eComponent+,;
.

pri/ate /oid Form#01oad+o2ect sender3 System.4/ent5rgs e,
"
1ist6ox#.7isile ' %alse;
.
pri/ate /oid 6utton80Clic!0#+o2ect sender3 4/ent5rgs e,
"
1ist6ox#.7isile ' true;
System.IO.FileStream InputFileStream ' null;
System.IO.FileStream OutputFileStream ' null;
yte9: 6u%%er ' new yte9: " .;
6inary;eader 6inary;eader ' null;
6inaryWriter 6inaryWriter ' null;
string %name ' null;
string %ext ' null;
%ext '
Text6ox#.Text.Sustring+Text6ox#.Text.1astIndexO%+(**(, < #,;
%name ' %ext.Sustring+=3 %ext.1astIndexO%+(.(,,;
string %ilename ' Text6ox#.Text;
int si-e ' #====;
try
"
InputFileStream ' new FileStream+%ilename3
File>ode.Open,;
6inary;eader ' new 6inary;eader+InputFileStream,;
6inary;eader.6aseStream.See!+=3 See!Origin.6egin,;

int limit ' =;
limit '
Con/ert.ToInt#?+>icroso%t.7isual6asic.FileSystem.File1en+%ilename, @
si-e,;
long amountsent ' =;
long i ' =;
w&ile +A+i '' limit,,
"
6u%%er ' new yte9si-e:;
6inary;eader.;ead+6u%%er3 =3 si-e,;
6inary;eader.6aseStream.See!+=3 See!Origin.Current,;

OutputFileStream ' new
System.IO.FileStream+(c)**split**( < %name < (.( <
>icroso%t.7isual6asic.Strings.Format+i < #3 ((,3 File>ode.Create,;
6inaryWriter ' new 6inaryWriter+OutputFileStream,;
6inaryWriter.Write+6u%%er,;
OutputFileStream.Flus&+,;
6inaryWriter.Close+,;
OutputFileStream.Close+,;
amountsent ' amountsent < si-e;
i ' i < #;
.
i% +amountsent B
>icroso%t.7isual6asic.FileSystem.File1en+%ilename,,
"
si-e '
Con/ert.ToInt#?+>icroso%t.7isual6asic.FileSystem.File1en+%ilename, C
amountsent,;
6u%%er ' new yte9si-e:;
6inary;eader.;ead+6u%%er3 =3 si-e,;
6inary;eader.6aseStream.See!+=3 See!Origin.Current,;
@@ OutputFileStream ' Dew
System.IO.FileStream+(4)*sud&es&*WeSite#8*images*( E (split.( E
Format+i < #3 (==(,3 File>ode.Create,
OutputFileStream ' new
System.IO.FileStream+(c)**split**( < %name < (.( <
>icroso%t.7isual6asic.Strings.Format+i < #3 ((,3 File>ode.Create,;
6inaryWriter ' new 6inaryWriter+OutputFileStream,;
6inaryWriter.Write+6u%%er,;
OutputFileStream.Flus&+,;
6inaryWriter.Close+,;
OutputFileStream.Close+,;
amountsent ' amountsent < si-e;
@@IDST5DT C$ DOT4) Commented t&is declaration since
looping /ariales in F%oreac&F loops are declared in t&e F%oreac&F
&eader in C$
@@ string s ' null;
%oreac& +string s in
System.IO.Directory.GetFiles+(c)**split(3 %name < (.G(,,
"
1ist6ox#.Items.5dd+s,;
.
>essage6ox.S&ow+(data partioned sucess%ully(,;
.
.
catc& +4xception ex,
"
>essage6ox.S&ow+ex.>essage,;
@@>essage6ox.S&ow+(pli- c&oose t&e %ile(,;
1ist6ox#.7isile ' %alse;
.
.
pulic /oid decode+,
"
string9: %iles ' Directory.GetFiles+(c)**split(,;
%oreac& +string %ile in %iles,
"
File.Delete+(c)**output**( <
%ile.Sustring+%ile.1astIndexO%+H(*(, < #,,;
File.Copy+%ile3 (c)**output**( <
%ile.Sustring+%ile.1astIndexO%+H(*(, < #,,;

.
6. &ES&IN9
System &est$"g/
0)e soft#are- #)ic) )as been de*eloped- )as to be tested to pro*e its *alidity.
0esting is considered t)e least creati*e p)ase of t)e #)ole cycle of system design. %n t)e
real sense it is t)e p)ase- #)ic) )elps to bring ot t)e creati*ity of t)e ot)er p)ases- and
make it s)ine.
0)e .eb,Robot #as tested along t)e follo#ing gidelines to pro*e its *alidity. %t
#as tested sing t)e follo#ing t#o tec)ni!es of soft#are testing.
So+t7are &est$"g Strateg$es:

1ny soft#are )as to be tested #it) pre,planned strategies. 1s Roger Pressman States- t)e
preparation for testing s)old start as soon as t)e design of t)e system starts. 0o carry ot
t)e testing in an efficient manner certain amont of strategic planning )as to be done.
1ny testing strategy mst incorporate test planning- test case design- test exection and
t)e resltant data collection and e*alation. 0)e .eb,Robot #as tested #it) t)e )elp of
t)e follo#ing soft#are testing strategies:
("$t &est$"g
%n t)e lines of strategy- all t)e indi*idal fnctions and modles #ere pt to t)e
test independently. 2y follo#ing t)is strategy all t)e errors in coding #ere identified and
corrected. 0)is met)od #as applied in combination #it) t)e .)ite and 2lack 2ox testing
0ec)ni!es to find t)e errors in eac) modle.
I"tegrat$o" &est$"g
EaF 1gain t)is soft#are testing strategy )as t#o different approac)es namely t)e
top do#n approac) in #)ic) t)e integration is carried ot from t)e top le*el modle to
t)e bottom and t)e bottom p approac) in #)ic) t)e integration is carried ot from t)e
lo# le*el modles to t)e top.
EbF 0)e modles #ere tested sing t)e bottom p approac) by introdcing stbs
for t)e top,le*el fnctions.
EcF 0)is test #as sed to identify t)e errors in t)e interface t)e errors in passing
t)e parameters bet#een t)e fnctions and to correct t)em.
8a#$!at$o" &est$"g
0)e main aim of t)is testing is to *erify t)at t)e soft#are system does #)at it #as
designed for.
1lp)a testing #as carried ot to ensre t)e *alidity of t)e system.
0)e abo*e testing is done in or system.
7. 'AIN&ENAN)E
'a$"te"a"ce Isses/
%n soft#are maintenance- an enormos mass of potential problems and cost lies
nder t)e srface. Soft#are maintenance is of corse- far more t)an fixing mistakes.
1nalysisHs and programmers append for more time in maintaining t)e program t)en t)ey
do #riting t)em. "e# tools and tec)ni!es are a*ailable for maintenance. 0)e literatre
on maintenance contains *ery fe# entries #)en compared to de*elopment acti*ities. 0)e
soft#are maintenance is classified into t)ree tasks:
(orrecti*e ?aintenance
Perfecti*e ?aintenance
)orrect$3e 'a$"te"a"ce
0)e correcti*e maintenance is to correct t)e diagnosis errors in t)is pro/ect. %t
)elps to easily identify t)e diagnosis errors in t)is soft#are for debgging it.
Per+ect$3e 'a$"te"a"ce
%t recommends for ne# capabilities in any modle- ?odifications to t)e existing
fnctions and increases t)e *ale of t)is pro/ect ie- general en)ancements. 0)e modles
of t)e system are tested separately. 0)is test is carried ot dring programming stage
itself.
Eac) modle s)old #ork satisfactorily as regards to t)e expected from t)e
modle. 0)ere are *alidation c)ecks for t)e fields also.
1nalysisHs and programmers append for more time in maintaining t)e program
t)en t)ey do #riting t)em. "e# tools and tec)ni!es are a*ailable for maintenance. 0)e
literatre on maintenance contains *ery fe# entries #)en compared to de*elopment
acti*ities. 0)e soft#are maintenance is classified into for tasks.
8. (SE* 'AN(A2
So+t7are /
Operating system : .indo#s 2=== and abo*e
Programming Bangage : (I
"ront end : 1SP.7et

;ar!7are/
Processor J System : Pentim %@
Processor Speed : 5==?'z
?ain ?emory : >12?2 R1?
'ard Disk : $=32
Secondary Storage : "DD1.$$?2C>28 (D RO?
<eyboard : 0E(',(O?1=9 keys
?onitor : KSamsang (olor monitor 1>L
9. ).N)2(SI.N/
0)e #atermarking problem #as formlated as a constrained optimization
problem- t)at maximizes or minimizes a )iding fnction based on t)e bit to be embedded.
3enetic algorit)m and pattern searc) tec)ni!es #ere employed to sol*e t)e proposed
optimization problem and to )andle t)e constraints. "rt)ermore- #e presented a data
partitioning tec)ni!e t)at does not depend on special marker tples to locate t)e
partitions and pro*ed its resilience to #atermark sync)ronization errors. .e de*eloped an
efficient t)res)old,based tec)ni!e for #atermark detection t)at is based on an optimal
t)res)old t)at minimizes t)e probability of decoding error. 0)e #atermark resilience #as
impro*ed by t)e repeated embedding of t)e #atermark and sing ma/ority *oting
tec)ni!e in t)e #atermark decoding p)ase. ?oreo*er- t)e #atermark resilience #as
impro*ed by sing mltiple attribtes.
-I-2I.9*AP;0/
-oo6s re+erre!/
SA'P2E S)*EENS
11.1 So+t7are %ro+$#e
ASP.NE&
0)e 1SP.7E0 application platform ses a frame #ork model. 1pplication logic is
di*ided into components according to fnction- and t)e *arios application components
t)at make p a 1SP.7E0 application are installed on different mac)ines depending on t)e
application component belongs.
(lient,tier components rn on t)e client mac)ine.
.eb,tier components rn on t)e ser*er.
2siness,tier components rn on t)e ser*er.
%nternet information system E%%SF,tier soft#are rns on t)e ser*er.
0)e .7E0 infrastrctre consists of all t)e tec)nologies t)at )elp in creating an
rnning robst- scalable and distribted applications. 0)e core of t)e .7E0 infrastrctre
is t)e .7E0 frame#ork- #)ic) is a collection of ser*ices and classes. %t exists as a layer
bet#een .7E0 applications and t)e nderlying operating system. 1sp .7E0 is one of t)e
langages t)at are directed to#ards meeting t)e ob/ecti*es of t)e .7E0 initiati*e of
creating distribted applications. %t )as in)erited t)e capability of rapid application
de*elopment from its earlier *ersions and strengt)ened considerably t)e implementation
of ob/ect oriented featres. 1sp .7E0 )as many ne# and impro*ed featres sc) as
in)eritance- interfaces- and o*erloading t)at makes it a po#erfl ob/ect,oriented
programming langage. Ot)er ne# langage featres inclde free t)reading and
strctred exception )andling. 1sp .7E0 flly integrates t)e .7E0 "rame#ork and t)e
(ommon Bangage Rntime- #)ic) toget)er pro*ide langage interoperability- garbage
collection- en)anced secrity- and impro*ed *ersioning spport. 1s a 1sp de*eloper- #e
can create mltit)readed- scalable applications sing explicit mltit)reading.
).''.N 2AN9(A9E SPE)I1I)A&I.N
Ot)er ne# langage featres in 1sp.7E0 inclde strctred exception )andling-
cstom attribtes- and common langage specification E(BSF compliance. 0)e (BS is a
set of rles t)at standardizes sc) t)ings as data types and )o# ob/ects are exposed and
interoperate. 1sp.7E0 adds se*eral featres t)at take ad*antage of t)e (BS. 1ny (BS,
compliant langage can se t)e classes- ob/ects- and components yo create in 1sp.7E0.
1nd yo- as a 1sp ser- can access classes- components- and ob/ects from ot)er (BS,
compliant programming langages #it)ot #orrying abot langage,specific differences
sc) as data types. (BS featres sed by 1sp.7E0 programs inclde assemblies-
namespaces- and attribtes.1sp.7E0 spports many ne# or impro*ed ob/ect,oriented
langage featres sc) as in)eritance- o*erloading- t)e O*errides key#ord- interfaces-
s)ared members- and constrctors.
1EA&(*ES .1 ASP.NE&
%n)eritance
1SP .7E0 spports in)eritance by allo#ing yo to define classes t)at ser*e as t)e
basis for deri*ed classes. Deri*ed classes in)erit and can extend t)e properties and
met)ods of t)e base class. 0)ey can also o*erride in)erited met)ods #it) ne#
implementations. 1ll classes created #it) 1sp.7E0 are in)eritable by defalt. 2ecase
t)e forms yo design are really classes- yo can se in)eritance to define ne# forms
based on existing ones.
E,ce%t$o" ;a"!#$"g
1sp.7E0 spports strctred exception )andling- sing an en)anced *ersion of
t)e 0ry...(atc)..."inally syntax spported by ot)er langages sc) as (VV. Strctred
exception )andling combines a modern control strctre Esimilar to Select (ase or .)ileF
#it) exceptions- protected blocks of code- and filters. Strctred exception )andling
makes it easy to create and maintain programs #it) robst- compre)ensi*e error )andlers.
.3er#oa!$"g
O*erloading is t)e ability to define properties- met)ods- or procedres t)at )a*e
t)e same name bt se different data types. O*erloaded procedres allo# yo to pro*ide
as many implementations as necessary to )andle different kinds of data- #)ile gi*ing t)e
appearance of a single- *ersatile procedre.

.3err$!$"g Pro%ert$es a"! 'et<o!s
0)e O*errides key#ord allo#s deri*ed ob/ects to o*erride c)aracteristics
in)erited from parent ob/ects. O*erridden members )a*e t)e same argments as t)e
members in)erited from t)e base class- bt different implementations. 1 member+s ne#
implementation can call t)e original implementation in t)e parent class by preceding t)e
member name #it) ?y2ase.

)o"strctors a"! Destrctors
(onstrctors are procedres t)at control initialization of ne# instances of a class.
(on*ersely- destrctors are met)ods t)at free system resorces #)en a class lea*es scope
or is set to 7ot)ing. 1sp.7E0 spports constrctors and destrctors sing t)e Sb 7e#
and Sb "inalize procedres.
Data &y%es
1SP.7E0 introdces t)ree ne# data types. 0)e ()ar data type is an nsigned 15,
bit !antity sed to store ;nicode c)aracters. %t is e!i*alent to t)e .7E0 "rame#ork
System. ()ar data type. 0)e Decimal data type is a 45,bit signed integer scaled by a
*ariable po#er of 1=.
I"ter+aces
%nterfaces describe t)e properties and met)ods of classes- bt nlike classes- do
not pro*ide implementations. 0)e %nterface statement allo#s yo to declare interfaces-
#)ile t)e %mplements statement lets yo #rite code t)at pts t)e items described in t)e
interface into practice.
De#egates
Delegates W ob/ects t)at can call t)e met)ods of ob/ects on yor be)alf W are
sometimes described as type,safe- ob/ect,oriented fnction pointers. Do can se
delegates to let procedres specify an e*ent )andler met)od t)at rns #)en an e*ent
occrs. Do can also se delegates #it) mltit)readed applications.
S<are! 'embers
S)ared members are properties- procedres- and fields t)at are s)ared by all
instances of a class. S)ared data members are sefl #)en mltiple ob/ects need to se
information t)at is common to all. S)ared class met)ods can be sed #it)ot first
creating an ob/ect from a class.
*e+ere"ces
References allo# yo to se ob/ects defined in ot)er assemblies. %n 1SP .7E0-
references point to assemblies instead of type libraries.
Names%aces
7amespaces pre*ent naming conflicts by organizing classes- interfaces- and
met)ods into )ierarc)ies.
Assemb#$es
1ssemblies replace and extend t)e capabilities of type libraries by- describing all
t)e re!ired files for a particlar component or application. 1n assembly can contain one
or more namespaces.
Attr$btes
1ttribtes enable yo to pro*ide additional information abot program elements.
"or example- yo can se an attribte to specify #)ic) met)ods in a class s)old be
exposed #)en t)e class is sed as a 8?B .eb ser*ice.
'#t$t<rea!$"g
1sp.7E0 allo#s yo to #rite applications t)at can perform mltiple tasks
independently. 1 task t)at )as t)e potential of )olding p ot)er tasks can execte on a
separate t)read- a process kno#n as mltit)reading. 2y casing complicated tasks to rn
on t)reads t)at are separate from yor ser interface- mltit)reading makes yor
applications more responsi*e to ser inpt.1sp.7E0 is a pillar of t)e .7E0 "rame#ork-
and yet anot)er step for#ard in e*oltion of t)e langage. %t is a )ig),le*el programming
langage for t)e .7E0 "rame#ork- and pro*ides t)e easiest point of entry to t)e
?icrosoft .7E0 platform.
Assemb#$es $" As%.Net
1ssemblies form t)e fndamental nit of deployment- *ersion control- rese-
acti*ation scoping- and secrity permissions for a .7E0,based application. 1ssemblies
take t)e form of an exectable E.exeF file or dynamic link library E.dllF file- and are t)e
bilding blocks of t)e .7E0 "rame#ork. 0)ey pro*ide t)e common langage rntime
#it) t)e information it needs to be a#are of type implementations. Do can t)ink of an
assembly as a collection of types and resorces t)at form a logical nit of fnctionality
and are bilt to #ork toget)er. .it) 1sp.7E0- yo se t)e contents of assemblies- and
add references to t)em. .)at makes assemblies different from .exe or .dll files.
Assemb#y 'a"$+est
.it)in e*ery assembly is an assembly manifest. Similar to a table of contents- t)e
assembly manifest contains t)e follo#ing: 0)e assembly+s identity Eits name and
*ersionF. 1 file table describing all t)e ot)er files t)at make p t)e assembly- inclding-
for example- any ot)er assemblies yo created t)at yor .exe or .dll file relies on- or e*en
bitmap or Readme files. 1n assembly reference list- #)ic) is a list of all external
dependencies W .dlls or ot)er files yor application needs t)at may )a*e been created by
someone else. 1ssembly references contain references to bot) global and pri*ate ob/ects.
3lobal ob/ects reside in t)e global assembly cac)e- an area a*ailable to ot)er
applications- some#)at like t)e System32 directory. 0)e ?icrosoft.@isal2asic
namespace is an example of an assembly in t)e global assembly cac)e. Pri*ate ob/ects
mst be in a directory at eit)er t)e same le*el as or belo# t)e directory in #)ic) yor
application is installed.
Des$g" Pr$"c$%#es
1sp .7E0 reflects t)e follo#ing design principles:
%t is recognizably t)e descendant of @isal 2asic. 1n existing @isal 2asic
programmer #ill feel immediately familiar #it) t)e langage.
%ts syntax and semantics are simple- straig)tfor#ard- and easy to nderstand. 0)e
langage a*oids nintiti*e featres.
%t gi*es de*elopers t)e ma/or featres of t)e .7E0 "rame#ork and is consistent
#it) t)e frame#ork+s con*entions.
%t is reasonably pgradeable from @isal 2asic. 2ecase t)e .7E0 "rame#ork
explicitly spports mltiple compter langages- it #orks #ell in a ?ltilangage
en*ironment.
%t is as compatible #it) pre*ios *ersions of @isal 2asic as possible. .)ene*er
practical- @isal 2asic .7E0 )as t)e same syntax- t)e same semantics- and t)e
same rn,time be)a*ior as its predecessors.
0)ese principles complement t)e original design principles of @isal 2asic:
%t is as safe a langage to #rite in as possible. %n general- @isal 2asic tries to
balance reliability- ease of se- and efficiency in t)e definition of t)e langage.
%t is an extremely approac)able langage.
%t enables rapid program de*elopment- #)ile not compromising reliability.
%t prodces predictable and efficient code.
%t #orks as a strongly type langage- as #ell as a loosely typed one- for more
correct ser code in t)e former case- and for faster de*elopment in t)e latter.
'I)*.S.1& S=2 SE*8E* 2000 S&.*A9E EN9INE
IN&*.D()&I.N
SAB Ser*er 2=== is a scalable- reliable- and easy,to,se prodct t)at #ill pro*ide a solid
fondation for application design for t)e next 2= years.
S&.*A9E EN9INE DESI9N 9.A2S
Database applications can no# be deployed #idely de to intelligent- atomated storage
engine operations. Sop)isticated yet simplified arc)itectre impro*es performance-
reliability- and scalability.
1eatre Descr$%t$o" a"! -e"e+$ts
Reliability (oncrrency- scalability- and reliability are impro*ed #it) simplified
data strctres and algorit)ms. Rn,time c)ecks of critical data
strctres make t)e database mc) more robst- minimizing t)e need for
consistency c)ecks.
Scalability 0)e ne# disk format and storage sbsystem pro*ide storage t)at is
scalable from *ery small to *ery large databases. Specific c)anges
inclde.
Simplified mapping of database ob/ects to files eases management and
enables tning flexibility. D2 ob/ects can be mapped to specific disks
for load balancing.
?ore efficient space management inclding increasing page size from 2
<2 to & <2- 5$ <2 %CO- *ariable lengt) c)aracter fields p to & <2- and
t)e ability to delete colmns from existing tables #it)ot an
nloadCreload of t)e data.
Ease of ;se D21 inter*ention is eliminated for standard operationsWenabling
branc) office atomation and desktop and mobile database applications.
?any complex ser*er operations are atomated.
S&.*A9E EN9INE 1EA&(*ES
1eatre Descr$%t$o" a"! -e"e+$ts
Data 0ype Sizes ?aximm size of c)aracter and binary data types is dramatically
increased.
Databases and
"iles
Databases creation is simplified- no# residing on operating system files
instead of logical de*ices.
Dynamic
?emory
%mpro*es performance by optimizing memory allocation and sage.
Simplified design minimizes contention #it) ot)er resorce managers.
Dynamic Ro#,
Be*el Bocking
"ll ro#,le*el locking is implemented for bot) data ro#s and index
entries. Dynamic locking atomatically c)ooses t)e optimal le*el of
lock Ero#- page- mltiple page- tableF for all database operations. 0)is
featre pro*ides impro*ed concrrency #it) no tning. 0)e database
also spports t)e se of X)intsX to force a particlar le*el of locking.
Dynamic Space
?anagement
1 database can atomatically gro# and s)rink #it)in configrable
limits- minimizing t)e need for D21 inter*ention. %t is no longer
necessary to pre allocate space and manage data strctres.
E*oltion 0)e ne# arc)itectre is designed for extensibility- #it) a fondation for
ob/ect,relational featres.
Barge ?emory
Spport
SAB Ser*er 9.= Enterprise Edition #ill spport memory addressing
greater t)an $ 32- in con/nction #it) .indo#s 70 Ser*er >.=- 1lp)a
processor,based systems- and ot)er tec)ni!es.
;nicode 7ati*e ;nicode- #it) OD2( and OBE D2 ;nicode 1P%s- impro*es
mltilingal spport.
-ENE1I&S
0)ere are many benefits of t)e ne# on,disk layot- inclding:
.
%mpro*ed scalability and integration #it) .indo#s 70 Ser*er
2etter performance #it) larger %COs
Stable record locators allo# more indexes
?ore indexes speed decision spport !eries
Simpler data strctres pro*ide better !ality
3reater extensibility- so t)at sbse!ent releases #ill )a*e a cleaner de*elopment
process and ne# featres are faster to implement
DA&A-ASES> 1I2ES> AND 1I2E 9*.(PS
.8E*8IE4
SAB Ser*er 9.= is mc) more integrated #it) .indo#s 70 Ser*er t)an any of its
predecessors. Databases are no# stored directly in .indo#s 70 Ser*er files .SAB Ser*er
is being stretc)ed to#ards bot) t)e )ig) and lo# end.
1I2ES
SAB Ser*er 9.= creates a database sing a set of operating system files- #it) a
separate file sed for eac) database. ?ltiple databases can no longer s)are t)e same file.
0)ere are se*eral important benefits to t)is simplification. "iles can no# gro# and
s)rink- and space management is greatly simplified.
1ll data and ob/ects in t)e database- sc) as tables- stored procedres- triggers- and
*ie#s- are stored only #it)in t)ese operating system files:
"ile 0ype Description
Primary data
file
0)is file is t)e starting point of t)e database. E*ery database )as only
one primary data file and all system tables are al#ays stored in t)e
primary data file.
Secondary data
files
0)ese files are optional and can )old all data and ob/ects t)at are not on
t)e primary data file. Some databases may not )a*e any secondary data
files- #)ile ot)ers )a*e mltiple secondary data files.
Bog files 0)ese files )old all of t)e transaction log information sed to reco*er t)e
database. E*ery database )as at least one log file.
.)en a database is created- all t)e files t)at comprise t)e database are zeroed ot Efilled
#it) zerosF to o*er#rite any existing data left on t)e disk by pre*iosly deleted files. 0)is
impro*es t)e performance of day,to,day operations.
SPA)E 'ANA9E'EN&
0)ere are many impro*ements in t)e allocations of space and t)e management of
space #it)in files. 0)e data strctres t)at keep track of page,to,ob/ect relations)ips #ere
redesigned. %nstead of linked lists of pages- bitmaps are sed becase t)ey are cleaner and
simpler and facilitate parallel scans. 7o# eac) file is more atonomosG it )as more data
abot itself- #it)in itself. 0)is #orks #ell for copying or mailing database files.
SAB Ser*er no# )as a mc) more efficient system for tracking table space. 0)e c)anges
enable
3ro#ing and s)rinking files
2etter spport for large %CO
Ro# space management #it)in a table
Bess expensi*e extent allocations
SAB Ser*er is *ery effecti*e at !ickly allocating pages to ob/ects and resing space
freed by deleted ro#s. 0)ese operations are internal to t)e system and se data strctres
not *isible to sers- yet are occasionally referenced in SAB Ser*er messages.
1I2E S;*IN?
0)e ser*er c)ecks t)e space sage in eac) database periodically. %f a database is
fond to )a*e a lot of empty space- t)e size of t)e files in t)e database #ill be redced.
2ot) data and log files can be s)rnk. 0)is acti*ity occrs in t)e backgrond and does not
affect any ser acti*ity #it)in t)e database. Do can also se t)e SAB Ser*er Enterprise
?anager or D2(( to s)rink files as indi*idally or as a grop- or se t)e D2((
commands S'R%7<D10121SE or S'R%7<"%BE.
SAB Ser*er s)rinks files by mo*ing ro#s from pages at t)e end of t)e file to pages
allocated earlier in t)e file. %n an index- nodes are mo*ed from t)e end of t)e file to pages
at t)e beginning of t)e file. %n bot) cases pages are freed at t)e end of files and t)en
retrned to t)e file system. Databases can only be s)rnk to t)e point t)at no free space is
remainingG t)ere is no data compression.
1I2E 9*.4
1tomated file gro#t) greatly redces t)e need for database management and
eliminates many problems t)at occr #)en logs or databases rn ot of space. .)en
creating a database- an initial size for t)e file mst be gi*en. SAB Ser*er creates t)e data
files based on t)e size pro*ided by t)e database creator and data is added to t)e database
t)ese files fill. 2y defalt- data files are allo#ed to gro# as mc) as necessary ntil disk
space is ex)asted. 1lternati*ely- data files can be configred to gro# atomatically- bt
only to a predefined maximm size. 0)is pre*ents disk dri*es from rnning ot of space.
1 SAB Ser*er index is a strctre associated #it) a table t)at speeds retrie*al of t)e ro#s
in t)e table. 1n index contains keys bilt from one or more colmns in t)e table. 0)ese
keys are stored in a strctre t)at allo#s SAB Ser*er to !ickly and efficiently find t)e
ro# or ro#s associated #it) t)e key *ales. 0)is strctre is called a )eap. 0)e t#o types
of SAB Ser*er indexes are clstered and nonclstered indexes
)2(S&E*ED INDEXES
1 clstered index is one in #)ic) t)e order of t)e *ales in t)e index is t)e same
as t)e order of t)e data stored in t)e table. 0)e clstered index contains a )ierarc)ical
tree. .)en searc)ing for data based on a clstered index *ale- SAB Ser*er !ickly
isolates t)e page #it) t)e specified *ale and t)en searc)es t)e page for t)e record or
records #it) t)e specified *ale. 0)e lo#est le*el- or leaf node- of t)e index tree is t)e
page t)at contains t)e data.
N.N5)2(S&E*ED INDEXES
1 non,clstered index is analogos to an index in a textbook. 0)e data is stored in
one placeG t)e index is stored in anot)er- #it) pointers to t)e storage location of t)e
indexed items in t)e data. 0)e lo#est le*el- or leaf node- of a non,clstered index is t)e
Ro# %dentifier of t)e index entry- #)ic) gi*es SAB Ser*er t)e location of t)e actal data
ro#. 0)e Ro# %dentifier can )a*e one of t#o forms. %f t)e table )as a clstered index- t)e
identifier of t)e ro# is t)e clstered index key. %f t)e table is a )eap- t)e Ro# %dentifier is
t)e actal location of t)e data ro#- indicated #it) a page nmber and offset on t)e page.
0)erefore- a non,clstered index- in comparison #it) a clstered index- )as an extra le*el
bet#een t)e index strctre and t)e data itself..)en SAB Ser*er searc)es for data based
on a non,clstered index- it searc)es t)e index for t)e specified *ale to obtain t)e
location of t)e ro#s of data and t)en retrie*es t)e data from t)eir storage locations. 0)is
makes non,clstered indexes t)e optimal c)oice for exact,matc) !eries.
Some books contain mltiple indexes. Since non,clstered indexes fre!ently store
clstered index keys as t)eir pointers to data ro#s- it is important to keep clstered index
keys as small as possible.
SAB Ser*er spports p to 2$4 non,clstered indexes on eac) table. 0)e non,clstered
indexes )a*e a b,tree index strctre similar to t)e one in clstered indexes. 0)e
difference is t)at non,clstered indexes )a*e no effect on t)e order of t)e data ro#s. 0)e
collection of data pages for a )eap is not affected if non,clstered indexes are defined for
t)e table.
DA&A &0PE );AN9ES
("$co!e Data
SAB Ser*er no# spports ;nicode data types- #)ic) makes it easier to store data
in mltiple langages #it)in one database by eliminating t)e problem of con*erting
c)aracters and installing mltiple code pages. ;nicode stores c)aracter data sing t#o
bytes for eac) c)aracter rat)er t)an one byte. 0)ere are 5>->35 different bit patterns in
t#o bytes- so ;nicode can se one standard set of bit patterns to encode eac) c)aracter in
all langages- inclding langages sc) as ()inese t)at )a*e large nmbers of c)aracters.
?any programming langages also spport ;nicode data types.
0)e ne# data types t)at spport ;nicode are ntext- nc)ar- and n*arc)ar. 0)ey are
t)e same as text- c)ar- and *arc)ar- except for t)e #ider range of c)aracters spported and
t)e increased storage space sed.
I'P*.8ED DA&A S&.*A9E
Data storage flexibility is greatly impro*ed #it) t)e expansion of t)e maximm
limits for c)ar- *arc)ar- binary- and *ar binary data types to &-=== bytes- increased from
2>> bytes. %t is no longer necessary to se text and image data types for data storage for
anyt)ing bt *ery large data *ales. 0)e 0ransact,SAB string fnctions also spport t)ese
*ery long c)ar and *arc)ar *ales- and t)e S;2S0R%73 fnction can be sed to process
text and image colmns. 0)e )andling of 7lls and empty strings )as been impro*ed. 1
ne# ni!e identifier data type is pro*ided for storing a globally ni!e identifier
E3;%DF.
Sorce )o!e
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Text;
using System.IO;
using System.Data.SqlClient;
namespace relationdataasewatermar!ing
"
pulic partial class Form#
"
$region de%inition
string pat& ' (c)**output**(;

$endregion
internal Form#+,
"
Initiali-eComponent+,;
.

pri/ate /oid Form#01oad+o2ect sender3 System.4/ent5rgs e,
"
1ist6ox#.7isile ' %alse;
.
pri/ate /oid 6utton80Clic!0#+o2ect sender3 4/ent5rgs e,
"
1ist6ox#.7isile ' true;
System.IO.FileStream InputFileStream ' null;
System.IO.FileStream OutputFileStream ' null;
yte9: 6u%%er ' new yte9: " .;
6inary;eader 6inary;eader ' null;
6inaryWriter 6inaryWriter ' null;
string %name ' null;
string %ext ' null;
%ext '
Text6ox#.Text.Sustring+Text6ox#.Text.1astIndexO%+(**(, < #,;
%name ' %ext.Sustring+=3 %ext.1astIndexO%+(.(,,;
string %ilename ' Text6ox#.Text;
int si-e ' #====;
try
"
InputFileStream ' new FileStream+%ilename3
File>ode.Open,;
6inary;eader ' new 6inary;eader+InputFileStream,;
6inary;eader.6aseStream.See!+=3 See!Origin.6egin,;

int limit ' =;
limit '
Con/ert.ToInt#?+>icroso%t.7isual6asic.FileSystem.File1en+%ilename, @
si-e,;
long amountsent ' =;
long i ' =;
w&ile +A+i '' limit,,
"
6u%%er ' new yte9si-e:;
6inary;eader.;ead+6u%%er3 =3 si-e,;
6inary;eader.6aseStream.See!+=3 See!Origin.Current,;

OutputFileStream ' new
System.IO.FileStream+(c)**split**( < %name < (.( <
>icroso%t.7isual6asic.Strings.Format+i < #3 ((,3 File>ode.Create,;
6inaryWriter ' new 6inaryWriter+OutputFileStream,;
6inaryWriter.Write+6u%%er,;
OutputFileStream.Flus&+,;
6inaryWriter.Close+,;
OutputFileStream.Close+,;
amountsent ' amountsent < si-e;
i ' i < #;
.
i% +amountsent B
>icroso%t.7isual6asic.FileSystem.File1en+%ilename,,
"
si-e '
Con/ert.ToInt#?+>icroso%t.7isual6asic.FileSystem.File1en+%ilename, C
amountsent,;
6u%%er ' new yte9si-e:;
6inary;eader.;ead+6u%%er3 =3 si-e,;
6inary;eader.6aseStream.See!+=3 See!Origin.Current,;
@@ OutputFileStream ' Dew
System.IO.FileStream+(4)*sud&es&*WeSite#8*images*( E (split.( E
Format+i < #3 (==(,3 File>ode.Create,
OutputFileStream ' new
System.IO.FileStream+(c)**split**( < %name < (.( <
>icroso%t.7isual6asic.Strings.Format+i < #3 ((,3 File>ode.Create,;
6inaryWriter ' new 6inaryWriter+OutputFileStream,;
6inaryWriter.Write+6u%%er,;
OutputFileStream.Flus&+,;
6inaryWriter.Close+,;
OutputFileStream.Close+,;
amountsent ' amountsent < si-e;
@@IDST5DT C$ DOT4) Commented t&is declaration since
looping /ariales in F%oreac&F loops are declared in t&e F%oreac&F
&eader in C$
@@ string s ' null;
%oreac& +string s in
System.IO.Directory.GetFiles+(c)**split(3 %name < (.G(,,
"
1ist6ox#.Items.5dd+s,;
.
>essage6ox.S&ow+(data partioned sucess%ully(,;
.
.
catc& +4xception ex,
"
>essage6ox.S&ow+ex.>essage,;
@@>essage6ox.S&ow+(pli- c&oose t&e %ile(,;
1ist6ox#.7isile ' %alse;
.
.
pulic /oid decode+,
"
string9: %iles ' Directory.GetFiles+(c)**split(,;
%oreac& +string %ile in %iles,
"
File.Delete+(c)**output**( <
%ile.Sustring+%ile.1astIndexO%+H(*(, < #,,;
File.Copy+%ile3 (c)**output**( <
%ile.Sustring+%ile.1astIndexO%+H(*(, < #,,;

.
Scree" S<ots

You might also like