Unidirectional and Bidirectional association

Can someone explain the difference between Unidirection association and Bidirectional association.
An example will be a great help....
Thanx to all of you.
Satya

montefusco,
I believe you are correct in stating that in an information system (implementation) often there is a unidirectional association between two objects where in the Real World (conceptual) there is a bidirectional association.
When I mentioned callbacks I was exclusively thinking of an actual callback impelementation.
In an observer pattern implementation, for example, the Observer object has a reference to the Observable object so that the Observer can register itself to the Observable object. The Observable object has a reference to the Observer object for notifications. (of course there are other ways of implementing this pattern, but you get the point, I hope)
So, I don't think we contradict each other here. There was just a confusion with coneptual-level class diagrams and implementation-level class diagrams.

Similar Messages

  • Unidirectional vs bidirectional association

    Hi,
    I've read lots of examples and it seems to me that, in reality, these are bidirectional associations:
    Employee and Department (given an employee, you can find out what department(s) s/he belongs to; given a department, you can find out which employees are in it)
    Parent and Child (given a parent, you can find out who are his/her children; given a child, you can find out who his/her parent(s) are)
    Bid and Item (given a bid, you should be able to tell which item it is for; given an item, you can tell which bids were made on it).
    To show unidirectional, the author just omitted the reference to the other in one class. In my opinion, all of the above should be bidirectional (in real life, they would be, I think).
    Can someone give me some real life examples of a unidirectional association?
    Are most associations bidirectional?
    Thanks,
    C

    Hi,
    I've read lots of examples and it seems to me that,
    in reality, these are bidirectional associations:
    Employee and Department (given an employee, you can
    find out what department(s) s/he belongs to; given a
    department, you can find out which employees are in
    it)
    Parent and Child (given a parent, you can find out
    who are his/her children; given a child, you can find
    out who his/her parent(s) are)
    Bid and Item (given a bid, you should be able to tell
    which item it is for; given an item, you can tell
    which bids were made on it).
    To show unidirectional, the author just omitted the
    reference to the other in one class. In my opinion,
    all of the above should be bidirectional (in real
    life, they would be, I think).
    Can someone give me some real life examples of a
    unidirectional association?
    Are most associations bidirectional?You're quite correct - in "real" life, relationships like the ones you cite are bidirectional.
    However, that does not mean that every software representation of real life situation require the bidirectional relationship. If the model you've derived has no need of the many-to-one inverse relationship, it's possible to leave it out. Why do it? If the model doesn't require it, looser coupling.
    If I'm modeling a parent-child relationship in a financial application, the parent has to know about child dependents, but there might not be any reason for the child object to know who their parent is. I only navigate to children objects by accessing the parent first.
    %

  • Bidirectional association

    Hello,
    I am designing an application where there are Employee objects and there are WorkBlock objects. A WorkBlock object is simply a block of time that the Employee is scheduled to work.
    Each Employee can be scheduled to work one or more WorkBlocks. Each WorkBlock, of course, has one Employee that is assigned to it.
    My question is this: I was thinking of having the Employee maintain a List of WorkBlocks that they are assigned to, and also giving a reference to each WorkBlock pointing back to its assigned Employee. This appears to be a bidirectional association, from what I've read in UML book. I thought that this would be a good idea in the long run since you can query the WorkBlock for its Employee and you can query the Employee for its WorkBlocks.
    But is this bad code style? Should I instead just have a unidirectional association, and just loop through the entire collection of one item to find the other item?
    (For instance, if I only gave WorkBlocks a reference to its Employee, then the only way I could find out which WorkBlocks are assigned to a given employee is to iterate over the entire list of WorkBlocks and look for matching Employees. Does this make sense?)

    Erik,
    By 'dynamic' I meant that the bidirectional associations can come and go during the lifetimes of the objects involved.
    By delegating the job of handling the relationship to something else (the mediator), you can simplify the problem and it's a natural consequence of using the mediator pattern that integrity is maintained. Very nice.
    What the mediator does is something like what jschell describes above. How you implement it depends on whether the associations are one-to-one, one-to-many or many-to-many and also it depends on how you want to find or traverse the objects on the other end of the relationship.
    Have a look at http://patterndigest.com/patterns/Mediator.html for a quick summary.
    One final piece of advice: keep the use of the mediator as an implementation detail shared by the classes that exhibit the bidirectional association. i.e. do not let the rest of the object model become aware of the existence of the mediator. This is often simply a case of getting the object at one end of the association to delegate to the mediator.
    Regards,
    Lance

  • Changing my Apple ID and its associated email address

    For the past 6 years or so I have used the same Apple ID and email. It started out as an Aol account and is now my [email protected] as my Apple ID. I want to change my Apple ID and its associated email account to Gmail since that is what I use more often now. I see the option to change Email Address has next to it "This will be your new Apple ID", which is exactly what I want to do. I have two questions:
    1) I will change the Email Address field to my Gmail address. Will this create any sort of confusion with the DRMed songs and videos I purchased in the past?
    2) For posting on these discussion boards I have yet another Apple ID (created kind of by mistake, a long story). Is there any way I can merge the two?

    I attempted to do the the same (similar) thing yesterday (Sept 2nd, 2010).
    I wanted to change my current Apple ID used for iTunes Store (which was created years ago when I bought my wife an iPod) to be my Apple ID (created when I joined the Apple Developer program way before iTunes).
    After changing the information and clicking the "Done" button, I received an error message that was positioned on the "Apple ID" box, which stated "this is not a valid email address". I assumed that the "email pattern filter" was erroneously attached to the Apple ID input box, so I contacted iTunes Store Customer Support.
    *iTunes Store Customer Support response:*
    +I'm very sorry for the inconvenience, since "<my.user.name>" is already an Apple ID it cannot be used for another iTunes account. At this point, it can only become it's own iTunes account.+
    I'm posting my followup question below, in case anyone on the forum has these same questions or has any experience with actually doing what Apple proposed - create a new account to be used with an existing iTunes Library - and has any experiences they might wish to share.
    *My followup question to iTunes Store Customer Support (waiting for reply):*
    So, what are the implications of creating a new (second) iTunes account?
    - Will I keep my same iTunes Library (i.e. Will all previous items be visible, when using the new account to purchase items)?
    - How will this affect devices (iPhone, iPod) that are synched to the current iTunes Library?
    So, I guess what I'm asking is; "How tightly coupled is the iTunes "account" information bound to the Library"?
    I don't want to create a situation where:
    - My iPhone and Apps gets wiped out when I sync because it sees a different "account name".
    - My Library looks like I have "zero" items (Music/Videos/Playlist) because I've logged into iTunes with a different "account name"
    I'm attempting to only change the iTunes Apple ID and email associated with the account for purchasing items through the iTunes Store. I want to preserve all other aspects of the current set up.
    Is this possible?

  • I have a .mac family account, a personal .mac account and separate iTunes id I use for my work iPhone and the associated apps.  How do I keep them separate in the iCloud change?

    I have a .mac family account, a personal .mac account and separate iTunes id I use for my work iPhone and the associated apps.  How do I keep them separate in the iCloud change?

    Welcome to the Apple community.
    Could you tell us a little more about what you want to do. Bear in mind that iTunes has nothing to do with your iCloud account.

  • Is it possible to create a configuration profile that will install multiple network printers and their associated drivers

    Is it possible to create a configuration profile that will install multiple network printers and their associated drivers?
    I was not able to find profile manager on my employer's installation of 10.6 Server. Is this only a feature of 10.7/10.8 server?

    10.6 server does not have profile manager, profile manager is only available in 10/7 and 10.8 server
    for 10.6 server you'll need to use wgm and server admin
    printer management with 10.6, I recommend you read the relevant server manuals regarding
    print server and user management, printer management

  • "Message is used to carry data between the BlackBerry handheld and an associated server"

     Hi everyone,
    I'm a first time poster!
    I've been receiving about a 100 of these emails everyday for over a week now!  
    Bell mobility and Bell ISP both say it's not their issue or problem to fix and told me to contact the other!  
    The e-mails are orginating from:
    [email protected]
    Any suggestions?
    Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    This message is used to carry data between the BlackBerry handheld and an
    associated server. Please do not delete, move or respond to this message - it
    will be processed by the server.
    BEGINETP 116
    AdxV+90AAAAAIBAIMzAzQUM3MUQgGWZyaXp6ZWxsQHBlaS5zeW1wYXRpY28uY2EAI/HrYFAF
    Q01JTUUDQICAgIAyAAAwOENGOEQ3NkIrRysxALbQEVSv1zvyA8fJF15bAW0AGb/C87pyXKXe
    k+KxQN/Inek!
    ENDETP 70196029
    Message Edited by Frazzledazzle on 09-17-2009 11:44 AM

    HI and Welcome to the forums!
    Here are several KB's that discuss the issue...hopefully one of them has what you need:
    KB04254 Network@etp email messages arrive on the BlackBerry smartphone
    KB10289 What is a Network@etp message
    KB13551 Receiving both email messages and network@etp email messages on the BlackBerry Smartphone
    KB12643 ETP messages are not deleted from the Inbox after delivery to the BlackBerry smartphone
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I am having problems opening iTunes! ever since I updated to 10.5.3ver, I cannot open the application.  I have deleted iTunes and all associated apps (bonjour, Cloud, Apple support apps, etc) and still something is wrong. I cant find it anywhere; where di

    i am having problems opening iTunes! ever since I updated to 10.5.3ver, I cannot open the application.  I have deleted iTunes and all associated apps (bonjour, Cloud, Apple support apps, etc) and still something is wrong. I cant find it anywhere; where did it go? I received the download confirmation each time for each application!  HELP!!  Using Win7 (64-bit)--IE9

    Your post is too difficult to read. Please repost using paragraphs.
    In the interim... For All things TM... See Pondini's Excellent information here...
    http://pondini.org/OSX/Home.html
    In particular... FAQs and Troubleshooting.

  • Why use key-partitioning and key-associator features?

    Why use key-partitioning and key-associator features?
    What kind of applications are suitable for using key-associator and key-partitioning features?
    Could you give me some example?
    Thank you

    So the typical way is to use KeyAssociation. This is a single interface that uses a method
    public Object getAssociatedKey();
    I believe this works on the ClusterService level (rather than say the Cache). So, say you have a Client and an Account cache where a Client can have multiple Accounts. Now both the Client and the Account object will implement KeyAssociation and return the client object as the AssociatedKey. This will cause these associated objects to live on the same partition.
    Now you can do some clever tricks since you know these are on the same partition. These include using the BackingMap and EntryProcessors / InvocationService / Aggregators to return all the AccountIds associated with a client account (essentially a join).
    Unfortunately, these are pretty advanced Coherence features so it is worth building them in a testcase first and getting them to work before you integrate them into your application.
    Best, Andrew.
    PS. You could also use the KeyPartitioningStrategy, but I prefer the KeyAssociation (as do most people).

  • According to my account info, I have 4 authorized computers and 3 associated devices: ar

    According to my account info, I have 4 authorized computers and 3 associated devices: are "authorized computers" and "associated devices" the same thing? I don't think so, but want to be sure.

    enrique m. wrote:
    ... can I deauthorize them individually?
    Only if you physically have the computers in your possession... Then...
    Open itunes on the computer you want to deactivate. Make sure you are logged in.  Under the "Store" menu, pull down top "De-authorize this computer"
    If you no longer have, or access to, the computer(s) you want to deauthorise,
    Log in to iTunes,  go to "view your account info" on the itunes store,  deauthorise all five, (Please Note: this can only be done Once every 12 months)  and then re-authorize your current Computer(s) one at a time.
    Authorise / Deauthorise About
    http://support.apple.com/kb/HT1420

  • Which table stores relationship of business roles and its associated roles.

    Hi,
    I want to know the table that stores the relationship between a Business role and its associated roles.
    Please note that i am aware of the table GRACBUSROLESNAP that stores the business role relationship corresponding to a request id and this is not what i am looking for.
    I want to know the table which stores the definition for business role.
    Thanks & Regards,
    Khush Bafna.

    Hi Khush,
    I think table GRACROLERELAT is used to store business role definition.
    Best Regards,
    Aman

  • Can GarageBand 6.0.5 be installed on a computer which has GarageBand 5.1 without having to trash 5.1 and all associated folders.  Meaning, will 6.0.5 write over 5.1 and replace it

    Can GarageBand 6.0.5 be installed on a computer which has GarageBand 5.1 without having to trash 5.1 and all associated folders.  Meaning, will 6.0.5 write over 5.1 and replace it

    1212 Music wrote:
    will 6.0.5 write over 5.1 and replace it
    if you do nothing but install it, yes.
    what you can do is control click on the application and chose the "Duplicate" option. this will create a renamed copy of GBv5, and when GBv6 replaces the original GBv5, you'll still have the renamed copy available in your Applications Folder to launch (i currently have back to version 4 available on this machine... back to 3 on another).
    for v6 and lower, the instruments will stay the same (GBv10 is vastly different and does replace instruments)
    SOP: if you don't have a full backup of your system, you'll lose everything at some point. as long as you do, you can at least recover from any failure such as installing new software

  • This message is used to carry data between the BlackBerry handheld and an associated server.........

    Hi everyone,
    I am having issues with a couple of BlackBerry's, where they are receiving a message on their phone saying:
     "This message is used to carry data between the BlackBerry handheld and an associated server. Please do not delete, move or respond to this message - it will be processed by the server."
    Email is from "[email protected]"
    This has only appeared since installing the BlackBerry Desktop Software version 6.
    We have used the link below which resolved the issue on one of the BlackBerry's but on the other neither of the options are there.
    http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB04254&sliceId=SAL_Pub...
    The link I have just posted references to version 5, just wondered if anyone knows how to resolve it in version 6 or some other option. Original email is still received fine but want to stop the other email about "This message is used to carry data between.......".
    Thanks in Advance.
    Kevin

    An alternative, if you cannot stop it via the two recommended fixes, is to send those messages to your jiunk folder at the email server level so that they never reach your BlackBerry...
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • BAPI_FUNCLOC_CREATE : Main work center and plant associated

    Hi,
      I'm trying to create Functional locations using BAPI BAPI_FUNCLOC_CREATE. I got almost all the fields except 'MAIN WORK CENTER' and 'PLANT  Associated with main work center'. Please advise me the relevant fields in the importing parameters of this BAPI so that I can upload the same.
    Thanks:
    Gaurav

    Hi,
      Thanks for your response. Actually after doing further R&D, I saw that work_ctr requires the object key of the work center. I fetched the OBJECTKEY from CRHD & passed. It automatically updated both work center & plant associated.
        Awarding you points for your help.
    Thanks buddy!!!

  • How do I recover a deleted mail account and all associated contacts?

    How do I recover a deleted mail account and all associated contacts?

    Set it up again. If you didn't delete anything from the mail server, everything should sync right back up.

