Dont know how to link the relationships in these tables?

I have one table called holiday_details and another called date_holiday. I am trying to link the two together.
The column i am trying to link in the holdiay_details is holiday_code. This is the primary key in this table and a foreign key i want to link to date_holiday.
In the date_holiday there is a holiday_code column and a date_departed column.
For this table the same holiday can have many departure dates. E.g H1 (holiday_code) - 10-17-2010(date_departed). H1 - 11-20-2010. However the same holiday cant leave on the same date more than once. e.g H1 - 10-17-2010 = unique constraint violated.
Therefore i made a unique composite key of the two columns (holiday_code and date_departed) together.
When i try to reference holiday_code from my holiday_details column to my holiday_code on the date_holiday it wont work. Cant i reference it because it is a composite unique key? I dont know any other way to reference it. I cant make either the primary key, they have to be unique together.
Does anyone have a solution? Im completely stuck and any help would be greatly appreciated. Thanks in advance!

Jay,
I can't say to have a solution but will make some recommendations.
<li>Google Oracle Database Naming Conventions and find a better method of naming your tables, keys and attributes. Doing so will make your data structures and data models easier to understand.</li>
<li>Key both of your tables by Sequence</li>
<li>Document further what each of these tables represents and determine what the remaining attributes would be for each table.</li>
<li>Data model using SQL Developer or any other data modeling tool, an ERD in my opinion is much easier to read and later is a road map while developing and enhancing your application</li>
From what I could understand, I modeled the following:
holiday_tbl with a PK of holiday_seq (sequence)
holiday_departure_tbl with a PK of holiday_departure_seq and a FK key of holiday_seq
This would establish a one to many relationship, holiday_tbl to holiday_departure_tbl or holidays have one to many departures.
Your business rule of, a holiday can only one depart once on a given date, could be enforced either on the database or within your application.
Hope this helps you out.
Jeff

