DB field name definition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

DB field name definition

Ravikumar N B
Hi all,

Any one have idea on field name definition rule in entitymodel.xml???

Because i have field name like address_1, address_2, address_3.

How to define those fields in entitymodel.xml???

Please help me.

Thanks in advance
Ravi
Reply | Threaded
Open this post in threaded view
|

Re: DB field name definition

Rishi Solanki
Hi Ravi,
Here are some rules or say patterns which are common for defining any
entity.
    - Entity name must be in UpperCamelCase.

    - If entity name is abbreviation like Unit Od Measure (UOM) then treat
it as one word and name is like Uom.

    - The Field name must be in lowerCamelCase and name should be self
descriptive enough to show the purpose of the field.

    - If relation tag specify the relationship between two entities then the
fk-name should contains the words
      from both entities separated by ("_") underscore.

    - If a entity relation with another entity defines more than one time
then it should be differentiated by
      title attribute while defining a relation like "Form" or "To".

    - In the same if both field in the <key-map> tag are same then no need
to specify rel-field-name.

    - In case of view entities the name will consists of name of all its
member entities.

    - The <view-link> should be define for the proper view in the webtools.
Apart from the above you can also refer to entitymodel.xsd for understanding
the tags. And you can find several examples as given by Parimal is
PostalAddress matches your requirement.
Posted all the basic scenarios for defining the entity may I missed any,
Hope the above notes helps you.

--
Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.

On Wed, May 27, 2009 at 1:59 PM, Ravi Kumar <[hidden email]> wrote:

> Hi all,
>
> Any one have idea on field name definition rule in entitymodel.xml???
>
> Because i have field name like address_1, address_2, address_3.
>
> How to define those fields in entitymodel.xml???
>
> Please help me.
>
> Thanks in advance
> Ravi
>
Reply | Threaded
Open this post in threaded view
|

Re: DB field name definition

Jacques Le Roux
Administrator
Thanks Rishi,

I don't know if there is already a such description in wiki, if not we may add it in Contributor Best Practices...

Jacques

From: "Rishi Solanki" <[hidden email]>

> Hi Ravi,
> Here are some rules or say patterns which are common for defining any
> entity.
>    - Entity name must be in UpperCamelCase.
>
>    - If entity name is abbreviation like Unit Od Measure (UOM) then treat
> it as one word and name is like Uom.
>
>    - The Field name must be in lowerCamelCase and name should be self
> descriptive enough to show the purpose of the field.
>
>    - If relation tag specify the relationship between two entities then the
> fk-name should contains the words
>      from both entities separated by ("_") underscore.
>
>    - If a entity relation with another entity defines more than one time
> then it should be differentiated by
>      title attribute while defining a relation like "Form" or "To".
>
>    - In the same if both field in the <key-map> tag are same then no need
> to specify rel-field-name.
>
>    - In case of view entities the name will consists of name of all its
> member entities.
>
>    - The <view-link> should be define for the proper view in the webtools.
> Apart from the above you can also refer to entitymodel.xsd for understanding
> the tags. And you can find several examples as given by Parimal is
> PostalAddress matches your requirement.
> Posted all the basic scenarios for defining the entity may I missed any,
> Hope the above notes helps you.
>
> --
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
> On Wed, May 27, 2009 at 1:59 PM, Ravi Kumar <[hidden email]> wrote:
>
>> Hi all,
>>
>> Any one have idea on field name definition rule in entitymodel.xml???
>>
>> Because i have field name like address_1, address_2, address_3.
>>
>> How to define those fields in entitymodel.xml???
>>
>> Please help me.
>>
>> Thanks in advance
>> Ravi
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: DB field name definition

Ravikumar N B
In reply to this post by Rishi Solanki
Thanks Rishi :)

On Fri, May 29, 2009 at 2:07 PM, Rishi Solanki <[hidden email]>wrote:

