Click here to Skip to main content
15,920,632 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have problem in logic


my master table Student is
SQL
StudentId(int,not null)
FullName(nvarchar(30),not null))
DOB(smalldatetime)


my child table StudentCerificates is
SQL
StudentCerificateId(int,not null,pk)
StudentId(int,not null,pk)
CertificateName(nvarchar(30))
CertificateDate(smalldatetime)


i save the infromation of student and student cerificates in database

i do this

my problem i can not understand this

SQL
On submission of complete form for saving record(s) into database, a verification must make sure that at least a single record exists for Student Certificates, otherwise abort the save operation.

Posted
Updated 20-Jul-11 13:14pm
v2

The requirement simply states that if you do not have any certificate records for the student, abort the save (dont write anything to the database).
 
Share this answer
 
Hmmm, this sounds like homework! Well, benefit of the doubt that you are actually making an application for a school or something :P

Basically, if the student does not supply at least one certificate by the time they finish signing up, remove them completely from the database.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900