Oracle版本9提供了一种有趣的新的数据类型,开发人员借助此类型可以声明包括任何类型数据的变量。对于单个数据来说,此数据类型即ANYDATA。对于TABLE或者VARRAY数据来说,则为ANYDATASET。ANYTYPE用于描述存储在ANYDATA或者ANYDATASET变量以及栏中的数据类型。这些数据类型对于处理存储在数据库中的XML数据或高级序列(Advanced Queues)具有非常重要的意义。说明文档中提到了ANYDATA数据类型可以用于对对象进行串行化(serialize),但与之相关的示例较少。
串行化首先将数据值和其他结构(structure)组成为另外一些结构,然后将生成的结构的所有构成成分输出为流。流可以被结构返回读取,并且将覆盖前一个会话的信息。通常而言,在应用程序中进行的保存和打开文件的操作即不过是串行化的一种形式。
一个Oracle数据库或许需要使用串行化功能来存储一些表格数据的某个版本备份,这样可以在不使用数据库提交(commits)、回滚(rollbacks)、回闪(flashback)查询的情况下对数据进行查看和其他操作。许多应用程序都会用到类似的对数据源的控制功能,诸如可以在应用级对当前和以前的数据版本进行比较,或对合并操作(merge)和撤销操作(undo)所产生数据改变进行比较。很多此类应用程序都被设计为对每个表格创建一个备份表格。而对于数据库性能和开发进度来说,要维护这些众多的备份表格以及之间的各种关系,成为了生产数据(production data)以外的沉重负担。
而通过ANYDATA数据类型以及动态SQL功能,使得通过单一的串行化存储进程来把许多需要备份的表格串行输入到一个单独的备份表格成为可能。ANYDATA的一个优势在于,不同于类似VARCHAR2的简单的转换数据类型,使用ANYDATA方法原始的数据类型并不会丢失。数据可以被存储在ANYDATA栏或者变量中而不会丢失任何细节(或根据在DATA和VARCHAR2之间进行转换的当前NLS语义而定)。这些存储的数据在转化过程中不会有任何损失。
一个ANYDATA对象可以通过使用任何Convert*方法构造简单值的方法来实现,或者通过"piecewise"构造方法创建诸如对象和数据库一类的更为复杂的变量。对于本例而言,我将集中解释如何使用Convert*方法。
为了创建一个串行化进程,我使用了动态SQL来产生一个对表格中所有数据的查询命令,其中包括ROWID。然后我将查询命令进行分解并描述,从而得到一个关于栏和数据类型的列表。再定义提取(fetch)出栏,将每一栏从各行中提取出来,然后将其插入到串行化表格中。在本例中我使用了DBMS_SQL,因为"自身动态SQL(native dynamic SQL)"现在还不能支持描述动态查询。绝大多数的工作都是对从DBMS_SQL数据类型代码到合适的数据类型方法以及函数的转换过程进行处理。要得到这些代码的列表,可以查看OCI包含文件ocidfn.h,或者是诸如USER_TAB_COLUMNS这样的对查看(view)的定义。在本例中,我使用了简单的数据类型(可以在EMP和DEPT表格中找到),这样可以直接对其进行转换。
drop table serialized_data;
create table serialized_data
(
tablename varchar2(30) not null,
row_id rowid not null,
colseq integer not null,
item anydata
);
create or replace procedure serialize(p_tablename varchar2)
is
l_tablename varchar2(30) := upper(p_tablename);
c pls_integer; -- cursor
x pls_integer; -- dummy
col_cnt pls_integer;
dtab dbms_sql.desc_tab;
l_rowid char(18);
l_anydata anydata;
l_vc2 varchar2(32767);
l_number number;
l_vc varchar(32767);
l_date date;
l_raw raw(32767);
l_ch char;
l_clob clob;
l_blob blob;
l_bfile bfile;
begin
c := dbms_sql.open_cursor;
dbms_sql.parse(c,'select rowid,'||p_tablename||'.* from '||p_tablename,
dbms_sql.native);
dbms_sql.describe_columns(c,col_cnt,dtab);
dbms_sql.define_column(c,1,l_rowid,18);
for i in 2 .. col_cnt loop
case dtab(i).col_type
when 1 then
dbms_sql.define_column(c,i,l_vc2,dtab(i).col_max_len);
when 2 then
dbms_sql.define_column(c,i,l_number);
when 9 then
dbms_sql.define_column(c,i,l_vc,dtab(i).col_max_len);
when 12 then
dbms_sql.define_column(c,i,l_date);
when 23 then
dbms_sql.define_column_raw(c,i,l_raw,dtab(i).col_max_len);
when 96 then
dbms_sql.define_column_char(c,i,l_ch,dtab(i).col_max_len);
when 112 then
dbms_sql.define_column(c,i,l_clob);
when 113 then
dbms_sql.define_column(c,i,l_blob);
when 114 then
dbms_sql.define_column(c,i,l_bfile);
end case;
end loop;
x := dbms_sql.execute(c);
while dbms_sql.fetch_rows(c) != 0 loop
dbms_sql.column_value(c,1,l_rowid);
for i in 2 .. col_cnt loop
case dtab(i).col_type
when 1 then
dbms_sql.column_value(c,i,l_vc2);
l_anydata := ANYDATA.ConvertVarchar2(l_vc2);
when 2 then
dbms_sql.column_value(c,i,l_number);
l_anydata := ANYDATA.ConvertNumber(l_number);
when 9 then
dbms_sql.column_value(c,i,l_vc);
l_anydata := ANYDATA.ConvertVarchar(l_vc);
when 12 then
dbms_sql.column_value(c,i,l_date);
l_anydata := ANYDATA.ConvertDate(l_date);
when 23 then
dbms_sql.column_value(c,i,l_raw);
l_anydata := ANYDATA.ConvertRaw(l_raw);
when 96 then
dbms_sql.column_value(c,i,l_ch);
l_anydata := ANYDATA.ConvertChar(l_ch);
when 112 then
dbms_sql.column_value(c,i,l_clob);
l_anydata := ANYDATA.ConvertClob(l_clob);
when 113 then
dbms_sql.column_value(c,i,l_blob);
l_anydata := ANYDATA.ConvertBlob(l_blob);
when 114 then
dbms_sql.column_value(c,i,l_bfile);
l_anydata := ANYDATA.ConvertBFile(l_bfile);
end case;
insert into serialized_data (tablename,row_id,colseq,item)
values (l_tablename,l_rowid,i,l_anydata);
end loop;
end loop;
dbms_sql.close_cursor(c);
end;
/
show errors;
如果我希望对"EMP"和"DEPT"表格串行化,我可以按照以下代码通过SQL*Plus来完成:
exec serialize('emp');
exec serialize('dept');
select t.item.gettypename() from serialized_data t;
使用ANYDATA中的一个问题是,如果是对象,则只有很少的信息可以通过直接SQL恢复过来。表格数据必须使用PL/SQL过程进行访问。


