Mapping to an and the other to map several in a single table
Hi allI am asked to design a banking application, I the CUSTOMER table where client information is stored. I have a table of ACCOUNT where account information is stored.
Now a customer can start all 3 types of accounts. (Current account, savings account and FD (deposits))
A customer can have - > only one record chequing account, but may have several FD account. How do implement us this using integrity constraints?
CUSTOMER-> Cust_name, Cust_phone, Cust_id (PK), Cust_address table
ACCOUNT-> AccountNo, Acc_type, Cust_id table
Your response is greatly appreciated.
Thank you
Yvette
You may need to create a UNIQUE function based index. It works 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)
/
Tags: Database
Similar Questions
-
We have two identities/addresses. Mine has like 9 folders (Inbox, sent, trash, all mail, spam, important, Star) and the other 3 just (Inbox, sent, trash). We had a guy put this email (Thunderbird) in the computer client. There is no do. So, why this difference? One of these important extras (sorry), or others Miss?
Well, yours is a gmail IMAP account. (All mail is a give) the other account is probably a pop account to your Internet service provider. That is why only a couple of the local folders.
See here for some basic details about IMAP and pop https://support.mozilla.org/en-US/KB/glossary-Terms-including-types-Accounts#w_mail-Accounts
-
Since a few days ago, whenever I open Firefox it opens two copies. Got my tabs from the previous session and the other only my home page. If I close is exemplary, the other closes as well. How can I get rid of the second copy?
I am running version 27.0.1 in Windows 7 on a 64-bit operating system.
Tried to delete the attributes read-only files that the above suggested. There is no additional file numbered as he said, there might be, however. Doesn't seem to help until I closed the second copy with the ability to close all tabs. This simple action closed just a single copy and left me with one that I still wanted to open. I closed and reopened, and always gave me one copy, so I guess it's all fixed.
Thanks to those who tried to help!
-
My office is half divided. One opaque side and the other clear help
My Mac Mini desktop computer has suddenly split into two halves. One opaque side and the other clear help as if half of the screen is selected
I just realized that control of the mission, the launching ramp and dashboard do not work (I can't call them upward)
-
Why Apple can't do two systems? First of all, we are protected, and the other is free just like android, but in the style of the iOS and Apple needs a request so we can manage and see new products from an application and do not go on this site!
and I don't know that if Apple make a system more freely, there no need for any device on Earth but iPhone.
-
Hello...
I wonder if you can help me with a problem with my desktop OS X El Capitan 10.11.4 various...
I use FrostWire and the other asked me to update, so I did and came up with this message, 'FrostWire can damage your computer. You must eject the disk image. There is no disk in my hard drive... I try to download again, but still the same message...
Help, please...
Much thanks
Lisa
< re-titled by host >
The actual message means you need to move the mounted image - the small icon that is displayed after you double-click the .dmg - and put it in the trash.
Where do you see the message your computer?
-
Just installed Firefox 9.0.1. When you open a new browser session, two tabs will open. One is my home page, and the other is a home page of Firefox. I want to just my home page to open. How do I get there? Thank you.
See the following for a few suggestions:
- https://support.Mozilla.org/KB/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
- https://support.mozilla.org/kb/How+to+set+the+home+page - Firefox supports several home pages separated by ' |' symbol
- http://KB.mozillazine.org/Preferences_not_saved
-
A page is my home page, another is welcome to Firefox, and the other is my LassPass. Can anyone tell my why this is happening?
Create a new profile as a test to see if your profile is the source of the problems.
See "basic troubleshooting: a new profile:
There may be extensions and plugins installed by default in a new profile, so check that in "tools > Modules > Extensions & Plugins" in case there are still problems.
If this new profile works then you can transfer files from the old profile to the new profile, but make sure not to copy corrupted files.
See:
-
can I use 2 Mac Pro, the old and the other from different locations with the same apple ID?
Yes. The only problem that I see if Macs were different countries. The method of payment in the account/ID must be associated with the country where the unit is located and you can only buy Apps from the store of the country where the computers are located
-
How to create a delay between the start of the signal simulated one and the other?
Hello
As a first step, I am relatively new to Labview.
I am trying to use Labview for 2 different output square waves (different frequencies, amplitudes, etc.). I've implemented 2 signals to simulate different and do them in a While loop, however, when I start the program, I need a square to begin signal immediately and the other to start square waves 2 seconds later. Any help would be greatly appreciated.
Thank you!
A few questions.
Are these frequencies of associated signals? If so, were they to be "in phase"? As from one simulation after another, put one start later in a case statement, pass a county of timer to establish the initial start time through the loop, subtract the value of the other in the loop, when the difference is => in 2 seconds, set a real flag and have the second simulation in the real of the structure of the business case.
Typed too slowly again!
-
My msn account was blocked and the other recorded with her email address is no longer active so I can't get a verification code. What should I do?
Hi Harryjenkins,
I suggest you to contact MSN support for assistance on this issue:
How to contact MSN customer service
http://support.Microsoft.com/kb/940784
You can also visit the site mentioned below and check if it helps:
http://windowslivehelp.com/solution.aspx?SolutionID=283b059b-d26d-41f9-ae3d-03a07afcb4ad
I hope this helps.
-
I have 2 computers. It is 32-bit and the other is 64-bit. Can I use the same Home Premium Family Pack to upgrade computers to Windows 7?
Hello abc 123, welcome to the Microsoft answers Forum. We appreciate your interest in the Windows 7 Family pack.
To answer your question, Windows 7 Family pack includes 32-bit and 64-bit versions.
Click on the link below to check the prices and offers on Windows 7 Home Premium Upgrade Family Pack at the Microsoft store.
http://store.Microsoft.com/Microsoft/Windows-7-Home-Premium-Upgrade-Family-Pack/product/87DFFF11
Also, check
Windows Anytime Upgrade and family pack price
Good day.
Kind regards
Shinmila H - Microsoft Support
Visit our Microsoft answers feedback Forum and let us know what you think
-
On windows XP, I need to connect to two different networks. Free wifi for the internet and the other for file sharing.
Different gateways, different static address, same subnet mask. But there is problem when operating simultaneously and must
a network must be disabled. Is it possible to run simultaneously?
original title: served various networks simultaneously on windows xp
Go to where you have configured the static IP addresses for your network adapters. Leave the "default gateway" blank for your local file sharing adapter and insert a valid default gateway for your wifi Internet adapter. Of course, this will limit your adapter in a single subnet - which should be OK for use at home or small office to share local files.
This should work as long as the two physical subnets have two different subnet numbers. In general, this means that the first three digits of the IP address of the adapter can not be the same on both adapters - if they are, then you need to make one of the subnets. (i.e. one is 192.168.1.xxx and the other would be 192.168.2.xxx). This is usually accomplished in the router configuration page.
HTH,
JW -
NEED HELP WITH SERVICE PACK 3. After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. , but it of although he gets, he keeps countdown to restart and reboots and restarts, over and over again, never reboots, same screen. my computer won't let me out this screen even after I turned off the computer and turn it back on, I get the same screen. the only way I can get out of this is to erase my computer everything and bring it back to factory, right out of the box, this big headaches. Thanks for anyone who can help me. PS. Keep the answers in simple terms please.
Hi BSRC$, in stock
- You have security software installed on the computer?
- You receive an error message when you restart the computer?
Reinstalling Windows XP to the factory setting would not be the first option.
It is possible that some third-party programs or the services installed on the computer interfere with the installation of service pack 3.
I suggest that you try to uninstall service pack 3 from the computer by using the recovery console and subsequently ask the article below for what to do before installing the service pack 3on the computer.
How to remove Windows XP Service Pack 3 from your computer
http://support.Microsoft.com/kb/950249
Steps to take before you install Windows XP Service Pack 3
-
Cannot receive emails through my Outlook Express 6 account all of a sudden. I can send messages but not receive. I removed all mail rules and blocked senders and I still cannot receive anything. I tested it by sending a mail to it through different accounts (gmail, yahoo) so I know that there must be some messages. I also had people reply to my email that I send to what they do, but I don't get their answers. I have 2 computers in place, using Windows XP and the other is Windows Vista. I've never had a problem until now. Any help?
My server contacted me and told me to check my spam using their webmail account, because it was full. It seems that when I used the rules of the mail I had clicked on delete from the server, just "do not download". My spam folder was so full that I couldn't receive. Thanks for all your advice! Mark as resolved.
Maybe you are looking for
-
trying to get into the emails and only goes to the Inbox. no drop-down menu bar showing the basket, sent, archives, spam, spam. Please let me know how to fix this problem.
-
Sound won't speakers when headphones are pulled out.
When I watch the video in flash and connect my headset, I can not everything in FF without having to restart the program. And when I close the process is still running. But when I stop the process in Task Manager, then start it again I can hear the s
-
XControl in secondary seems to block FP
Hi all I want to view and modify the data of a class LV and its child classes (such as object graph with points, boxes, circle... as child classes). By running the main class VI can change everything and various controls and indicators will be visibl
-
Help - just sync Sansa Fuze 4 GB and not selected folder names
I just sync Sansa Fuze 4 my wife Go with Windows Media Player and folder names are not preserved. It's the folder view using the artist name and it is not how the songs were - they were on the PC as "Classic country" etc. That's happened? I have one
-
I had to replace my hard drive. Now I am rebuilding my system. I bought my pre-installed with MS Office System. When I go to Dell downloads, MS Office is not on the list of downloads for my system. How can I download my new copy of MS Office?