
Computer Engineering
1999ꡡ254ڡVol.25No.41999



ݿƵEER
桡¼ѵ
ժҪEERȻûγɱ׼صڶĽṹϵϣʧΪһЧOODBƷϿʵ̽EERĸģʽԼĽ
ؼʡݿϵͳʵϵ
Design of OODB with EER
Qiu Xifeng Chen Jiaxun
Department of Computer Science and TechnologyChina Textile University Shanghai 200051
AbstractEERExtended of Computer Science and Technology is considering suitable for this job with its strong points on objectsstructurerelationshipand integirtythough there may lack some standards.This paper describes the conception,implementation and some improvement of EER based on the results of work carried out in this area.
Key words:Object oriented;OODBMS;EER
1EERģ
EERģǶERģ͵䣬ERģһֽΪеģܱͣʾʵ弰ʵḻṹʵϵԼEER߼ģ͵ƣҲһҪĵʽҪԪУ(1)ʵþοʾ(2)Բʾ(3)ϵαʾʵĹϵڵֱʾӦʵСϼӼͷʾϵ(4)̳йϵôʾ
2EERģʵ
ΪڷװʦģصѼ򻯵ģ͡Ҫ£
(1)ģȷʵ
漰ҪУʦ(Designer)ģ(Model)(Manager)˾(Company),ʱװ(Show)ʱװFashionǸԼԡ
(2)ʵгȷʵιϵ
Designer,Model,Manager һЩͬԣɳһʵPerson,PersonЩͬԣΪ
(3)ȷʵϵ
Designer,Model,ManagerӦĳһCompany,PersonCompany֮ϵwork_at;CompanyٰShow,ϵcontrol;ModelShowϱݣϵperform;DesignerʱװFashion,ϵdesign
(4)ϸʵԡϵĵ
ģ͸ʱԽʵ飬Լ򻯽ṹ
ͼ1ʾmanagerdesignermodelperson̳ж person Ժϵmodeldesignermodeldesignerؼ̳жpersonһaddress,citystreetapartment numberzipԡmodelshow֮ϵΪԶϵshowһֵlocation

ͼ1EERģͼ
3EEROOƵԭ
(1)ʵ忪ԭ
ԣָڱ̳չPersonΪname,addressԵ࣬ɱ̳С
ԣָΪԱ仯䣬ҪĶκθĶ磺
Person϶巽getbonus(),
Bag<Person>ps;
Person p;
ps=Person from Person;
scan(ps,p){
p.getbonus().print();
};
ɵõPersonаModelDesignerManagerڵĽбPersonµSalemanʱԿͬõSalemanڵĽб
һ㼯˶ģʽĳԺͿάԣĸı䲻Ӱ츸ࡣ
(2)ʵ㸸ʵĽ涨壬1߼䣬ڸ϶ķԶ̳ʹãû֪͸֮ʽз綨һķ : κΣķж巽set_ratio(n)ͿıΪn:1,ʵ岻ʺϴ˷ҪʹЧ޸set_ratio(n)ʽָΣΥԭ1,ʧȥ˶ԡ
4EEROMTת
EERзḻʾģͲĳһضģʽڹϵģʽģʽģʽģʽڽEERģתΪģʽ֮ǰҪرָһʵϵEERʵϵʽαʾʵƺϵҲʽͼαʾEERģͼϼӵԼϵЩڶģʽͨرʾġڶEERģʹùؼֶһʵԣʵвͬʵڶģʽûбҪģΪͨϵͳĶʶΨһʾģҪйؼԼڶģʽУؼ𵽰ѯãΪѯҲڴ߲ѯЧʡڶģʽռҪλķ(method)EERȴûӦıʾǷζEERݿģʽǷ񶨵ġʵϣݿṹƱĽǶһҪɲ֣ں̶ܴһֽȽı̼ԶĳЩݽṹзװߵڶģʽ޷ֶαʾһԼʱʾ塣ԵܹEERʾķŽʾʱʵûбҪ÷ʹڶݿģʽУӦϵͳĿɱػµӦҪݿṹµķϵͳƽ׶ΣݿṹƱEERģԱģʽҪ塣
ͼ1п֪һcompany3managerԼ·ʵ֣
company.add_manager(manager m){
if count(manager)>=3{
error("Construction Violation");
exit;
}
manager.add(m);
};
ڽEERתΪOMTʱɷ3:
(1)EERʵӦOMTеͼԲ䣬ӦӦķOMT޷ʽʾ塣
(2)ʵʳĳЩϵתΪOMTеࡣ
(3)ӦýǶȳӸӵķ

ͼ2OMTģͼ
ͼ2OMTģǴEERģתġڵһע¼㡣
(1)ʵ壺EERеÿʵ嶼OMTһͼӦʵеļ̳йϵӦͼļ̳йϵһʵӦһؼ̳еmodeldesignerԶӦԣֵԶӦ(setagist)
(2)ϵEERеϵڶģʽпö÷رʾһΪԼһԡЩݿϵͳORION֧˫ã໥áһԶϵͨһļΪԼһʵ֣ԶϵڶģʽҲͬʵ֡һԶϵУϵеרеʱԽϵתΪģʽеһࡣmodelshow֮ĶԶϵperformance,Լרhours,ʾһmodelĳһshowеıʱ䡣ڶģʽнһperformanceͼ3

ͼ3ģʽнPreformance
(3)ԼEERеԼɶģʽеķʵ֣ϵһԼΪӦʵ崴new()remove()add(),delete() , ЩóԼ
5ܽ
EERƷֳһϵĽṹƣڶӦòϵΪơḻʾıʾʽʹΪݿϵͳǰƵߣܷתΪضϵͳģͱʾʽEERʼƶݿϵͳһ˸˵¡
߼飺桡У24꣬о Ҫоݿ缯
ߵλй֯ѧϵϺ200051
ο
1Elmasri RNavathe S.Fundamentals of Database Systems(2nd ed).Benjamin/CummingsRedwood CityCA1994
2Special Report SR-OPT-001826:Information Modeling Concepts and Guidelines(Issue 1)Information Exchange Management.BellcoreMorristownNJ1991-01
3Kemper A,Moerkotte G.Object-oriented Database Management.Prentice Hall,Englewood Cliffs,NJ,1994
ոڣ1998-05-27
