Purpose of relations in datasets?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bobby Edward

    Purpose of relations in datasets?

    I have a fully relational mysql database (pk, fk, etc)

    If I setup a xsd dataset with 2 related tables do I have to create the
    relation there too? What's the purpose? Is it just a 'reminder' or does it
    have an effect on whether the pk/fk constraints are enforced or not at the
    db level???

    Thanks


  • sloan

    #2
    Re: Purpose of relations in datasets?


    Here is an article:


    I would say that the GetChildRows based on the relationship (name) is kinda
    the useful method from my experience:


    So if you have Orders and OrderDetails, and you name the relationship
    "OrderToOrderDe tailsRelationsh ip"....you can use that name to pull the child
    records of course.

    This is kinda obvious observations, I'm just expressing what I've used in
    the past with that exact feature.

    If you write a self referencing relationship, you can use this to populate
    something like a TreeView.



    "Bobby Edward" <bobby@nobody.c omwrote in message
    news:Oij2Lj7OJH A.4372@TK2MSFTN GP04.phx.gbl...
    >I have a fully relational mysql database (pk, fk, etc)
    >
    If I setup a xsd dataset with 2 related tables do I have to create the
    relation there too? What's the purpose? Is it just a 'reminder' or does
    it have an effect on whether the pk/fk constraints are enforced or not at
    the db level???
    >
    Thanks
    >

    Comment

    • Alexey Smirnov

      #3
      Re: Purpose of relations in datasets?

      On Nov 1, 1:28 am, "Bobby Edward" <bo...@nobody.c omwrote:
      I have a fully relational mysql database (pk, fk, etc)
      >
      If I setup a xsd dataset with 2 related tables do I have to create the
      relation there too?  What's the purpose?  Is it just a 'reminder' or does it
      have an effect on whether the pk/fk constraints are enforced or not at the
      db level???
      >
      Thanks
      Could be useful with nested controls, for example when you have a
      Repeater with a nested GridView

      Comment

      • Alexey Smirnov

        #4
        Re: Purpose of relations in datasets?

        On Nov 1, 1:28 am, "Bobby Edward" <bo...@nobody.c omwrote:
        I have a fully relational mysql database (pk, fk, etc)
        >
        If I setup a xsd dataset with 2 related tables do I have to create the
        relation there too?  What's the purpose?  Is it just a 'reminder' or does it
        have an effect on whether the pk/fk constraints are enforced or not at the
        db level???
        >
        Thanks
        Could be useful with nested controls, for example when you have a
        Repeater with a nested GridView

        Comment

        • Alexey Smirnov

          #5
          Re: Purpose of relations in datasets?

          On Nov 1, 1:28 am, "Bobby Edward" <bo...@nobody.c omwrote:
          I have a fully relational mysql database (pk, fk, etc)
          >
          If I setup a xsd dataset with 2 related tables do I have to create the
          relation there too?  What's the purpose?  Is it just a 'reminder' or does it
          have an effect on whether the pk/fk constraints are enforced or not at the
          db level???
          >
          Thanks
          Could be useful with nested controls, for example when you have a
          Repeater with a nested GridView

          Comment

          • Alexey Smirnov

            #6
            Re: Purpose of relations in datasets?

            On Nov 1, 1:28 am, "Bobby Edward" <bo...@nobody.c omwrote:
            I have a fully relational mysql database (pk, fk, etc)
            >
            If I setup a xsd dataset with 2 related tables do I have to create the
            relation there too?  What's the purpose?  Is it just a 'reminder' or does it
            have an effect on whether the pk/fk constraints are enforced or not at the
            db level???
            >
            Thanks
            Could be useful with nested controls, for example when you have a
            Repeater with a nested GridView

            Comment

            • Alexey Smirnov

              #7
              Re: Purpose of relations in datasets?

              On Nov 1, 1:28 am, "Bobby Edward" <bo...@nobody.c omwrote:
              I have a fully relational mysql database (pk, fk, etc)
              >
              If I setup a xsd dataset with 2 related tables do I have to create the
              relation there too?  What's the purpose?  Is it just a 'reminder' or does it
              have an effect on whether the pk/fk constraints are enforced or not at the
              db level???
              >
              Thanks
              Could be useful with nested controls, for example when you have a
              Repeater with a nested GridView

              Comment

              Working...