Hi Lukas, 
  thank you for your answer and for your sharing.

I agree about jOOQ not influence / impact the decision about naming.
Lukas, your naming convention deals with security in mind, right? I imagine 
that you have many users and you need always keep an eye on it.

In my application domain I usually have just one user and no real concern 
about security data access.
Please, correct me if I misunderstood your scenario.

I like and want to share my 2 experiencs with different name convention.

1) the first one is a guidance about fields naming.
The first two letters of the field name describe the field type:
DS means descriptions, (eg varchar). example: DSNAME
ID means primary key or foreign key (tipically integer). example: IDJOB, 
IDTICKET, IDGENDER 
NM means numeric or amount (double, float, numeric, decimal): NMDECIBEL, 
NMINVOICETOTAL
FL means flag (tipically boolean, integer 0/1, varchar(1) Y/N): FLACTIVE, 
FLDELETED
DT means date (datetime, timestapm): DTBIRTH, DTEND

2) the second naming I've used is more humang language natural. I used it 
with Linq and Ms Entity Framework. 
Like one you can find here:
http://www.symmetricds.org/doc/3.3/html-single/user-guide.html#data-model

Hope to hear other experience from you guys!

best regards
Simone


Il giorno mercoledì 6 marzo 2013 21:33:02 UTC+1, Lukas Eder ha scritto:
>
> Hi Simone,
>
> Good question. *I'm curious about best practices / ideas from other users 
> on this group. Feel free to share!*
>
> There isn't really anything "official" that I would suggest as a naming 
> standard with jOOQ. From my experience, jOOQ shouldn't influence / impact 
> your decisions in any way, as jOOQ can deal with any naming standards, 
> including case-sensitivity and special characters (although these might 
> cause 1-2 code generator bugs, if abused excessively).
>
> In the past, these rules have helped me organise tables and views, though:
>
> - Tables and views had prefixes indicating their "nature". These were 
> mainly:
>     - data tables
>     - master data tables
>     - system tables
>     - temporary tables
>     - views
> - Tables had no grants on them
> - Some views had grants on them
> - Views had suffixes indicating what kinds of grants and check options 
> they have. These were mainly:
>     - read-only views
>     - updatable views
>     - user views (read-only and writable)
>     - admin views (read-only and writable)
>     - backend views (read-only and writable)
>     - utility views (no grants)
> - User views implemented ACLs, which is why there were no grants on 
> tables: To avoid unauthorised data access at a SQL level
> - View columns used well-defined 4-letter acronym prefixes describing the 
> table they came from. This is crucial for many reasons:
>     - optimisation (e.g. making use of explicit predicate push-down hints 
> in Oracle)
>     - optimisation (e.g. calculated columns can be recognised easily, and 
> avoided in predicates)
>     - disambiguation (e.g. ABCD_ID vs. OPQR_ID. Collisions are impossible)
> - Table columns used the same 4-letter acronym prefixes for foreign keys 
> (e.g. XX.ABCD_ID references AAA_B_CCCC_D.ID)
> - Indexes and constraints reused the above 4-letter acronyms for improved 
> readability
>
> Of course, you may have entirely different requirements, where the above 
> rules are not suitable / applicable.
>
> Cheers
> Lukas
>
>
> 2013/3/6 Simone Giacomelli <[email protected] <javascript:>>
>
>> Hi,
>>   I'm going to use jooq for a project.
>>
>> Any advice regarding the naming of tables and fields in the database 
>> would be appreciated :)
>> Do you follow/suggest any naming standard with jooq? Or apart from jooq? 
>>
>> thanks for your help
>> Simone
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to