[Show all top banners]

thedoors
Replies to this thread:

More by thedoors
What people are reading
Subscribers
:: Subscribe
Back to: Current Affairs Refresh page to view new replies
 Help On SQL Trigger
[VIEWED 3526 TIMES]
SAVE! for ease of future access.
Posted on 04-28-08 9:04 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

HI all, I need some help in the a trigger. Below is this rule.

*No rental is allowed if a customer's unpaid balance fine exceeds $15.

there are 8 tables in total

Staff=>Branch=>Video=>Rental

Rental_Description=>Category=>Video=>Rental

Customer=>Rental_detail=>Rental

I really need some help I tried my best to run the trigger but always failing. Please guys help me out ASAP.


 
Posted on 04-28-08 10:17 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Be precise. Give me table names, attibutes with its datatypes and which flavor of SQL you are using. And the god damn database you are building the trigger on.

Last edited: 28-Apr-08 10:18 PM

 
Posted on 04-29-08 5:09 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hi meek_misfit, thanks a lot for ur willingness to help.

Business rules

  1. A customer can rent up to maximum five videos at any one time (allow no more than five checked out videos at any time)
  2. Late return penalty is $2 each day late. The fine should be automatically calculated and added to the balance.(this balance here means the fine balance, we do need to worry about customer total balance)
  3. No rental is allowed if a customer's unpaid balance fine exceeds $15

I need three triggers to satisfy the above business rules. thanks a lot once again.

 

Branch_ID

Branch_Address

Branch_Telephone

Branch

 

No Partial Dependencies

          No Transitive Dependencies:

 

Staff

Staff_ID

Branch_ID

LName

FName

Address

Salary

Position

 

No Partial Dependencies

Transitive Dependencies: Salary is Dependent on Position

Staff_ID

Salary

                                                                                                                                                                   

Staff_ID

Branch_ID

LName

FName

Telephone

Address

Position

 

 

 

Video_ID

Catalog_ID

Branch_ID

Rental_No

Status

Cost

Title

Actor

Director

Video

 

Transitive Dependencies: Status, Title, Actor & Director is dependent on Rental_No.

Rental_No

Status

Title

Actor

Director

 

Video_ID

Catalog_ID

Branch_ID

Cost

 

 

Category

Catalogue_ID

Genre

 

 

 

             Rental Description                

Rental_Code

Description

Rental_Fee

 

No Partial Dependencies

Transitive dependency

Description

Rental_Fee

 

 

 

Rental Detail

RD_No

Rental_No

Video_ID

Due_Date

Return_Date

 

No Partial Dependency

 

B.C.N.F Dependency

 

Due_Date

Return_Date

Rd_No

 

 

Rental

 

Rental_No

Rental_Date

Customer_ID

 

 

 

Customer

Customer_ID

LName

FName

Address

Telephone

Date_Of_Reg

Balance_Due

Branch_Id

 

Transitive Dependencies: LName, FName, Address & Telephone are dependent on Customer_ID

Customer_ID

LName

FName

Address

Telephone

 

Customer_ID

Date_Of_Reg

Balance_Due

Branch_Id

 

 

 

 

 


 
Posted on 04-29-08 5:13 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

By the way I am using Oracle 10g. thanks
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 30 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
मन भित्र को पत्रै पत्र!
Guess how many vaccines a one year old baby is given
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
ढ्याउ गर्दा दसैँको खसी गनाउच
TPS Reregistration and EAD Approval Timeline.......
nrn citizenship
Elderly parents travelling to US (any suggestions besides Special Assistance)?
कल्लाई मुर्ख भन्या ?
जाडो, बा र म……
Changing job after i-140 approval
Nepalese Students Face Deportation over Pro-Palestine Protest
Trasiting through Istanbul, Turkey
lost $3500 on penny stocks !!!
Is this a progressive step?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters