Results 1 to 10 of 10
  1. #1
    Korei Khan is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    10

    Question New to Access - Database Relationship Dilemma

    Hello,
    I am trying to make a pretend video rental database which includes the following:
    - Customers Table. Outlines customers descriptions (persons who purchase movies).
    - Sales Representatives Table. Outlines sales representative description (sales representatives are the persons who sell the customer the movie).
    - Receipt Table. Receipt indicates a finalized sale bought from the Customer and sold by the Sales representative.
    - Transaction Table. Transaction indicating the quantity of movies bought and the movie sales price.
    - Movie Stock Table. A movie stock indicating the amount of movies in stock, the movie description, and the movie purchase price.


    - Movie Table. A movie table indicating movie description and characters of movie.
    - Movie Character Table. A movie film character table indicating character description.
    - Movie Personality Table. A movie personality table indicating the person who plays the role of the character in said film.

    Referencing below relationship:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	39 
Size:	46.8 KB 
ID:	22240

    Now the question:
    I'm having difficulty with a particular part of my database which has been highlighted in red. I would like to associate one movie with multiple film characters i.e. 1 - M relationship. At the moment I have a 1 - 1 relationship i.e. 1 movie to 1 film character and then I can't add any more characters. Any suggestions on how to add additional movie characters to the movies in a new or existing relationship?

    As I said I'm new to databases these forums and Microsoft Access so go easy on me.

    Thanks for the help.
    Last edited by Korei Khan; 10-01-2015 at 07:02 AM. Reason: Database Edit. Text Clarity.

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    Are you wanting to allow for the same character to appear in multiple movies? If so you'll need a junction table between the character table and the movie table.
    If not, then the character table needs to have a foreign key which links to the PK of the movie table. Right now you have this backwards.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  4. #4
    Korei Khan is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    10
    Hello,
    Thank you both for supporting the cause, providing fast assistance, and leading me in the right direction.

    @JamesDeckert. Adding below depicted junction table and relationship was exactly what I needed to set up a M - M relationship, thanks.

    Click image for larger version. 

Name:	CaptureC.PNG 
Views:	36 
Size:	13.9 KB 
ID:	22255

    @Orange. The data model you provided helped me to add a tonne more of data, increasing the potential of the database. Thanks.


    Final question:
    Referencing below depicted image:
    Click image for larger version. 

