[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 4077 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 90 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
I hope all the fake Nepali refugee get deported
Toilet paper or water?
ढ्याउ गर्दा दसैँको खसी गनाउच
Mamta kafle bhatt is still missing
Tourist Visa - Seeking Suggestions and Guidance
Problems of Nepalese students in US
Those who are in TPS, what’s your backup plan?
Are Nepalese cheapstakes?
and it begins - on Day 1 Trump will begin operations to deport millions of undocumented immigrants
From Trump “I will revoke TPS, and deport them back to their country.”
Travel Document for TPS (approved)
wanna be ruled by stupid or an Idiot ?
Sajha Poll: Who is your favorite Nepali actress?
अरुणिमाले दोस्रो पोई भेट्टाइछिन्
To Sajha admin
seriously, when applying for tech jobs in TPS, what you guys say when they ask if you have green card?
How to Retrieve a Copy of Domestic Violence Complaint???
MAGA denaturalization proposal!!
Nepali Psycho
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