Similar Messages

  • How to make XML element used in RTF PRIVATE/PUBLIC ? I know how to hide columns in RTF, but dont know how to generate the xml in below way. Please help.

    Hi
    I am following below link to hide/show my columns dynamically. See "Column Formatting"
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187.pdf
    As per doc, element can be made private/public.
    <items type="PUBLIC">
    <item>
      <name>Plasma TV</name>
      <quantity>10</quantity>
      <price>4000</price>
    </item>
    <item>
    And same can be used to hide the column using condition
    <?if@column:/items/@type="PUBLIC"?>
    MY QUESTION IS HOW TO DO THIS IN MY XML BELOW?
    Below is part of my XML code which I am using in Data Definition for RTF.
    <group name="GH3" source="QH3">
    <element name="COLUMN_HEAD3" value="COLUMN_NAME" />
    </group>
    <group name="GH4" source="QH4">
    <element name="COLUMN_HEAD4" value="COLUMN_NAME" />
    </group>
    I am getting output like this.
    <LIST_GH3>
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4>
    <GH4>
    <COLUMN_HEAD4>XYZ</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    In order to use logic as per oracle document I want output like this.
    <LIST_GH3 type="PUBLIC">
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4 type="PRIVATE">
    <GH4>
    <COLUMN_HEAD4>BLANK</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    What changes I need to make in my XML code to get the runtime output as above? Please help. Where do i need to make changes in the above xml? Group name? Element name?
    I am planning to use below condition in RTF template to hide the column,  but dont know how to set the type of column as PRIVATE/PUBLIC in the XML output used to populate data in the RTF at runtime.
    <?if@column:/BTSPIEXP/LIST_GH3/@type=”PUBLIC”?>COLUMN_HEAD3<?end if?>
    Regards,
    Swapnil K.

    Hi,
    Issue has been resolved. I used the value of the element to determine to display it or not.
    Regards,
    Swapnil K.

  • Got my serial number but dont know how to download the program

    I entered my code and got my serial number but dont know how to download the program from there.  there is no buttons or direction to follow please help

    Here is one place:
    Adobe Photoshop Elements 13 Direct Download Links, Premiere too | ProDesignTools

  • How to I retrieve my purchased apps? I had my Iphone stolen in FEB, then in July my PC crashed. I just got a new Iphone but I dont know how to get the apps.

    How to I retrieve my purchased apps? I had my Iphone stolen in FEB, then in July my PC crashed. I just got a new Iphone but I dont know how to get the apps.

    Open itunes store, click Purchased under Quick links.
    Where is your backup copy of your computer?  You can use that as well.

  • Did you know how to link the text in two or more text boxes?

    Did anyone know how to link the text in two or more text boxes in Pages 5.0? Thanks for your answer.
    Qualcuno sa come collegare il testo in due o più caselle di testo nella versione 5.0 di Pages. Grazie per le vostre risposte.

    It's just one of the many, many features that have been eliminated or changed. Leave feedback for the Pages team using the link in the Pages menu and review & rate the new versions in the Mac App Store.
    If you previously had iWork '09, those apps are still in your Applications folder in a folder named iWork '09. You can continue to use them to get things done.

  • I did not authorize 2 in app purchases and because my credit card is at its limit, and i dont know how to reverse the in app purchases, i cannot update any app or do just about anything in the appstore or itunes store. I paid for apps, i demand my updates

    I did not authorize 2 in app purchases and because my credit card is at its limit, and i dont know how to reverse the in app purchases, i cannot update any app or do just about anything in the appstore or itunes store. I dont care if i owe apple's itunes appstore a few dollars over 2 in app purchases i never meant to download in fact the whole app itself i wanted to delete...but out of the hundreds (maybe lower thousands) fof dollars in music and apps and whatever else, that i rightfully purchased over the passed couple of years....should *NOT* have the upgrades and/or previous purchased songs withheld from me over $3 in accidently purchased add ons through an existing app i deleted an disliked anyway

    Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"

  • I have changed the apple ID (email, but on my iphone , the icloud is stil asking me to log in whit the old email.And it is poping-up on every 10 seconds.I never used icloud, and i dont want to use it.I just dont know how to disable the icloud.

    i have changed the apple ID (email) but on my iphone , the icloud is stil asking me to log in whit the old email.And it is poping-up on every 10 seconds.I never used icloud, and i dont want to use it.I just dont know how to disable the icloud.

    If you see that pop up you enabled icloud. Whether you want or do not want now to use it irrelevant until you actually disable activation lock.
    In order to do that you have to change your apple id back to do that just long enough to sign in and back out. System will ask you to verify, don't.
    Just sign in on the prompt you getting and then logout. Once done, change apple id to what you have now and verify. Then decide if you want to
    use icloud (who does not want to be able to track their phone if lost or stolen).

  • I have a game in the game center(clash of clans) and i have more than one apple mobile on the same account and i dont know how to delete the game(clash of clans) from the game center

    i have a game in the game center(clash of clans) and i have more than one apple mobile on the same account and i dont know how to delete the  game(clash of clans) from the game center.

    Hello ayhamnaser,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Using Game Center
    http://support.apple.com/kb/ht4314
    If in Game Center > Me > Games > my iOS Games > swipe to the left on the game > Remove.
    Have a nice day,
    Mario

  • I have installed the LATEST VERSION of itunes in my windows and i bought the new ipad with retina display ,i had moved music into the ipad from my windows through the itunes but I DONT KNOW HOW TO MOVE THE VIDEOS IN MY VIDEOS LIBRARY OF MY COMPUTER TO MY

    i have installed the LATEST VERSION of itunes in my windows and i bought the new ipad with retina display ,i had moved music into the ipad from my windows through the itunes but I DONT KNOW HOW TO MOVE THE VIDEOS IN MY VIDEOS LIBRARY OF MY COMPUTER TO MY

    Close your iTunes,
    Go to command Prompt -
    (Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
    (Win XP SP2 n above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
    In the "Command Prompt" screen, type in
    netsh winsock reset
    Hit "ENTER" key
    Restart your computer.
    If you do get a prompt after restart windows to remap LSP, just click NO.
    Now launch your iTunes and see if it is working now.
    If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
    Apple software on Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/TS4123?viewlocale=en_US

  • I want to transfer pictures from my iphone 4 to a hardrive, but the problem is i dont know how. Can the genius bar help me with that, and can they possibly do this for me if i bring my iphone and hard drive with me there. Also if there is a cost, how much

    I want to transfer pictures from my iphone 4 to a hardrive, but the problem is i dont know how. Can the genius bar help me with that, and can they possibly do this for me if i bring my iphone and hard drive with me there. Also if there is a cost, how much?

    iOS: Importing personal photos and videos from iOS devices to your computer

  • In my iPhone 4 the mute is getting on automatically dont know how to release the mute

    In my iPhone 4 the mute is getting on automatically dont know how to release the mute

    Have the same problem with every phone call since going to IOS7 - think my face is touching the mute on the screen but I am unaware that it has happened and keep talking until I realise the other side has hung up as they can't hear me - extremely frustrating. Then when the other side calls back, I don't hear the call as it is muted!! Is there a fix for this or a way to move the mute button??

  • I have am IPhone 3GS. I put all my pics in folders and now I dont know how to pull the folders off my phone on my laptop . I want to change up and delete some of them, Can anyone help

    I have am IPhone 3GS. I put all my pics in folders and now I dont know how to pull the folders off my phone on my laptop . I want to change up and delete some of them, Can anyone help

    You have to make the changes you want in the folders on your computer, then sync your new choices via iTunes.  iPhone, iPad and iPod touch: Syncing photos via iTunes, http://support.apple.com/kb/HT4236

  • Somehow i have synced my photos from my area on to my ipod touch, and dont know how to remove the photos. Any help?

    Somehow i have synced my photos from my area on to my ipod touch, and dont know how to remove the photos. Any help?

    You need to unsync them.  If you uses the folder syncing method either remove them from your syncing folder or change which is you syncing folder.  Also see:
    iPhone, iPad and iPod touch: Syncing photos via iTunes

  • I DONT KNOW HOW TO PLAY THE VIDEO ON MY IPOD

    i dont know how to play the video on my ipod when i select it from the menu the song starts playing but there is no video all there is is a little picture in the top right hand corner can someone help please?

    the videos of course have to be in the correct format that's why an app like ipod itunes will be helpful in making your videos viewable you can even do the encoding yourself i might suggest checking out this helpful guide http://www.macworld.com/article/48480/2005/12/convertvideo.html once your videos have been converted the videos may appear in the Movies part of your itunes desktop hopefull this helps

  • Hi there,I was using MacPro with older snow leopard just now i install OS X LION,before install i backup all deta to time machines about 70GB,now when i connect i dont know how can backup the old deta to OS X LION,but it just backup the recent deta to tim

    Hi there,
    I was using MacPro with older snow leopard just now i install OS X LION,before install i backup all deta to time machines about 70GB,now when i connect i dont know how can backup the old deta to OS X LION,but it just backup the recent deta to time machine,pls guide me how i can backup my old deta to my computer??
    Will be much appreciated !!
    Thanks.

    >Step 1. Backup existing data using time machine.
    Time Machine is nice, but you have very little in terms of ability to verify that your data is all backed up.      I find Time Machine is better for the occasional recovery of previously written data at specific times.  A good backup solution that survives an erase and install (there is no clean install in Mac OS X), is a clone, and preferably TWO clones.    See my FAQ*:
    http://www.macmaps.com/backup.html
    Time Machine can work as good as a clone, and in fact I once had to rely on it because my hard drive died.  Thankfully it did recover everything.   But I had my clone just in case it didn't work.     Now I feel more comfortable since clones allow you to boot themselves, and thus prove all the important system information got saved, and not just the user data.
    Clones are also easier to import with the migration assistant.

Maybe you are looking for

  • I downloaded some photos that were from an older version of iPhoto. i installed the application to upgrade. i opened iphoto,

    I downloaded some photos that were from an older version of iPhoto,I was asked to  install the application to upgrade/. (Your photo library will not be readable by previous versions of iPhoto after the upgrade. The upgrade process for very large libr

  • Photoshop CS3 crashing and freezing

    I'm running PSCS3 on WinXP using a P4 processor. Lately, both Bridge and PS are freezing and crashing. I've tried to pinpoint what I'm doing when this occurs but can't seem to find a consistent workmode issue. Other times, if I leave the program runn

  • Producer/Consumer Design Pattern with Classes

    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Err

  • CMP with auto-increment primary key.Please help

    Hi all, I new with EJB technology so please bear with me. Env: 2k Server, SQL 2k Server Sun One(Forte EE) to develop and deploy CMP I got the servlet to load the data from CMP's business mehods is fine. Calling the findPrimaryKey is OK too. Even when

  • User-defined info structures

    Hi, How are info structures populated? Where does the data come from? I have a problem with the stock quantity being displayed in the report because in RWBE, there are no stocks being reflected but using MCG3 and choosing the info structure, I'm gett