@Akalanka +1, great idea!

On 3 November 2016 at 16:32, Akalanka Pagoda Arachchi <[email protected]>
wrote:

> Hi Uvindra,
>
> We can further improve the suggested schema by having a separate table to
> define resources types.
>
> The table would contain,
>
>    - Resource_Type_Id
>    - Resource_Type_Name
>
> By adding this we are simply normalizing the above suggested table by
> removing the duplicate RESOURCE_TYPE varchar entries and replacing them
> with an Int foreign key which would give following benefits.
>
>    - Less storage and cpu consuming as instead of varchar, an Int will be
>    used for storing and comparisons.
>    - We will have a defined location to store and retrieve available
>    resource types.
>
> Thanks,
> Akalanka.
>
> Thanks,
> Akalanka.
>
> On Thu, Nov 3, 2016 at 4:01 PM, Uvindra Dias Jayasinha <[email protected]>
> wrote:
>
>> Hi All,
>>
>> Currently APIs have a few resources such as Swagger File, Optional WSDL
>> file, Related Documents file and an Optional Thumbnail image that needs to
>> be stored as blobs in the DB.
>>
>> Initially we thought of having separate tables to store these resources,
>> but what if we have a single generic resource table to store all these?
>>
>> We could have schema such as below for the generic resource table
>>
>>
>> ​Since we previously stored our resources in the registry, a similar
>> generic schema was used to store all such resources by the registry itself.
>> So anything that is not a text data type can be considered as a BLOB.
>>
>> The advantages of doing this are,
>>
>> 1. Can manage all API related resources from a central table without
>> having to define custom tables for each resource.
>>
>> 2. When an API is deleted its very easy to locate and remove all the
>> resources related with it
>>
>> 3. When a new version of an API is created its very easy to copy over the
>> resources associated with the previous version to the new one.
>>
>> WDYT?
>> ​
>>
>> --
>> Regards,
>> Uvindra
>>
>> Mobile: 777733962
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Darshana Akalanka Pagoda Arachchi,*
> *Senior Software Engineer, WSO2*
> *+94777118016 <%2B94777118016>*
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Regards,
Uvindra

Mobile: 777733962
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to