September 2, 2006 at 8:42 am
For a bank database, i want to find Relationships of Tables Account,Transrecord and customer
how do i find the relationships ?
does Account:Transrecord=1:many ?
does customer:Account=1:many ?
i dont know how these kind of relationships are calculated....do u know any formula ?
please explain.
September 3, 2006 at 3:20 pm
Assuming a Customer can have multiple accounts and accounts have multiple xaction its 1 to many Customer to account and 1 to many accounts to Transcation.
September 4, 2006 at 8:01 pm
If the tables already exist, there should be foreign keys in the child tables (the "many") that point to the parent tables (the "one").
If not, then, as Sreejith suggested, you just have to know the data in the banking industry.
A single customer may have more than one account.
Each account can have multiple transactions.
You get the idea... the tricky part will come when you find out that an account can be owned by more than one customer
--Jeff Moden
Change is inevitable... Change for the better is not.
September 5, 2006 at 1:20 pm
Let me add to the previous posters but you determine relationship by upper and lower bound cardinality. The base line is you determine tables through files and association to create your columns. Try the link below for some sample DDLs to get started sorry no decent one for the banking industry. Hope this helps.
http://www.databaseanswers.org/data_models/
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
September 6, 2006 at 8:53 am
ok...but see this
http://img490.imageshack.us/my.php?image=webcz6.png
see the red colored multiplicity
transrecords [one]
account [many]
this is not correct at all ...is not it ?
because, one transaction record holds for one Account only.
and 1 account might have many transrecords.
so, that should have been .....
transrecords [many]
account [one]
i dont want to manipulate anything....but this should have been !
this is from Websphere Wizard with CMP bean relationship....(dont worry about EJB here plz...just we need to think about from DB perspective)
September 6, 2006 at 10:08 am
EDIT
I just reread your post it is related to Atomicity of transactions, that is one at a time. But still look into what I posted below.
transrecords [one]
account [many]
But you are looking at UML view not the relational view, UML is objects so that may be correct but the relational model is more restrictive, most of these wizards let you run your own .sql files so that maybe an option. Webpshere is $90,000 there must be a way to change table definitions within it. Hope this helps.
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
September 8, 2006 at 10:01 am
Thanks gift for the reply.
Yes, i see its a UML view.
do you mean in UML view mapping becomes the reverse of the Relational view ?
in fact, this is a legal thing...
transrecords [many]
account [one]
because one account may have multiple transrecords....so that should be the correct mapping.
BUT, in the image link i posted ...they have shown UML view
transrecords [one]
account [many]
does it mean UML view is opposite to the Relational view ?
September 8, 2006 at 10:49 am
(does it mean UML view is opposite to the Relational view ?)
Most times yes but Webpshere is an expensive wizard based Java but you should be able to make the correction with code. I would try to find out about ERD within the company and you are almost there. Bank customer ERD are most likely in DB2 and Oracle 9i/10g run a search on Google. The banks just run the Web version in SQL Server realtime transactions are in DB2 and Oracle. Hope this helps.
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply