SunQuest
 
           Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 31st, 2003, 05:54 AM
moisea moisea is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: uk
Posts: 1 moisea User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
am i doing something wrong?

hello i need a urgent help on database design, and on my relationship tables to be precise.
i was doing an exercice on a small theater company where i have to keep a record of all the actors who are available to take part in a production and their future availability as well as keeping record of all productions including the play, playwright(s), date of performance and number of seats sold at each performance together with ticket prices(concessionary price available except on closing night).
an actor can be associated with more role in any given production(up to three).
the productions are:
1) A midsummer night's dream performed in old vicarage date:17-21 july 2001
2) Hamlet performed in village hall date: 8-12 april 2003
3) A midsummer night's dream performed in ben johnson's house date:22-26 july 2003
4) John gabriel Borkmann performed in village hall date:11-16 nov 2003
there are 30 actors involved, village hall seats 250 people and the others venus between 200 and 300, ticket prices from 10 to 15 full price and from 7 to 10 concession price.

i have created a relationship table but it seem to be wrong somehow. the tables i have got are:
actors: A_id A_name, A_surname, A_tel, A_spiciality(tragic, comic or supportive role), future availability (yes or no)
production: p_id, venue, play, playwrights, fullPrice_tickets, concess_tickets
previous roles:A_id, p_id, first_role, second_role, third_role
pefrformances:venue, perf_date, full_price tickets_sold, concess_sold.

now the probleme i am getting is i cant link venue from performances table with the one from the production table. 'cause when i tried to enforce the referencial integrity i get "no unique index found for the referencial field of the primary table". i also tried without enforcing the referencial integrity but when i created a query to give me the sum of each performance i get both of the village hall's performance under production 2 and the same under production 4.
this is driving me crazy . i really need help.
many thanks.

Reply With Quote
  #2  
Old September 13th, 2003, 08:50 AM
MICHAED MICHAED is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 MICHAED User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You are trying to link two fields in which none are the primary key - based upon your data above, I would make the venue in the performances table the primary key.

Better yet, I would create a field called "VenueId" (autonumber) and make that the primary key. Then I would create a field in the production table called "PVenueID" (number) as well and populate it with the autonumber values from the preformances table.

You need to link a Primary key (VenueId) to a Foreign key (PVenueId). The data types (text, number, etc.) from both fields in both tables must be of the same type.

Reply With Quote
  #3  
Old September 13th, 2003, 10:46 AM
unatratnag unatratnag is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 312 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 6 sec
Reputation Power: 5
Send a message via AIM to unatratnag
moisea,
Welcome to aspfree forums. We welcome any posts you may have, but please post more appropriate subject lines such as "problems linking tables" or something of that sort, thanks.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > am i doing something wrong?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway