How Can implement many to many Relationship With oracle object

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misscrazyy
    New Member
    • Aug 2007
    • 2

    How Can implement many to many Relationship With oracle object

    pleaseee can anyone make many to many relationship between;

    CREATE TABLE COURSE(
    CNO NUMBER(4) NOT NULL,
    CNAME VARCHAR2(20),
    PRIMARY KEY(CNO)
    );

    CREATE TABLE TEACHERS(
    TCODE NUMBER(3) NOT NULL,
    TNAME VARCHAR2(12),
    TADRESS VARCHAR(10),
    DEPT VARCHAR2(4),
    PRIMARY KEY(TCODE)
    );

    how a new born child is coming here? from nowww thanks your help!
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    As you have posted a question in the articles setion it is being moved to Oracle Forum.

    MODERATOR.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      Could you be more specific on your requirement?

      Theoritically defining, MANY-TO-MANY relationship can be defined as the objects on either side are related to each other more than once.

      For Eg: Object Teacher can handle more than one subject, and a single subject can be handled by more than one teacher.

      But from the two tables that you have created cannot be joined because there is not column that can be used to join these two tables.

      Comment

      • misscrazyy
        New Member
        • Aug 2007
        • 2

        #4
        can you give me another example for many to many relationship?

        Comment

        • amitpatel66
          Recognized Expert Top Contributor
          • Mar 2007
          • 2358

          #5
          STUDENT - COURSE (A student can undergo any no of courses. A single course can be studied by more than one student)

          TEACHER - DEPARTMENT (A teacher can belong to Science as well as Maths Dept and many teachers can be a member of single dept)

          Comment

          • holdingbe
            New Member
            • Jul 2007
            • 78

            #6
            Originally posted by misscrazyy
            pleaseee can anyone make many to many relationship between;

            CREATE TABLE COURSE(
            CNO NUMBER(4) NOT NULL,
            CNAME VARCHAR2(20),
            PRIMARY KEY(CNO)
            );

            CREATE TABLE TEACHERS(
            TCODE NUMBER(3) NOT NULL,
            TNAME VARCHAR2(12),
            TADRESS VARCHAR(10),
            DEPT VARCHAR2(4),
            PRIMARY KEY(TCODE)
            );

            how a new born child is coming here? from nowww thanks your help!
            Hi
            what i think means.... One teacher takes several course..one course can handle by different teachers
            this is a many to many reletionship

            thanks
            michael

            Comment

            Working...