Name:	CaptureD.PNG 
Views:	37 
Size:	12.8 KB 
ID:	22256

    Is there any way I can sum up the data to remove duplicate records?


    Thanks for the help.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    A duplicate record is a record that has the same values in each field as another record in the same table.
    I do not see your highlighted record to be a duplicate.

    Your table names have changed since your first post??? I find them confusing.
    Perhaps you could describe again exactly what you are tryingsupport with this database.


    Also
    - Movie Personality Table. A movie personality table indicating the person who plays the role of the character in said film.
    seems a long-winded way of saying Actor.

    - Movie Character Table. A movie film character table indicating character description.
    seems like Role

  6. #6
    Korei Khan is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    10
    @Orange
    I have completely scrapped the old, existing layout, changing the names, and fields of the database. Included your suggestion to change 'personality' to actor. I also removed 'character' as I decided this a pointless complexity. After all, who searches a database based upon the name of a character? Anyway, to clear some confusion I can give you the database file (WIP) along with excel spreadsheet.

    Database:
    https://drive.google.com/file/d/0B90...ew?usp=sharing

    Excel:
    https://drive.google.com/file/d/0B90...ew?usp=sharing


    At the moment I have the following table structure when associating one rental with many actors:

    1 Pitch Black 2000 Vin Diesel
    2 Chronicles of Riddick 2004 Vin Diesel
    3 Riddick 2013 Vin Diesel
    4 Pitch Black 2000 Radha Mitchell
    5 Pitch Black 2000 Cole Hauser
    6 Pitch Back 2000 Keith David

    Now, would the depicted be considered 'duplicate fields' and 'poor database design'. If yes, how else could I associate a movie to multiple, individual, actors?

    Thanks for the help.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I looked at your database briefly. I find it confusing, but I don't know what business you are in, nor what you are really trying to support.

    You mention rentals, but are describing Actors in Movies. You have the word _Table_ in every table name.

    Do you have a 5-6 line description of what you are actually trying to accomplish?

    If you were to have someone else develop this database, what would be the instructions for that developer?

    Also, there are no duplicate rows in your sample.

  8. #8
    Korei Khan is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    10
    @Orange
    1. I have little experience with Access, SQL, and databases hence my probably beyond unorthodox ways. Regarding the use of 'Table_' I have noticed other database persons use 'Query_' and 'Report_' at the beginning of query and report names. Are we not suppose to do the same for tables? I assume your confusion regarding the database stems down to the lack of content (still a Work in Progress) as I am just laying down the structural foundations at the moment.

    2. I am not doing this for any commercial purpose (to your relief) and this project is purely for academic purposes.

    Objective: The task objective is to create a model database to that used by video rental stores, specifically Video Ezy. The database shall comprise of descriptive rental information, including the associated customer, distributor, and employee. The rental along with connected persons should be clearly identifiable and be elaborately described. In developing, I must demonstrate a multi-table relationship, with a minimum of 5 outcomes and maximum of 30 records per table. There must be a minimum of 5 records for each query and the criteria should be relevant to the expectation. Included, is an intended comprehensive and accurate searchable form with interconnected reports. The database purpose is to provide an easily accessible, manageable, up-to-date, and well-structured set of data that can be used by both customers and store managers to complete a number of diverse functions.

    Nonetheless, the project will remain incomplete as entering the records of Video Ezy would require extensive resources. After all, the company spans across 100 franchised stores, has employed about 5000 persons, is greeted by new customers daily, and has an extensive repository of rentals.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I think your "academic bent" may be interfering with your activities. Your objective sounds a little
    "academic".

    "An extensive repository of rentals." My guess is that 99.9 % of readers would call these things videos. Perhaps it is just my not being close to the business, but a "rental" would seem to be a contract between parties regarding a service.
    Video Ezy agrees to rent the video "XXX" to Customer123 for a period of z weeks for a price of $D (with conditions re non-return and or late return as a part of the rental agreement).

    I think what you are missing is a clear description of the business in simple English terms.

    Here are a couple of examples from tutorials on RogerAccessLibrary site that may help you describe the business opportunity/issue that is the subject of your database.

    Case 1.
    Code:
    ZYX Laboratories requires an employee tracking database.
     They want to track information about employees, the 
    employee's job history, and their certifications.
     Employee information includes first name,  middle initial,
     last name, social security number, address, city, state, zip,
     home phone, cell phone, email address. Job history would
     include job title, job description, pay grade, pay range, salary,
     and date of promotion. For certifications, they want  
    certification type and date achieved. 
    
    An employee can have multiple jobs over time,  
    (ie, Analyst, Sr. Analyst, QA Administrator). 
    Employees can also earn certifications necessary for their job. 
    
    Case 2.
    Code:
    Sue Johnson is starting a catering
     business.  She is looking for a program to help her maintain 
    her business.  She wants to start by tracking customers and orders.
      She will eventually want to add accounting features like accounts 
    payable, accounts receivable, and inventory control, but wants to start small.
    
    Customers are the people to whom she sells her catering services.
    Customer information includes: 
       Name, Address, Phone, Alternate Phone, Fax, and Email.
     A customer may place many orders.
    
    An Order is a group of items delivered as a single unit to a single Customer.  
    An Order contains the customer information, the order date,
    delivery instructions and an itemized list of the Items delivered.
      
    An order applies to only one customer at a time, 
    but each order can have many items on it.
    
    Items are the individual items that appear on an order.
      Each item has an associated item number, item description,
     quantity, price and extended price.
      Each item can appear on many orders, and can appear on one
     or more orders.

  10. #10
    Korei Khan is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    10
    Hello,
    Apologies for the delay, I downloaded and had a quick view through both the tutorials and cases that you provided. In doing this, I released that my own purpose was lets face facts, absolutely shoddy and more of a general idea. Changing the purpose of the database made the subject significantly clearer and outlined the outcomes that I now have to complete for the queries. If interested, the purposes have been outlined below, one for a customer, and one for a manager.

    Purpose Ex. Case 1.
    The Video Ezy customers have been looking for a rental based database…

    They want to quickly navigate through the rentals Video Ezy has available, according to specific criteria-matching interests. The customer interests include rental title, genre, reviews, actors, directors, budget, viewer guideline ratings, rental budget, rental box office, and rental run time. Furthermore including searches based upon interrelation to a series, the release date, the rental category, and the rental cost. Rental category includes blu-ray, DVD Video, and TV series, while also displaying whether or not the rental is coming soon, newly released, or been around for a long time.

    The customers have also been interested in viewing an up-to-date account status, which will determine whether they are still a member of Video Ezy and when membership expires. Membership is important to the customers for receiving a discount on all purchases.
    Purpose Ex. Case 2.
    The Video Ezy managers have been looking for a rental based database…

    They want to be able to view the supply chain. The supply chain includes the wholesale company, the distribution details and the current stock status. They also want this to be of relation to specific stores. Managing the stock is important to the managers, for ensuring adequate supply to the customers.

    The managers are also interested in keeping track of the transactions. They want each transaction to be tied to an employee, a store, a customer account, and the payment method. Then, the number of store attendances by a customer can be calculated and emails on sales sent accordingly. In addition this will allow the managers to monitor the success of individual employees according to specific stores. The success of employees will decide on a number of store-specific factors. The store factors include, the need to relocate, the success of advertisement, whether new employees are needed, and the popularity of certain rentals.

    Finally, the managers are keen to link the database to a new computerized receipt system which is calculated directly from the transactions.
    I have also updated the database (once again) with data (data entry is a real pain) and if you are interested in viewing this you can at the following link:
    https://drive.google.com/file/d/0B90...ew?usp=sharing

    If there are any other suggestions or comments then I'll be happy to hear them. Otherwise, that's case closed and your guidance has been much appreciated.

    Thanks for the help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-19-2015, 05:26 PM
  2. Replies: 5
    Last Post: 05-03-2014, 02:03 PM
  3. Replies: 4
    Last Post: 10-22-2012, 11:52 PM
  4. Replies: 1
    Last Post: 11-09-2011, 12:08 PM
  5. Relationship Dilemma? I think??
    By Palomino33 in forum Access
    Replies: 17
    Last Post: 10-06-2011, 08:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums