[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 4042 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 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
What are your first memories of when Nepal Television Began?
Sajha Poll: नेपालका सबैभन्दा आकर्षक महिला को हुन्?
ChatSansar.com Naya Nepal Chat
NRN card pros and cons?
TPS Re-registration case still pending ..
Basnet or Basnyat ??
TPS Re-registration
निगुरो थाहा छ ??
Nas and The Bokas: Coming to a Night Club near you
Toilet paper or water?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
अमेरिकामा छोरा हराएको सूचना
ढ्याउ गर्दा दसैँको खसी गनाउच
Sajha Poll: Who is your favorite Nepali actress?
Do nepalese really need TPS?
Problems of Nepalese students in US
nrn citizenship
TPS EAD auto extended to June 2025 or just TPS?
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
TPS Update : Jajarkot earthquake
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