首页  编辑  

面向对象的关系数据库设计

Tags: /超级猛料/Database.数据库相关/   Date Created:

һ

Щ˰ݿƣݿģʽ˼ݿϵͳ(OODBMS) ۻΪһ̸ʵǰݿûݿģʽ˼·ݿ˼·ûʹ󷽷ѧԶκһDBMSݿ⣬͡͡ϵ͡?ɣļϵͳҲѭ˼·

˼·ƹ淶ϵͳϵͳơƣҲݽṹơݿơOOSE¡ʼյع᳹˼·һһdzɵͳһ塣ݿֻ OOSE һڡ

ݿƵҪ

һݿƷ֣ͺʵ͡ʹӹݿӦõԳڹ鲢Լ(ʵ)ʱάԼĺϵʵȴѰҶݿӦʵ֣Ȼͨʵ塣һʵʵ1/10 ʱʹʵƷݿǴӶģͳģʵơ

һݿӦϵͳѭؿ裺1Ӧϵͳṹ2 ѡڽӦó DBMS ϵDBMSϵṹRDBMS3 ӦóʹõĻƽ̨ѡ˵DBMS(Oracle)Ϳ(PB)4 ݿ⣬дݿģʽSQL5 дȷȷ¼ݿûӿӦó6 ¼ݿݣ7 иݿصӦóȷϺݿݡ

ϸ裬мҪ˵

(1)ⲻٲģͣÿһз

ڹ·ϵͳУϸззвдһЩ¼ʱһЩƻ޸ġǵĵʽйأҲйء

(2)˳ǾԵģǴӵʼġ

(3)ԴݿӦϵͳ˵ҪѵIJӦϵͳƶݿơ

DBMSֺ֧ݿ

ܶݿӦϵͳ߲ݿƵԭǣ̫DBMSΪһǿ DBMSݿƾͲѡҪˡһЩݿ̲ijΪDBMSĿվݿûǶȣݿӦϵͳݿƷʹ߸㲻нܵݿ˼룬Ӧ DBMSݿƵ˼롣

ʵDBMSֻǸûΪѲõݿṩһ̨Ƿʹ̨ϵĵԼʲôϷȫȡûϷű͵()İš磬·ϵͳʹõݿϵͳԶάΪԪ֧йϵ֧ʵʵԵȫϵ RDBMSҪ̨ߡһĹϵݿ⡣

ġ ӦöģRDBMSģ͵ӳ

ݿ(ģʽ)Ƿ֧ӦϵͳĶģͣжǷݿϵͳĻ㡣ӦϵͳǰݿӦϵͳģݿģʽӳݿƵĹؼ

1.ݿģʽģ͵չ

һݿƶANSL/SPARCݿģʽ3׼ṹ᰸ӽݿڲģʽ DBMS

ṩSQLģʽɸڲģʽۼɣݿû淶һЩļϡ磬·ּƻݿģʽݿģʽȣ߼ݿ⣬ͨID綨߽硣һĸģʽݿģʽı߽磬ʵݿ塢ضDBMSⲿӦóϢΡⲿģʽǴضûӦýǶȿݿģʽӲͬӦóͬһģʽԸֲͬⲿģʽ磺·̻ѯӦÿݿǹ·ϵľࡢֲʵȣ״ѯӦÿǹ·ϵȡ·εȣǿܷʵͬһIJͬӼ

ⲿӦϵͳԶģͽгʱӸӦóĶģͿӳ䵽ⲿģϣԴDz֮Ϊⲿģ͡ǣⲿģֻǸģ͵Ӽݿƺϵͳģ(֮Ϊģ)

ݿģ͵ӳ(μͼ1)

2.ģݿӳ

RDBMS ԶάΪԪģԶģɶάϵġ֮ģݿģ͵ӳݿı任̡йصı任򵥹£

1һӳΪһϵĿһԶĹϵʱһҲԶӦࡣ

ͼ1 ݿģʽģ͵չ

2ϵ(һһһԶࡢԶԼϵ)ӳжһӳΪһҲڶ䶨Ӧϵӳ䣬һӦ3ԡ

3һ̳еķϵԶԳࡢֱӳҲԲ常ӵиԣ֮ҲԲøӵȫԡ

4Զؼ̳еijֱӳԶζؼ̳еķϵҲӳһ

5ӳĿƵʹﵽĹϵʽ

3.ݿģʽҪӦϵͳ

ѡϵͳҲãݿҲãĿǷӦϵͳҪ

