I am designing a Object Relational Database and here is my Class Diagram:
http://canning.co.nz/AdvancedDatabase/Class_Diagram.png
My Computer Class has a 1-1 relationship with the CurrentUser Class. When creating the Object in code, the Computer Class has a CurrentUser Object as an attribute (CurrentUser_objtyp).
Here is the code:
create type Computer_objtyp as Object (
CompNo Number,
CompName Varchar2(20),
CompOS Varchar2(20),
CompProcessor Varchar2(20),
CompRAM Varchar2(20),
CurrentUser_obj CurrentUser_objtyp,
HardDriveList_var HardDriveList_Vartyp,
member function getCompName return varchar2)
/
My question is this:
As the Computer Class has this attribute, does the Computer Class need the attribute listed with the other attributes (CompNo, CompName, CompOS, CompProcessor, CompRAM), or is the relationship link to the CurrentUser Class sufficient?