One to one mapping and one to many mapping in a single table

Hi All,
I am asked to design a banking application, I have CUSTOMER table where the information regarding the customer is stored. I have have an ACCOUNT table where account information is stored.
Now A customer can start all the 3 types of accounts. (Checking account, Saving account and FD(Fixed Deposits))
One customer can have - >Only one checking account only one Saving account, but can have many FD account. How do we implement this using integrity constraints?
CUSTOMER Table -> Cust_id(PK), Cust_name, Cust_phone, Cust_address
ACCOUNT Table -> AccountNo, Acc_type,Cust_id
Your answer is greatly appreciated.
Thanks
Sophy

You may need to create a UNIQUE function based index. That would work for you.
create table customer_1 (Cust_id integer primary key, Cust_name varchar2(100), Cust_phone number, Cust_address varchar2(100))
create table account_1 (AccountNo integer primary key, Acc_type varchar2(100),Cust_id integer references customer_1(cust_id))
create unique index account_idx on account_1 (cust_id, decode(acc_type,'CA',acc_type, 'SA', acc_type, 'FD', 'FD' || accountno))
insert into customer_1 (cust_id, cust_name, cust_phone, cust_address) values (1, 'karthick', 0, 'x')
insert into account_1 (accountno, acc_type, cust_id) values(1, 'CA', 1)
insert into account_1 (accountno, acc_type, cust_id) values(2, 'SA', 1)
insert into account_1 (accountno, acc_type, cust_id) values(3, 'FD', 1)
insert into account_1 (accountno, acc_type, cust_id) values(4, 'FD', 1)
insert into account_1 (accountno, acc_type, cust_id) values(5, 'FD', 1)
/

