database - Object Relation Class Diagram -


i designing object relational database , here class diagram:

http://canning.co.nz/advanceddatabase/class_diagram.png

my computer class has 1-1 relationship currentuser class. when creating object in code, computer class has currentuser object attribute (currentuser_objtyp).

here code:

create type computer_objtyp 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 this:

as computer class has attribute, computer class need attribute listed other attributes (compno, compname, compos, compprocessor, compram), or relationship link currentuser class sufficient?

it depends on exact definitions of computer , currentuser. few examples:

if perceive computer machine, have no current user, because needs no user @ all. users belong os.

if see current user person has hired computer time on computer, important.

if see current user current owner of computer, might otherwise , computer feature belonging user.

if current user employee of company , leasing computer work, important have link computer combination company/user, hence have reference contract.

you have used compositional relationship describe relationship between computer , user. implies computer has currentuser , life span of current user depends on life span of computer. should current user directly or indirectly part of list of variables of computer. on ohter hand have compositional relationship between peripherical device , computer. hard understand. association relationship between peripherical device , computer.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -