> On Sept. 27, 2014, 3:23 a.m., Gwen Shapira wrote:
> > Code is fine, but I have an issue with the design: serializing two booleans
> > to a string in order to store them in an RDBMS is not very relational, and
> > requires extra serialization/de-serialization that doesn't make much sense.
> >
> > Alternative designs:
> > 1. Two boolean columns (or int, if Derby doesn't do boolean) is_from and
> > is_to
> > 2. Extra table supported_directions with {from, to, both, none} and ids,
> > supported_direction column will contain ID for that table. I'm partial to
> > this one.
> > 3. If we think that we may need additional directions, than a directions
> > table and many2many relationship to connectors will be the right thing, but
> > this looks like an overkill.
> >
> > Its possible that I'm overthinking things here :)
>
> Abraham Elmahrek wrote:
> I had actually started off using an integer column, but realized that
> this wasn't very readable. Also, unless bitmap indices would be used, I can't
> imagine it being faster. Also, in terms of performance, I don't think we
> really have to worry about it since the speed should be negligable at the
> number of connectors that sqoop will have at any point in time. I can't
> imagine thousands of connectors... or hundreds even. Creating a table and
> normalizing things is a possibility... but again... maybe overkill given the
> size of that table.
>
> If you still feel strongly about it, I'm certainly open to creating a M2M
> relationship with another table!
>
> Gwen Shapira wrote:
> Normalized schemas are not supposed to be readable, they are supposed to
> be easy to query. SQL is pretty terrible at string processing, so I'm worried
> about fields that require that.
>
> I agree that M2M is an overkill and also not a good fit for our design
> (just two directions per job).
>
> Abraham Elmahrek wrote:
> Another thing to consider is if we'll be using Direction in more than one
> table. If so, it might make sense. At least with a normalized design, there
> will be a reference point (versus a bitmap).
>
> Abraham Elmahrek wrote:
> It looks like we currently use Direction SQ_FORM as well... so yes, let's
> use M2M table.
>
> Abraham Elmahrek wrote:
> Err maybe not M2M, but a table that has FROM,TO,FROM/TO, etc.
I would also prefer to normalize the direction rather then having a string
column in the db that we will be responsible for - This way the db engine will
ensure that we are not putting there wrong values (incorrect code, ...).
- Jarek
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26097/#review54763
-----------------------------------------------------------
On Oct. 1, 2014, 9:25 p.m., Abraham Elmahrek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26097/
> -----------------------------------------------------------
>
> (Updated Oct. 1, 2014, 9:25 p.m.)
>
>
> Review request for Sqoop.
>
>
> Bugs: SQOOP-1545
> https://issues.apache.org/jira/browse/SQOOP-1545
>
>
> Repository: sqoop-SQOOP-1367
>
>
> Description
> -------
>
> commit 5cc9f9cd87ef44ff66cc53ad3f0ca38e3ef3d21d
> Author: Abraham Elmahrek <[email protected]>
> Date: Wed Sep 24 23:20:48 2014 -0700
>
> SQOOP-1545: Sqoop2: From/To: Add supported directions to Repository
>
> :100644 100644 25ba276... 315b60f... M
> common/src/main/java/org/apache/sqoop/common/SupportedDirections.java
> :100644 100644 4fbaf82... 4f0cdd6... M
> common/src/test/java/org/apache/sqoop/common/TestSupportedDirections.java
> :100644 100644 5dd7970... de64aa4... M
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
> :100644 100644 58eed2d... 971ef90... M
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
> :100644 100644 ad42901... 08b1afc... M
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
> :100644 100644 998f5b7... 6aa28c7... M
> repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
> :100644 100644 8a5823d... 9ad429d... M
> repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java
> :100644 100644 2ba75b4... 7310a1f... M
> shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java
>
>
> Diffs
> -----
>
> common/src/main/java/org/apache/sqoop/common/SupportedDirections.java
> 25ba276
> common/src/test/java/org/apache/sqoop/common/TestSupportedDirections.java
> 4fbaf82
>
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
> 5dd7970
>
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
> 58eed2d
>
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
> ad42901
>
> repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
> 4b95687
>
> repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java
> 15306c2
> shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java
> 2ba75b4
>
> Diff: https://reviews.apache.org/r/26097/diff/
>
>
> Testing
> -------
>
> mvn test
>
>
> Thanks,
>
> Abraham Elmahrek
>
>