ich the
on.causes
object.oriented model and
the
relational
database
the
imperfect fit between the two technologies.which is called"impedance mismatch". Because of the impedance mismatch
between
RDBMS to store persistent Mapping".
objects
a
we must do the
the two technologies.when using iob called"Object/Relational
O/R mapping
js such
process that tries to map the states of
objects
to the data in RDBMS jn order to provide transparent persistent service.
This paper mainly studies three aspects as shown below:
Theory background of object/relational mapping,object modeling and relational modeling,also the problems that will encountered when mapping object modeling
t0 reIationaI modeling are studied. The ways to map classes in 00P to tables in databases.the strategies to map
the relationship
between objects
technologies
are
studied.There of
are
the rules of
object/relational
are
mapping. The different
and
solutions
object/relational mapping
studied.1t Is the reaI implementation of ORM.There are 3 different tecknologies. based
on source generating,based on bytecode manipulation. is introduced.NHibernate is the C撑.NET edition of Hibernate.It is NHibernate
on
reflection,based
one of the most
successfuI ORM solutions in recent period.
1 suggest a new mapping method.which used Attribute in C舞.NET
Mapping using Attribute is simpler than using XML file in NHibernate.Mapping
II
tries to
cases
Using Attribute is more convenient and more intuitive and unlikely to fail.The paper give some implementations of mapping using Attribute,and uses some
to test it.
Yun
Zhong(Computer Software Theroyl Directed by Prof.Xiaojiang Qian
KEYWORDS:Object/Relational Mapping,Object Persistence,Object
RelationaI Database,ORM
Oriented
III
论文独创性声明
本论文是我个人在导舞指导下述行熬磷究工{乍及取雩罢麴磺究成果. 论文中除了特潮加以标注和致谢的施方外,不包含其毪入或其德机构已 经发表或撰写过的研究成果.其他闻志对本研究的启发和所做的贡献均 已在论文中作了明确的声明并表示了谢意.
作者签名:
簋立圣 励立.吞.一
1
日期:芝i:垒:兰2
论文使用授权声明
本人闻意上海海事大学有关保留,使霜学位论文的艇宠,霹: 有权保留送交论文复印件,允许论文被查阅和借阅;可以上网公布 论文的全部或部分内容,也可以采用影印,缩印或者其他复印手段保留 论文.保密的论文在解密后遵守此规定.
作者签名L二组导师签』蚍日期:鱼叫
对象关系映射(ORM)的研究0基十甜.NET的部分实现
引言
数据是任何计算机应用程序最重要的方面之一.从某个方面看,计算机应用程序 的核心是使某人或另一台计算机能够访问其数据.在企业环境中,数据不仅必须是可 访问的(即,与用户界面连接并按一'系列业务规则管理),而且还必须是持久的.持 久数据存储就是即使在服务器崩溃的情况下仍然存在的数据存储.持久数据存在于应 用程序的活动内存之外,通常在数据库或者平匠文件系统中.虽然持久数据被读入内 存以供使用或修改,但它始终被写到外部数据存储中以长期存储. 自从20世纪60年代面向对象技术出现,数十年来该技术在广度和深度}不断发 展,成熟,逐渐成为被广泛采用的行业标准,面向对象的应用程序开发目前已经是信 息技术的主流.几乎所有的应用程序都需要在一个持久化的存储系统(如关系数据库