> Hi Ravi,
> Here are some rules or say patterns which are common for defining any
> entity.
>    - Entity name must be in UpperCamelCase.
>
>    - If entity name is abbreviation like Unit Od Measure (UOM) then treat
> it as one word and name is like Uom.
>
>    - The Field name must be in lowerCamelCase and name should be self
> descriptive enough to show the purpose of the field.
>
>    - If relation tag specify the relationship between two entities then the
> fk-name should contains the words
>      from both entities separated by ("_") underscore.
>
>    - If a entity relation with another entity defines more than one time
> then it should be differentiated by
>      title attribute while defining a relation like "Form" or "To".
>
>    - In the same if both field in the <key-map> tag are same then no need
> to specify rel-field-name.
>
>    - In case of view entities the name will consists of name of all its
> member entities.
>
>    - The <view-link> should be define for the proper view in the webtools.
> Apart from the above you can also refer to entitymodel.xsd for
> understanding
> the tags. And you can find several examples as given by Parimal is
> PostalAddress matches your requirement.
> Posted all the basic scenarios for defining the entity may I missed any,
> Hope the above notes helps you.
>
> --
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
> On Wed, May 27, 2009 at 1:59 PM, Ravi Kumar <[hidden email]> wrote:
>
> > Hi all,
> >
> > Any one have idea on field name definition rule in entitymodel.xml???
> >
> > Because i have field name like address_1, address_2, address_3.
> >
> > How to define those fields in entitymodel.xml???
> >
> > Please help me.
> >
> > Thanks in advance
> > Ravi
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: DB field name definition

Ashish Vijaywargiya
In reply to this post by Jacques Le Roux
+1 on Jacques comment.
And thanks a lot Rishi for such a nice explaination.

--
Ashish

On Fri, May 29, 2009 at 6:48 PM, Jacques Le Roux <
[hidden email]> wrote:

> Thanks Rishi,
>
> I don't know if there is already a such description in wiki, if not we may
> add it in Contributor Best Practices...
>
> Jacques
>
> From: "Rishi Solanki" <[hidden email]>
>
>  Hi Ravi,
>> Here are some rules or say patterns which are common for defining any
>> entity.
>>   - Entity name must be in UpperCamelCase.
>>
>>   - If entity name is abbreviation like Unit Od Measure (UOM) then treat
>> it as one word and name is like Uom.
>>
>>   - The Field name must be in lowerCamelCase and name should be self
>> descriptive enough to show the purpose of the field.
>>
>>   - If relation tag specify the relationship between two entities then the
>> fk-name should contains the words
>>     from both entities separated by ("_") underscore.
>>
>>   - If a entity relation with another entity defines more than one time
>> then it should be differentiated by
>>     title attribute while defining a relation like "Form" or "To".
>>
>>   - In the same if both field in the <key-map> tag are same then no need
>> to specify rel-field-name.
>>
>>   - In case of view entities the name will consists of name of all its
>> member entities.
>>
>>   - The <view-link> should be define for the proper view in the webtools.
>> Apart from the above you can also refer to entitymodel.xsd for
>> understanding
>> the tags. And you can find several examples as given by Parimal is
>> PostalAddress matches your requirement.
>> Posted all the basic scenarios for defining the entity may I missed any,
>> Hope the above notes helps you.
>>
>> --
>> Rishi Solanki
>> Enterprise Software Developer
>> HotWax Media Pvt. Ltd.
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: DB field name definition

Jacques Le Roux
Administrator
Done http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-NamingEntities

Jacques

From: "Ashish Vijaywargiya" <[hidden email]>

