Is it possible to name database tables like Java types?
I want to tables of RDBMS like the names of Java types. Example:
mytld.mycompany.myproject.mypackage.mysubpackage.MyClass
Currently I am trying to do this with PostgreSQL. It gives me this error:
FEHLER: falscher qualifizierter Name (zu viele Namensteile): mytld.mycompany.myproject.mypackage.mysubpackage.MyClass
In English this means something like:
ERROR: wrong qualified name (to much name parts): mytld.mycompany.myproject.mypackage.mysubpackage.MyClass
- Wasn'开发者_开发知识库t there something like database objects which could be referenced with punctuation names?
- I also may be able to substitute the "." by another character. Is there any robust algorithm to do this?
- Is there a way to use the exact Java class names as database tables?
You'd have to have it in quotes with a limit of 63 characters
"mytld.mycompany.myproject.mypackage.mysubpackage.MyClass"
Personally, I wouldn't do this. Your database is not the java code.
精彩评论