The Artima Developer Community
Sponsored Link

Design Forum
Database design help

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dan dan

Posts: 1
Nickname: danh74
Registered: Oct, 2005

Database design help Posted: Oct 18, 2005 6:47 AM
Reply to this message Reply
Advertisement
hi,
i am writing a web site for insurance agent.
The user have to fill form , post it and wait for call from the insurance agent.
The site will offer different kinds of insurance i will refer only for car insurance

I have those tables:

tbl_car
AppealId (PK),
CustomerId (FK),
DriverCode (FK),
ClaimCode (FK),
CarType,
CarProducer,
CarYear,
CarModel,
InsurancePeriod,
AppealDate

t bl_customers
CustomerId (PK),
FirstName,
LastName,
Email,
Telephone,
Cellphone,
Address,
City,
Birthdat e

tbl_drivers
DriverCode (PK),
NumberOfDriver ,
YoungerDriver ,
NewDriver

tbl_claims
ClaimCode (PK),
LastYear,
SecondYear,
ThirdYear

Since the values in tbl_drivers and tbl_claims came form Dropdowns the user have limited number of possibilities and those tables will have fixed number of raws.

The problem is when i want to insert new appeal.
I have to check if the values the user enter exist in tbl_drivers and tbl_claims, then, if they exist to take the PK of those tables and insert them to tbl_car,
if they do not exist i have to insert them and then to take the PK of those tables and insert them to tbl_car.

Eventually the table tbl_drivers and tbl_claims will have all the combinations that the dropdowns are offer, so the checking will be irrelevant.

Can someone offer me more effective way?
thanks

Topic: Designing CRUD operations Previous Topic   Next Topic Topic: How to create ERD diagram from starting document

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use