Hawaiian Swimming,Office Home And Business 2010 Sale HAWAIIAN SWIMMING MISSION AND Vision: Eyesight: Hawaiian Swimming encourages the highest amounts of swimming and individual excellence. MISSION: Hawaiian Swimming provides training, levels of competition,Office 2010 Standard Key, and programs for all ages and capabilities in the swimming local community through Dedication, Open-mindedness, Respect,Programs Running - Downloads Free Programs Running - Download Programs Running S,Office 2010 Professional Plus Product Key, and Excellence. HAWAIIAN SWIMMING NEWS AND ANNOUNCEMENTS: 2011 WESTERN ZONE MEET Information: Qualifier Info [ doc ] Swimmer Intent Type [ doc ] Swimmer Application [ doc ] Coach Software [ doc ] Chaperone Application [ doc ] Age Group Meet Recognize [ doc ] Senior Meet Notice [ doc ] USA SWIMMING NEWS AND ANNOUNCEMENTS: Background Check out System FAQ [ pdf ] USA Swimming will start a new history check out system on January ten, 2011. All non-athlete members who've not previously completed the USA Swimming history check should successfully complete the new qualifications examine program by February 15,Office 2007 Standard, 2011. Those that have formerly finished the USA Swimming track record examine prior to September 1, 2010, are required to finish the new check just before April 30,Office Professional Plus 2010 Product Key, 2011. New USA-S Journey Policy [ website link ] USA Swimming Regulation Clarification: "Assisting a coach" rule. [ pdf ]
A Member of the University of Maryland Medical Program | In Partnership with the University of Maryland School of Medicine,Office Ultimate 2007 Product Key Connect with UMMC Email page Print page Home Clinical References Our comprehensive and interactive healthcare reference includes more than 50,The Chicago Blog November 2009 Archives,Cheap Office Professional Plus 2007,000 pages of medically-reviewed health content written in consumer-friendly language. English Health-related Encyclopedia Spanish Clinical Encyclopedia Drug Interaction Checker Complementary and Alternative Medicine Guide English Pregnancy Center Spanish Pregnancy Center Care Guides In-Depth Patient Education Reports Health Calculators Drug Notes The information contained in this web site is for educational purposes only and is not intended or implied to be a substitute for professional clinical advice. Inclusion here does not imply any endorsement or recommendation by any hospital in the University of Maryland Healthcare Technique. Always seek the advice of your physician or other qualified healthcare provider for all healthcare problems prior to starting any new treatment. © 2011 University of Maryland Clinical Center (UMMC). All rights reserved. UMMC is a member with the University of Maryland Medical Technique,Microsoft Windows 7, 22 S. Greene Street,Windows 7 Professional Key, Baltimore,Office Standard Key, MD 21201. TDD: 1-800-735-2258 or 1.800.492.5538 Home Site map Compliance Policies Subscribe to e-News Awards & Honors UMMC Blog
Matthew Buchanan (Property) A transmission from the deep south. Posted on Tuesday, 29 January 2008 My favourite albums of 2007 I additional far more than fifty albums to iTunes for the duration of 2007. The availability of much great new music by means of solutions these kinds of as eMusic is heartening,Cheap Windows 7, but also indicates I didn’t listen to some of those 50 albums quite as significantly as I might have in previous years. But, after a couple of weeks deliberation, I’ve picked my favourite ten, which are: Armchair Apocrypha — Andrew Bird
Happy Ending — The Phoenix Foundation
Boxer — The National
Untrue — Burial
Night Falls Over Kortedala — Jens Lekman
The Reminder — Feist
Songs From A Dictaphone — SJD
God Save The Clientele — The Clientele
Past, Present, Future — Tiki
Neon Bible — Arcade Fire
These were the albums I connected with most. Narrowly missing the cut, but deserving of mention, are: Cassadaga by Bright Eyes, Distance And Time by Fink, The Flying Club Cup by Beirut, The Stage Names by Okkervil River and Cease To Begin by Band of Horses. I also liked new albums through the New Pornographers, The Shins, Ferraby Lionheart, Wilco and The White Stripes, but as has been noted elsewhere,Buy Windows 7 Key How to prevent Windows Messenger from running on a Windows XP-, many of the year’s big-name releases either failed to make essential listening (Radiohead, Bloc Party) or just weren’t my thing (Panda Bear, Battles).
Beijing February 24, based on eWeek, Microsoft this month launched a 22 patch Windows seven SP1, Windows 7 system, which grew to become official release through the finish of 2009, the first since the patch, but also Windows seven method is an additional milestone. SP1 patch is made up of quite a few safety vulnerabilities within the patch, for those that do not immediately update feature enabled or not is rather very important to Online users. As a result, Microsoft is urging consumers and company end users to download the patch as soon as possible. Then again, furthermore, Microsoft will need to search for other approaches to enhance the Windows running program in which the shortcomings. Despite the fact that Windows is nevertheless essentially the most commonly utilized desktop running method, but more and more customers are currently complaining concerning the existence of quite a few Windows safety vulnerabilities. The general watch, Windows running method could have alot more protection and balance. EWEEK lately wrote a renowned American IT web-site lists have to begin functioning to solve challenges Microsoft Windows running system, the top ten challenges, the adhering to is a summary with the write-up: one, too complacent ; decades, the Microsoft Windows running program displays the over-complacency. To some extent, this is understandable. Following all, Microsoft wants to carry on on their original application to build the Windows running method. But for Microsoft, now has arrive to the best to alter the initial program and the timing of the hardware. Complacent regarding the unique plan result in the advancement of Windows operating method is running more and more gradually, they consider up an excessive amount of individual computer customers to cope with room. This challenge also results in Windows operating program more vulnerable to malicious attacks. As a result, Microsoft Windows too complacent should certainly consider the lead dilemma. two, the real protection problems listed at the starting, around the greatest shock in Windows seven is the fact that the system be more safe than Windows Vista. A lot of the observed data, Windows seven is without a doubt the safety may be greatly enhanced. However the system is usually subject to data theft from a complete breakdown with the hardware and various other protection problems. Quite simply, the protection risks of Windows is rather actual and serious trouble. Microsoft ought to do all we can to carry on to block hackers released sustained attacks on Windows. 3, intensified using the safety problems safety issues continue to plague the planet of Windows people, this dilemma is acquiring worse exhibiting. Some decades back, delete Windows safety dangers than it truly is now significantly less difficult. A growing number of consumers come across their personal info easily to becoming stolen by hackers, and Windows methods seem to turn into more and more tricky to risk manage. Within the past couple of several years, a variety of network safety specialists and a number of businesses have pointed out that the protection threat of Windows are going to be a lot more tricky to manage. Because Windows has generally attracted the primary goal of the network hacker attacks, then Microsoft will have the duty to control the developing trend of its safety difficulties. four, the lack of web based application store on January six this year, Apple released the consumer long-awaited Mac App Shop web based application retailer, users can download the Mac App Store apps installed The Mac OS X Snow Leopard running method. This is totally modeled Apple iPad plus the iPhone application shop over the internet promotion design. Mac OS X but want to grow to be more appealing to the user's running program, Apple includes a lengthy strategy to go. As much as now,office 2007 standard key, Microsoft launched Windows seven, not however on the internet application store, and programmers and users are starting to be regarded as a major Windows flaw. Microsoft releases Windows 7 application shops the longer time is delayed, there will likely be an increasing number of programmers turn to Apple Mac OS X running method, application improvement. Within this procedure, the operating system capabilities for a wide selection of end users are probably to switch to Mac OS X's. This really is Microsoft would like to find out the results. 5, do away with Evil Empire) Microsoft's urgent have to tackle this as one of the greatest problems. On the other hand, business analysts alot more aware of vision in recent several years, Microsoft's affect inside the technology industry has declined. Microsoft's Pc operating system is still the grasp with the marketplace. It truly is also for this cause, numerous with the positive aspects of Microsoft's monopoly possess the technologies and don't want this scenario to Microsoft's dissatisfaction together with the program. Except to get a remedy to this predicament, or Microsoft Windows will carry on to become dominant due to the fact the operating program market and the resources to make dollars increasingly more consumers have been accused of. six, the way to cope with the challenges of cloud computing when Google released cloud-based running program technologies, Chrome OS, the marketplace analysts have speculated on Microsoft will react to this. Immediately after all, the running method goods, Microsoft is nonetheless invincible. Microsoft will start cloud-based computing technology and extra innovative operating program to fight Google Chrome OS, or will disregard this move by Google, now nobody can truly reply this query. Still, it can be evident the before start of Microsoft's cloud computing-based operating method, the much more advantageous to the enterprise. seven, the overall performance of Apple's fantastic Mac OS X operating system, although Apple's global operating method marketplace, only a tiny fraction of market share, but its Mac OS X operating system available on the market is fantastic representative with the item. The system design alot more sophisticated, the operation is additionally more basic, much more importantly, Mac OS X's safety threat is much smaller than Windows. Whilst Mac OS X marketplace has not but undergone rigorous testing, it can be undeniable that using technologies as well as the sandbox code to make the program administrator login settings to keep away from some of the security danger. Furthermore, Mac OS X performance in other locations can be very great. Thus, the method might be said to should have the have confidence in of customers far more than Windows option operating program. If Windows eight may have much more components of Mac OS X, then Microsoft will carry on to consolidate its dominant position in running method market. eight, to ensure that business users business enterprise users to give up XP Microsoft Windows operating method has continually been the key to success. If it is not a massive number of enterprises have selected Windows as an workplace operating program, then Microsoft won't have the ability to turn out to be a Microsoft now. In the utilization of Windows seven to correct current problems in Vista, Microsoft hopes to abandon the use corporate end users to XP operating program, after which choose Windows seven. And as of now, there are still a large number of corporate customers are keeping a wait around and see mindset. Which was partly as a result of the financial crisis and budget cuts to businesses to upgrade the running program brings shortage of funds, and partly it truly is given that company people are nonetheless qualified Windows seven really feel nervous about their daily company. This yr, the provider must further cooperation with all the enterprises, and make them realize that in time the significance of upgrading to Windows seven. 9, to triumph over the adverse effects of Vista is not only home business end users of Microsoft Windows Vista system, disappointed, which includes Dell and Hewlett-Packard individual personal computer producers, such as supplying towards the consumer to Vista Downgrade to XP-related solutions. Be concerned about severe deficiencies inside the style Vista vulnerable to malware attacks, consumers also have to take into consideration switching to Apple Mac OS X or Linux's open platform. Microsoft needs to restore this part with the people of Windows, assistance and trust the efforts created, but with little achievement. Windows 7 now has outlined far more than a year, and Vista people triggered discontent started to subside. But in some methods, Vista enterprise and person customers towards the adverse effects stays. Microsoft wants to show, Windows 7 is Vista's enhanced path. Nothing a lot more. ten, control the right to talk over the decades Microsoft Windows encountered 1 of one of the most severe difficulties the organization has by no means had actual control over their Windows voice comment. This tends to make the critics usually get safety issues, Windows Vista, Microsoft's monopoly inside the industry and so to attack Microsoft. Microsoft wants to re-take manage of an advantageous place proper to talk, and guidebook public viewpoint and more involved in the worth of Windows, although not usually get the existence with the challenges that matter. As a lot of industry critics have long concerned regarding the troubles in Microsoft Windows, Microsoft Windows, it seems tough to manage the proper to communicate. However it is absolutely the provider to resolve issues.