asp.net - Database relations query -


i have 2 database tables ticket table

tax table

this sample database of ticketing system.

figure 1: sample table of air ticket. figure 2: sample table of tax.

requirement: when ticket made interface, has multiple taxes of different names every time. how can store information i.e. 'n' number of taxes each ticket different names every time.

i have tried make many many relationship problem is: each ticket if tax not setup, need add tax first.

any optimal solution this?

"the problem is: each ticket if tax not setup, need add tax first."

this not real-life problem. in real life governments declare taxes in advance of collecting them, gives organizations sufficient time amend systems need handle taxes. tax never surprise.

"but tiring solution end user.... make bunch of tax setup each ticket"

this sort of thing reference data, , duty of system developer (hint: that's you) populate reference data tables. or @ least provide screen user can create or amend various taxes. different function defining ticket type.

the ticket creation screen should have drop-down list (or similar widget) displaying existing taxes, allows user pick relevant one(s). if reall think it's necessary can include link create tax screen, confusing workflow.


if commentators correct, , ticket purchasing function, design wrong. sales taxes must included automatically cost of purcahse part of transaction. otherwise nobody pay tax.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -