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:
  #1  
Old August 31st, 2003, 06: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, 09: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, 11: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: 7
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





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek