Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2014

    Unanswered: many to many relashionship

    Hi all
    can i add records to any of this tables at the same time

    Attached Thumbnails Attached Thumbnails 1.png  
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 14

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    in short no you can't*
    Im guessing your many to many relationship is actually implemented as an intersection table. A realtions db that has relationships defined requires that the 'parent' table has the 'child' values stored first. so you need to find a way of doing that.In years gone by this sort of thing was called 'masterfile' data ie the stuff that had to exist before you could record most other data.

    so you need to definme customer and case before you can start definign data about customer cases.

    incidentally I assuming that case number is almost certainly unique, if not then case number and case year must be unique meanign that you almost certainly do no need the IDCase column. use an autonumber key if there is no obvious so called 'natural' or several so called 'candidate' keys or if the natrual key is overly long/complex

    also be consistent in how you call your tables and columns. use either lowercase separated with underscores OR so called CamelCase
    my_column_name OR MyColumnName
    theres people who will also suggest you use an appropriate an approrpriate naming convention and STICK with it

    all lower case with underscore tends to be preferred as its less of a problem switching between different db engines and or operating systems

    columns like ch_age aren't really a clever way of storing data, you'd be better off using date of birth. why, well as soon as you have captured the data its lost its real meaning. the person may have a birthday the following day and the age will change.

    *well truth to be told you can but Id suggest way above your current pay grade and needlessly complex especially for what you seem to be doing. you could generate missing data inside a trigger, but it would be a foolish develope that allows users to create new 'masterfile' data, especially if it involves persons or names because the user is to feckless to set up and manage their data correctly
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Feb 2014
    many thanks healdem ..... you really help me so much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts