Dependency Normal Form Decomposition for an Entity

CAVEAT

Client must make sure that the following conditions are met when requesting Normal Form Decomposition for a single dependency using GET/POST request:

  • The ‘Normalise Flag’ must be set to true(1) for the single dependency supplied for them to be included in a normalisation.

Client must make sure that the following conditions are met when requesting Normal Form Decomposition for multiple dependencies using POST request:

  • The ‘Normalise Flag’ must be set to true(1) for the list of dependencies supplied for them to be included in a normalisation.
  • The ‘Lh Attrs’ (left hand attribute ids) must be unique(i.e. same) for each ‘Rh Attr’ (right hand attribute) given in ‘rhAttrs’ array
  • The ‘rhAttrs’ array of ‘Rh Attr’ (right hand attribute) that have common ‘Lh Attrs’ (left hand attributes)
/api/repositories/{repository}/entities/{entity}/dependencies/{dependencyKey}/normalformdecomposition/
Parameter Type Purpose
repository string the name of the Repository
entity int The ID of the entity to view
dependencyKey string The dependency key

Get

GET /api/repositories/(string: repository)/entities/(int: entityID)/dependencies/(string: dependencyKey)/normalformdecomposition/

Lists normalised rows for single dependency of the corresponding Entity

GET /api/repositories/test/entities/1/dependencies/5-2/normalformdecomposition/ HTTP/1.1
Accept: application/json
Response Code Reason
200 No error
500 Server error

The response will be a Standard Response, with a list of normalised rows in the corresponding Entity.

Columns

The columns array will contain the list of columns for each data row. It will contain column names on which the dependency is created. An example is shown in the below table.

Human Name Column Name Description
Line 02 Line_02  
Line 05 Line_05  

Data Row

The data row will contain the list of normalised rows of the corresponding Entity:

"rows": [
    {
        "dataRow": [
            "6 Berlington Circle",
            ""
        ]
    },
    {
        "dataRow": [
            "10 Ol East St",
            ""
        ]
    },
    {
        "dataRow": [
            "10 Old East Dr",
            ""
        ]
    }
]

If there are no normalised rows in the Entity, rows will be an empty string.

Post

POST /api/repositories/(string: repository)/entities/(int: entityID)/dependencies/

Lists normalised rows for multiple dependencies of the corresponding entity, also allows user to pass in supported options (Paging & Cache) see Standard Request for more information on these options.

POST /api/repositories/{repository}/entities/{entity}/dependencies/ HTTP/1.1
Content-Type: application/json

{
    "command": "normalformdecomposition",
    "options": {
        "pageStart": "1",
        "pageSize": "65"
    },
    "data": {
        "lhAttrs": "1 2 3 4",
        "rhAttrs": ["5", "6"]
    }
}
Response Code Reason
200 Success
400 Bad Request
500 Server error

The request packet must contain the command and data element. The options elements is optional.

The lhAttrs ids must be unique(i.e. same) for each ‘Rh Attr’ given in ‘rhAttrs’ array

The rhAttrs contain an array of ‘Rh Attr’ that must have common ‘Lh Attrs’

The response will be a Standard Response, with a list of any normalised rows in the corresponding Entity.

The columns array will contain the list of columns for each data row as listed in above columns.

The data row will contain the list of normalised rows of the corresponding Entity similar to ones listed in above data row

Dependency Normal Form Decomposition for an Attribute

/api/repositories/{repository}/entities/{entity}/attributes/{attribute}/dependencies/{dependencyKey}/normalformdecomposition/
Parameter Type Purpose
repository string the name of the Repository
entity int The ID of the entity to view
attribute int The ID of the attribute to view
dependencyKey string The dependency key

Get

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/dependencies/(string: dependencyKey)/normalformdecomposition/

Lists normalised rows for single dependency of the corresponding attribute

GET /api/repositories/alpha/entities/1/attributes/1/dependencies/5-1_2_3_4/normalformdecomposition/ HTTP/1.1
Accept: application/json
Response Code Reason
200 No error
500 Server error

The response will be a Standard Response, with a list of normalised rows in the corresponding Attributes.

Columns

The columns array will contain the list of columns for each data row. It will contain column names on which the dependency is created. An example is shown in the below table.

Human Name Column Name Description
Line 01 Line_01  
Line 02 Line_02  
Line 03 Line_03  
Line 04 Line_04  
Line 05 Line_05  

Data Row

The data row will contain the list of normalised rows for given dependency of the corresponding Attributes:

"rows": [
    {
        "dataRow": [
            "Larry Aiello M546384762",
            "Aiello & Daughters Electric Co",
            "25 Bartlett St",
            "Arlington MA 02476",
            ""
        ]
    }
]

If there are no normalised rows in the Attributes, rows will be an empty string.

Post

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/dependencies/

Lists normalised rows for multiple dependencies of the corresponding Attributes, also allows user to pass in supported options (Paging & Cache) see Standard Request for more information on these options.

POST /api/repositories/{repository}/entities/{entity}/attributes/{attribute}/dependencies/ HTTP/1.1
Content-Type: application/json

{
    "command": "normalformdecomposition",
    "options": {
        "pageStart": "1",
        "pageSize": "65"
    },
    "data": {
        "lhAttrs": "1 2 3 4",
        "rhAttrs": ["5", "6"]
    }
}
Response Code Reason
200 Success
400 Bad Request
500 Server error

The request packet must contain the command and data element. The options elements is optional.

The lhAttrs ids must be unique(i.e. same) for each ‘Rh Attr’ given in ‘rhAttrs’ array

The rhAttrs contain an array of ‘Rh Attr’ that must have common ‘Lh Attrs’

The response will be a Standard Response, with a list of any normalised rows in the corresponding Attributes.

The columns array will contain the list of columns for each data row as listed in above columns.

The data row will contain the list of normalised rows of the corresponding Attributes similar to ones listed in above data row