Similar Messages

  • I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from

    I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from it.  It has worked in the past but I downloaded the update today and photomerge will not work correctly.  Any ideas?

    hedger,
    How do you expect anyone to help when we don't know a darned thing about the file, abut your setup, exact version of Photoshop and your OS, machine specs, etc.?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Two addresses - one in the US and one in Australia

    I know the multiple country support issue has been asked and answered many times BUT I actually have two homes, one in the US and one in Australia. I have credit cards in both locations so I should be able to access both country's stores right? I'm currently signed up with the US store and am planning to now add the Australian store. Before I take the big step, I have the following questions:-
    1. Will there be any restrictions with having purchased items from both countries on the one iPod?
    2. If I sell my Australian residence and leave the country will there be any issues with continuing to play music purchased at the Australian store when I no longer have an Australian account?
    3. If I purchase a new iPod after leaving Australia will I still be able to sync the new iPod to my entire iTunes library?
    4. Is there anything else I need to be asking?
    Thanks in anticipation of some interesting responses.
    Regards,
    Chris H
    Dell   Windows XP Pro  
    Dell   Windows XP Pro  

    1. Will there be any restrictions with having purchased items from both countries on the one iPod?
    No.
    2. If I sell my Australian residence and leave the country will there be any issues with continuing to play music purchased at the Australian store when I no longer have an Australian account?
    No, though once you no longer have an Australian credit card, obviously you will at that time no longer be able to purchase from the Australian iTunes Store.
    3. If I purchase a new iPod after leaving Australia will I still be able to sync the new iPod to my entire iTunes library?
    Yes (barring major changes to the iTunes Store in the future, something none of us could predict).
    4. Is there anything else I need to be asking?
    Nothing I can think of in regards to using two iTunes Store accounts and an iPod.

  • Ok, I have two itunes library account one for the PC and one for my Mac, I have my first iphone on my PC, but i just upgrade and I would like to use my new iphone on my Mac but all of my apps and other stuff is in the first library.. How do I put my apps

    ok, I have two itunes librarys account, one for my PC and one for my Mac, I use the PC for my iphone, but I upgrade my iphone and all my apps and
    stuff is on the first itunes library. How do I put the apps from one iphone to the otherusing two dirffernt itunes library? please help..

    Drrhythm2 wrote:
    What's the best solution for this? I
    Copy the entire /Music/iTunes/ folder from her old compouter to /Music/ in her account on this new computer.

  • We are going to Great Britain this summer.  Do we need voltage converters as we'll plug adapters for our iPads (one is 2nd generation and one 4th)

    We are going o Great Britain this summer.  Do we need voltage converters as well as plug adapters for our iPads (one is 2nd generation and one 4th)

    No. Since Apple power converter work from 110 to 240 volts, no power converter is reguired.
    You will need a pin adaprt. I have found my local Ace hardware store to have the best deal on them.
    Allan

  • I have 2 iPhones - one for personal use and one for work. They are currently connected with the same Apple ID. I would like to separate the two accounts. Does anybody know how to do this?

    I have 2 iPhones - one for personal use and one for work. They are currently connected with the same Apple ID. I would like to separate the two accounts. Does anybody know how to do this?

    Just create a new AppleID for your work.
    As Allan suggested, items purchased on one iTunes account cannot be moved to the other account.
    However, you can put items purchased on on account onto the other iPhone.

  • If I have two email accounts, one personal hotmail account and one MS Exchange work account, how can I setup individual notifications for each account. Right now, any email from any account has the same notification. I want work to be different than perso

    If I have two email accounts, one personal hotmail account and one MS Exchange work account on my iPhone 4s, How can I setup individual notifications for each account? Fore example, if I get a work email, I want to hear a DING, DING....If I get a personal email, I want to hear a BEEP, BEEP. Right now, any email from any account has the same notification. I want work incoming email notification to be different than personal incoming notification. The only semi-workaround I've seen is just disable any notification for the Hotmail account, so only work emails would notify. But then I don't know when I get a personal email. Even the lowely Blackberry Torch 9800 has this feature..not iPhone 4s??
    Thanks

    Sorry you get only one notification sound for all email accounts.  you can send a suggestion to apple here http://www.apple.com/feedback/

  • I have 2 apple id accounts, one on my iphone and one on my ipad. I would like them to be the same id. Is there a way to do this and still keep the music on my phone?

    I have 2 apple id accounts, one on my phone and one for my ipad. I would like to be able to use icloud and be able to sync info beteween them. Is there any way to change the apple id on my iphone without losing all the music and apps?

    No. You can sign in and out of the different accounts on the phone and the iPad but you can't use automatic downloads with two different ID's and if you switch to another ID on a device and then you download past purchases using that ID, you will lock yourself out of the other ID for 90 days.

  • I have two different apple id's, one on my computer and one on my phone. i connected my phone to sync music and i lost most of my music. i realised that the music i lost is from the apple id on my mac. how do i undo this mess? help anyone?

    i have two different apple id's, one on my computer and one on my phone. i connected my phone to sync music and i lost most of my music. i realised that the music i lost is from the apple id on my mac. how do i undo this mess? help anyone?

    The iphone will mirror the selected content of your computer.
    Make sure everything is on your computer.  Select what you want on your iphone, sync

  • How can I make two copies of the same picture one with my watermark and one without for printing for clients?

    how can I make two copies of the same picture one with my watermark and one without for printing for clients?

    Export the photo twice, once with a watermark and once without a watermark.

  • I have a few hundred duplicates in my iPhoto library, but the file sizes are different.  So one is 1.3mb and one is 567kb.  I want to delete the smaller ones, but short of comparing each duplicate, is there a way to do this?

    I have a few hundred duplicates in my iPhoto library, but the file sizes are different.  So one is 1.3mb and one is 567kb.  I want to delete the smaller ones, but short of comparing each duplicate, is there a way to do this?  I've been looking at Duplicate Annhilator but I don't think it can do it.
    Thanks!

    I just ran a test with iPhoto Library Manager, Duplicate Annihilator, iPhoto Duplicate Cleaner, Duplifinder and Photodedupo.  I imported a folder of 5 photos into a test library 3 times, allowing iPhoto to import duplicates.  I then ran the 5 photos thru resizer to reduce their jpeg compression but all other aspects of the file the same.
    None of the duplicate removal apps found set that was reduced in the file resizer. That's probably due to the fact that the file creation date was being used as a criteria and the resized photo would have a different file creation date even though the Image Capture date was the same.
    They all found the 3 regular duplicates and some of them would mark two and leave the 3rd unmarked.  iPhoto Duplicate Cleaner can sort the found duplicates by file size but if the file was edited to get the reduced file size it might not be found as it would have a different file creation/modification date. 
    iPhoto Library Manage was able to find all duplicates and mark them as such if the file names were the same the the filename option was selected.  Otherwise it also missed the modified, resized version.  It allowed one to select the one photo to save before going to work on the library.
    So if a photo has been reduced in image quality or pixel size it will not be considered a duplicate.
    OT

  • Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an er

    Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an error appears on the pages with video content?

    its in german:
    der Vorgang könnte nicht abgeschlossen werden.
    something like the process coundnt be completed

  • HT4623 How can I join 2 separate account one for my IPhone and one to my IPad to one account with the same ID and Password?

    How can I join 2 separate account one for my IPhone and one to my IPad to one account with the same ID and Password?

    You cannot combine two different Apple ID's into one ID.

  • BPEL process with one or more requests and one or more responses

    We need to create a process that will have one or more requests and one or more responses, and CheckoutFlow example is exactly what we need. Now we just have to find out how to invoke this process from the Axis client and how to invoke other operations like ‘continue’ and ‘submit’ from the same example.
    I understand that we have to set ws-addressing information into SOAP header, but I am not sure when and how to do that. Also I am not sure why we have to set correlation set when invoking ‘initatiate’, ‘continue’ and ‘submit’ as they are defined as two-way operations in CheckoutFlow.wsdl. I would expect to send correlation set only for ‘onResult’ operation.
    I have used wsdl2java to create stub classes and here is a test client code:
    public void testCheckoutFlow() throws Exception {
    com.erggroup.mass.wf.CheckoutFlowBindingStub stub = null;
    try {
         stub = (com.erggroup.mass.wf.CheckoutFlowBindingStub)
                                                           new com.erggroup.mass.wf.CheckoutFlow_ServiceLocator().getCheckoutFlowPort();
              catch (javax.xml.rpc.ServiceException jre) {
              // Time out after a minute
              stub.setTimeout(60000);
              com.erggroup.mass.wf.OrderType order = new com.erggroup.mass.wf.OrderType();
              order.setProduct("Axis product");
              com.erggroup.mass.wf.ProfileType profile = new com.erggroup.mass.wf.ProfileType();
              profile.setEmail("[email protected]");
              order.setProfile(profile);
              //      Invoke initiate
              com.erggroup.mass.wf.AddressType address = stub.initiate(order);
              address.setName("Axis test");
              //      Invoke continue
              stub._continue(address);
    and this is exception message
    ORABPEL-03802
    Correlation definition not registered.
    The correlation set definition for operation "continue", process "CheckoutFlow", has not been registered with the process domain.
    Please try to redeploy your process to the process domain.
    Is there any example for this? I was looking AXISCallingAsyncBPEL example but it does not help in this case.
    Thanks,
    Dragana

    Error while invoking other method 'proceedNext' after initiating the process:
    Correlation definition not registered.
    The correlation set definition for operation "proceedNext", process "Connection", has not been registered with the process domain.
    Please try to redeploy your process to the process domain.
    WSDL is:
         <message name="ConnectionRequestMessage">
              <part name="payload" element="client:ConnectionProcessRequest"/>
         </message>
         <message name="ConnectionResponseMessage">
              <part name="payload" element="client:ConnectionProcessResponse"/>
         </message>
    <!-- portType implemented by the Connection BPEL process -->
         <portType name="Connection">
              <operation name="initiate">
                   <input message="client:ConnectionRequestMessage"/>
              </operation>
    <operation name="proceedNext">
                   <input message="client:ConnectionRequestMessage"/>
              </operation>
    <operation name="terminateFinally">
                   <input message="client:ConnectionRequestMessage"/>
              </operation>
         </portType>
    MY java class:::
    import com.oracle.services.bpel.Connection.*;
    import org.apache.axis.message.*;
    import javax.xml.soap.Name;
    public class ProceedNext
    public static void main(String [] args) throws Exception {
    ConnectionBindingStub stub = null;
    try {
    stub = (ConnectionBindingStub)
    new Connection_ServiceLocator().getConnectionPort();
    catch (javax.xml.rpc.ServiceException jre) {
    jre.printStackTrace();
    // Time out after a minute
    stub.setTimeout(60000);
    String conversationId = "LocalGUID:c568752ccc493590:148662:1093d9c661f:-7fed";
    javax.xml.namespace.QName qname= new javax.xml.namespace.QName("http://services.oracle.com/bpel/Connection","ConnectionRequestMessage");
    SOAPHeaderElement el = new SOAPHeaderElement(qname, conversationId);
    SOAPEnvelope se = new SOAPEnvelope();
    Name name = se.createName("rootId", "nsbpel",
    "http://services.oracle.com/bpel/Connection");
    el.addAttribute(name, conversationId);
    name = se.createName("parentId", "nsbpel",
    "http://services.oracle.com/bpel/Connection");
    el.addAttribute(name, conversationId);
    name = se.createName("priority", "nsbpel",
    "http://services.oracle.com/bpel/Connection");
    el.addAttribute(name, "0");
    stub.setHeader(el);
    /*String conversationId = "LocalGUID:c568752ccc493590:148662:1093d9c661f:-7ff0";
    javax.xml.namespace.QName qname= new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/addressing","MessageID");
    SOAPHeaderElement el = new SOAPHeaderElement(qname, conversationId);
    SOAPEnvelope se = new SOAPEnvelope();
    Name name = se.createName("rootId", "nsbpel",
    "http://schemas.oracle.com/bpel");
    el.addAttribute(name, conversationId);
    name = se.createName("parentId", "nsbpel",
    "http://schemas.oracle.com/bpel");
    el.addAttribute(name, conversationId);
    name = se.createName("priority", "nsbpel",
    "http://schemas.oracle.com/bpel");
    el.addAttribute(name, "0");
    stub.setHeader(el);
    // Set up the object which will be the input message
    // Note that this Java bean is generated by wsdl2java
    ConnectionProcessRequest conReq=new ConnectionProcessRequest( );
    conReq.setSubject("***************");
    // Make the actual call
    stub.proceedNext(conReq);
    System.out.println("ConnectionProcessRequest BPEL process proceeded!");
    Please help its very urgent....................

  • Is it possible to have two Overhead rates-one based on Material and one based on direct labor?  I am implementing a SAP Business 1 System.

    Is it possible in SAP business one to have two Overhead Rates-- one based material cost and one for direct labor dollars?

    Hi Dick,
    Business one experts will be available on Business One forum and not  here (Accounting and financial close). Click on the below link and start a discussion. Good luck.
    SAP Business One Application
    Thanks and regards
    Sam

  • HT204406 why do all songs I purchase from Itones show up as duplicates in my song Liabary?  One with a cloud and one without.

    Why do all songs I purchase from I Tones show up as duplicates in my Song Liabary?  One has a cloud and one doesn't.

    Did you possibly do the update for new itunes software ? That may be the culprit.To get rid of the entry with cloud,go to Preferences.Go to Store.UNCHECK show itunes in cloud purchases.Click OK..This does not delete,merely hides.Good luck.

Maybe you are looking for

  • Is there a way to use Frame 8 keyboard shortcuts in 9?

    I understand that there is a new UI, but my coworker wants to remain on Frame 8 if he can't use the shortcuts he's been using for 15 years (muscle memory lasts a long time). Is there any way (a preference maybe) to use the F8 shortcuts? I saw a trick

  • Default file path on application server ?

    Can you tell me what is the file path of the file 'dataset' in the below code? I think it is stored in application server but not sure of the path. Is there any default path for such things? Thank you very much! report Z_test_BDC1        no standard

  • Multiple pay slips in a single page

    Dear Experts, We have a requirement to print two payslips in a single A4 paper, This because the payslip which is being printed takes only a half of the A4 paper, The client doesn't what to waste the paper because the number of employees is huge. So

  • IPod G5 froze, can anyone help with a fix?

    My iPod G5 froze today with the screen and backlight still on. When I try to reset it (pressing menu and play), it does nothing, but the buttons still click like they should. Any suggestions? Message was edited by: pckjr

  • How to update iphone on a different computer

    I am trying to update my girlfriends iPhone on my iTunes on ym mac. How do I do this without he rlosing any of her stuff. I simply want to perform a software update only.