Maybe you are looking for

  • 4 iPods, 1 computer with Multiple users

    I love my iPod but I hate the iTunes software. We have 4 iPods, a PC with WindowsXP and 4 user profiles. If we log on as my son, we can all use our iPods - but if I log on as myself, iTunes doesn't start (ironically, I'm an "administrator", he's a "s

  • Updating Attached File

    Please help! I've attached a .pdf file (attachment file) to another .pdf file (source file) using the "attach a file as a comment" tool on Acrobat 9.0. However, the problem is that I've updated the original attachment file by accessing it through the

  • 'No blank lines' - SMARTFORM Paragraph settings HELP!

    Hi, I'm new to smartforms. I'm creating an invoice using smartforms. In sapscript we have the ability to define a paragraph format as 'No blank lines' by checking the appropriate checkbox for that paragraph setting. Where do I do this for paragraph f

  • Solution Manager BC sets for Oil and Gas Downstream

    I am trying to find the oil and gas BC sets for downstream so I can get the basic SSR config done via a CATT script. How do I find them and install them on Solution Manager. I have tried looking at the BC sets I have but I can not see any for Oil, OG

  • Where used list for event

    hi all, we have some process chains which are getting triggered through events. now my question is how to find how these events are getting triggered. I tried to check some Z program but not successfull. please let me know if any where used like sear