> +1 on Jacques comment.
> And thanks a lot Rishi for such a nice explaination.
>
> --
> Ashish
>
> On Fri, May 29, 2009 at 6:48 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Thanks Rishi,
>>
>> I don't know if there is already a such description in wiki, if not we may
>> add it in Contributor Best Practices...
>>
>> Jacques
>>
>> From: "Rishi Solanki" <[hidden email]>
>>
>>  Hi Ravi,
>>> Here are some rules or say patterns which are common for defining any
>>> entity.
>>>   - Entity name must be in UpperCamelCase.
>>>
>>>   - If entity name is abbreviation like Unit Od Measure (UOM) then treat
>>> it as one word and name is like Uom.
>>>
>>>   - The Field name must be in lowerCamelCase and name should be self
>>> descriptive enough to show the purpose of the field.
>>>
>>>   - If relation tag specify the relationship between two entities then the
>>> fk-name should contains the words
>>>     from both entities separated by ("_") underscore.
>>>
>>>   - If a entity relation with another entity defines more than one time
>>> then it should be differentiated by
>>>     title attribute while defining a relation like "Form" or "To".
>>>
>>>   - In the same if both field in the <key-map> tag are same then no need
>>> to specify rel-field-name.
>>>
>>>   - In case of view entities the name will consists of name of all its
>>> member entities.
>>>
>>>   - The <view-link> should be define for the proper view in the webtools.
>>> Apart from the above you can also refer to entitymodel.xsd for
>>> understanding
>>> the tags. And you can find several examples as given by Parimal is
>>> PostalAddress matches your requirement.
>>> Posted all the basic scenarios for defining the entity may I missed any,
>>> Hope the above notes helps you.
>>>
>>> --
>>> Rishi Solanki
>>> Enterprise Software Developer
>>> HotWax Media Pvt. Ltd.
>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: DB field name definition

Rishi Solanki
Thank you Jacques,
I go thru it, and try to edit the docs but I think do not have the
permission to edit others documentations.

Here are some more points and changes to do ;
- Change the Unit Od Measure --> Unit Of Measure.
- Entity name should not be more then 30 letters.
- Field name should not be more then 128 letters.
- fk-name should not be more then 18 letters.

I got these information from Ashish Vijaywargiya, and think the above points
should be added.

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Tue, Aug 18, 2009 at 4:00 PM, Jacques Le Roux <
[hidden email]> wrote:

> Done
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-NamingEntities
>
> Jacques
>
> From: "Ashish Vijaywargiya" <[hidden email]>
>
>  +1 on Jacques comment.
>> And thanks a lot Rishi for such a nice explaination.
>>
>> --
>> Ashish
>>
>> On Fri, May 29, 2009 at 6:48 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>>  Thanks Rishi,
>>>
>>> I don't know if there is already a such description in wiki, if not we
>>> may
>>> add it in Contributor Best Practices...
>>>
>>> Jacques
>>>
>>> From: "Rishi Solanki" <[hidden email]>
>>>
>>>  Hi Ravi,
>>>
>>>> Here are some rules or say patterns which are common for defining any
>>>> entity.
>>>>  - Entity name must be in UpperCamelCase.
>>>>
>>>>  - If entity name is abbreviation like Unit Od Measure (UOM) then treat
>>>> it as one word and name is like Uom.
>>>>
>>>>  - The Field name must be in lowerCamelCase and name should be self
>>>> descriptive enough to show the purpose of the field.
>>>>
>>>>  - If relation tag specify the relationship between two entities then
>>>> the
>>>> fk-name should contains the words
>>>>    from both entities separated by ("_") underscore.
>>>>
>>>>  - If a entity relation with another entity defines more than one time
>>>> then it should be differentiated by
>>>>    title attribute while defining a relation like "Form" or "To".
>>>>
>>>>  - In the same if both field in the <key-map> tag are same then no need
>>>> to specify rel-field-name.
>>>>
>>>>  - In case of view entities the name will consists of name of all its
>>>> member entities.
>>>>
>>>>  - The <view-link> should be define for the proper view in the webtools.
>>>> Apart from the above you can also refer to entitymodel.xsd for
>>>> understanding
>>>> the tags. And you can find several examples as given by Parimal is
>>>> PostalAddress matches your requirement.
>>>> Posted all the basic scenarios for defining the entity may I missed any,
>>>> Hope the above notes helps you.
>>>>
>>>> --
>>>> Rishi Solanki
>>>> Enterprise Software Developer
>>>> HotWax Media Pvt. Ltd.
>>>>
>>>>
>>>>
>>
>