Personally, the most important thing from my pov is to have a correct case consistency.
Either you spell all your SQL KEYWORDS IN CAPITALS and your business_vocabulary with lower_case, or the opposite, but avoid mixing both : it just makes everything less readable.
Then, of course, it's good to adopt some conventions, but I guess they are often subjective choices, and the relevancy of such choices depends on the database's purpose. Good conventions won't be really necessary for a 10 tables DB :)
Among the examples of conventions I personally use, I prefix views with v_, prefix all my PK names with id_, and my FK with fk_... also, my PK is always my first column (I now avoid multiple columns PK), and all my FK are placed after it (no FK at end of table).
Keep in mind that these examples are my personal choices
发布评论
评论(3)
请参阅链接。Oracle9i 文档
一些其他链接命名约定
http://www.gplivna.eu/papers/naming_conventions.htm
http://www.dba-oracle.com/standards_schema_object_names.htm
http://ss64.com/ora/syntax-naming.html
see the link.Oracle9i documentation
Some other links for naming conventions
http://www.gplivna.eu/papers/naming_conventions.htm
http://www.dba-oracle.com/standards_schema_object_names.htm
http://ss64.com/ora/syntax-naming.html
您正在寻找诸如表命名之类的东西吗?
http://ss64.com/ora/syntax-naming.html
you are looking for something like table naming?
http://ss64.com/ora/syntax-naming.html
寻找相同的内容,我发现这个Oracle的数据库对象命名约定...这在我看来并没有真正的帮助:
https://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T458266.htm#4164876
谷歌会给你很多其他的。以下是一些示例:
http://www.toadworld.com/platforms/oracle/w/wiki/4844.variables-best-practices-naming-conventions#assessment-clear-variable-naming-conventions
< a href="https://oracle-base.com/articles/misc/naming-conventions" rel="nofollow">https://oracle-base.com/articles/misc/naming-conventions
http://ss64.com/ora/syntax-naming.html
就我个人而言,从我的观点来看,最重要的事情是保持正确的大小写一致性。
要么将所有
SQL KEYWORDS IN CAPITALS
和business_vocabulary
拼写为lower_case
,或者相反,但避免混合两者:它只是使一切变得不那么可读。当然,采用一些约定是好的,但我想它们通常是主观选择,并且这种选择的相关性取决于数据库的目的。对于 10 个表的数据库来说,好的约定并不是真正必要的:)
在我个人使用的约定示例中,我为视图添加了
v_
前缀,为所有 PK 名称添加了id_
前缀>,以及我的 FK 与fk_
...另外,我的 PK 始终是我的第一列(我现在避免多列 PK),并且我所有的 FK 都放在它后面(表末尾没有 FK )。请记住,这些示例是我的个人选择
Looking for the same, I found this Oracle's naming convention for DB objects... which imo doesn't really help :
https://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T458266.htm#4164876
Google will give you many other other. Here are a few examples :
http://www.toadworld.com/platforms/oracle/w/wiki/4844.variables-best-practices-naming-conventions#establish-clear-variable-naming-conventions
https://oracle-base.com/articles/misc/naming-conventions
http://ss64.com/ora/syntax-naming.html
Personally, the most important thing from my pov is to have a correct case consistency.
Either you spell all your
SQL KEYWORDS IN CAPITALS
and yourbusiness_vocabulary
withlower_case
, or the opposite, but avoid mixing both : it just makes everything less readable.Then, of course, it's good to adopt some conventions, but I guess they are often subjective choices, and the relevancy of such choices depends on the database's purpose. Good conventions won't be really necessary for a 10 tables DB :)
Among the examples of conventions I personally use, I prefix views with
v_
, prefix all my PK names withid_
, and my FK withfk_
... also, my PK is always my first column (I now avoid multiple columns PK), and all my FK are placed after it (no FK at end of table).Keep in mind that these examples are my personal choices