我有一項家庭作業任務,需要使用Oracle 10g Express來實現對象關係數據庫來跟蹤電話帳單數據。我有Call類,Text類和Data類的通信超類。我正在填寫這些表格,以便我可以在各種表格中找到適當的數據。正確填充對象關係數據庫中的表格
我的類型和表被宣佈爲:
create type CommunicationType as object (
-- column names here
) not final;
create type CallType under CommunicationType (
-- column names here
);
create type TextType under CommunicationType (
-- column names here
);
create type DataType under CommunicationType (
-- column names here
);
create table Communications of CommunicationType (
-- Primary and Foreign key constraints here
);
create table Calls of CallType;
create table Texts of TextType;
create table Datas of DataType;
當我嘗試insert
數據導入的一個子類,它的入口不超出現。同樣,如果我將這個insert
放入超類中,它就不會顯示在適當的子類中。例如,insert into Calls values (CallType(-- Values --));
在通訊中不顯示任何數據。 insert into Communications values (CallType(-- Values --));
也不會在呼叫中顯示任何內容。
我在做什麼錯?
有什麼不對?你正在考慮基於SET的世界中的OOP – 2010-06-14 18:48:25
@OMG小馬:我相信你。 :)那麼,我是否誤解了我應該能夠從兩張表格中獲取信息,或者我可能會誤解*如何設置表格? – chaosTechnician 2010-06-14 19:03:22