Թ·ּƻϵͳΪƻǴɶѵıЧشȡЩǼƻݿƵĹؼǵÿϽıͬģǿԴһſȥ洢ͬһֱ繫·±ֲһ⣬ûѯijµĹ?±ʱδӿȡ?ݿ˼Ӧһʶűڹ·ֵı±ϱʱϱλΪÿ¼ֶΣɻӴ࣬Ӳѯʱ䣬Чʡοÿű

λˡ˵ԣôأ˳ X3 ˮűX3 ˮűıṹ¡

1 X3ˮűıṹ

ǼӦöģӳݿģͺ󣬵õͼ2ʾĽṹ

ÿһӦģӦһˮűͬһıͬһˮűˮűͳһˮűԸ־֡ύͽÿһűһˮţˮݿΨһģڿдκһűȷġ

ˮŵΪChar(10)ǰ4λΪţ6λΪкţкȡX3кšҲ˵ˮžǶʶһһʶΨһһˮһȥűھ;

òԡ۱ݼṹô仯䣬ֱɾˮŲŻʧˮűǸ࣬࣬ˮű֮ϵֻͨ X3 5Ӧģȫӳ䵽ݿģУγӦöݿһһӦ5ӦöĿϵͳԭеĶԣкܺõķװԺϢԡˮűһЩֵ࣬õġ

ͼ2 ϵʾͼ

塢 ϵݿЧ

ڹ·ϵͳУijϽݿƵյ춨ϵͳԣʹ󷽷ڳ򿪷׶ȫ濪Ч£

1.ݿṹʵOOP

ʵӦģݿȫӳ䣬ݿ߼ģͿȻֱӵģʵʵϵ·ûĵǰ硢ϵͳϵͳⲿܣ֧ϵͳܵڲݿ(ݽṹ)һһӦûߺݿάԱһµԽйͨ

رǶԶ˽⹫·ҵij򿪷Ա˵ֽӦöӦݶװڶͳһеƷ˳ʵֵѶȣʹֻҪ֪ӹݼIJɣӦóͬԶദ̳ԱġԤȿõĸࡣ

2.ݿжԣά

ݿӦģһһӦ⣬߼ģûƶؼ̳еķϵõݿṹɸӱ๹ɵͲνṹм̳ĸӹϵһϾֲԭĽṹӶʹݿƻӰھֲΧұ޸·ϵͳͨݿճά

3.ʱݿʸߣ޸

ӳӦöʱϵӳ淶ܳһԶıӳ⣬ӦöһһӦġǿ԰ѹ淶ġһӦöӳĶһݿ˵Ӧʱȣϵͳ޸ĿԲ漰󲻱IJ֡Σֵ޸ĿԻֻ׷ӻɾģ׷¿ϲ޸ԭгԭп壬Ӷ˹˹Ѷȡ

򵥵ľõ

͹Ǵ۸ӵģѧ۵ķչҲԽԽӡȻ̽ۺͼĿǣÿ͹ĸӱ򵥣򵥵ľõġΪǸ¼Ҹ棺

1.

RDBMS ָ֧ӹϵǿûô߼趨϶ܴϰûʵ֡ʵǣһ𣬲ʹ RDBMSάһԸأҲʹݿӦøӻ˳򿪷ݿ⣬ʵϢƣѼ⸴ӻ

2. ʵ

ݿ˼·70Ǵʹ DBMSҪ֮һȻΪ˽ʡ2ֽڵĴ洢ռȫΪ֮ͷʹ2000һǼӲʱIJԽڼг۸Ϊ6GӲ̵ļ۸񲻹2000ԪϺ۾ 1996䷢һָԼ8000Ԫһµ۸ͿԹ20GҵӲ̡ʹ5ݵĿÿ¼ѹ40ַ࣬ϼҲ2Mʡ0.6ԪǮĴ̿ռ䡣

ѽļʱˣ⡢Ӧÿ١ά򵥵ݿṹõġֻҪԡһԲвЩ࣬Ϊǡ֮ʡɱ (Ӳɱ) õġ

3. Ϣ

ҪĻԭ֮һ֮ϢԽСԽãݿ͸ԽԽãΪӦóҪ֪ԽԽӡʹݿںл (͸ȸ) ķܶ࣬ϵľֲ⣬ DBMSĴ洢̡ȣݿ޷򻯵ĸӱϵװںرǷŵˣԽԸǶ෽ġ