|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Creating a DOMAIN
Hello people,
I am trying to compare Firebird and PostgreSQL dialects as a part of my research project. PostgreSQL provides Geometric data types such as POINT(X,Y). And it is not available in case of Firebird. I am trying to create geometric data types in Firebird as well using DOMAIN. I would be very thankful if somebody can guide me in creating the DOMAIN for a POINT(float x, float y). Thank you all. Sincerely, Adi. |
|
#2
|
||||
|
||||
|
I don't think a DOMAIN would work for that.
Firebird support array datatypes which should do the trick but I'm not shure if those are fully available from SQL. Anyway GIS support is more on functions like distance() and so on than datatypes, at least for a first rough support usable in web applications, why don't you give them a spin?
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#3
|
|||
|
|||
|
DOMAINs are sub-types of existing datatypes. This means that you can never create a complex type as a POINT(x, y).
What you could do, is create a domain POINT that is a "varchar" according to a specific format, by using a CHECK constraint on the domain. You would then have to create an external function that checks the format. Example: CHECK (1 = my_point_check(VALUE)) Do note, that you cannot use any arithmetic on the values, cause it's a string value. Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com |
|
#4
|
|||
|
|||
|
Noted.
Thank you very much guys... really appreciate it...
Sincerely, Adi. |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Creating a DOMAIN |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|