Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 16th, 2004, 03:57 PM
lronqui lronqui is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 4 lronqui User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Views and domains

Hello good people!

Here I am with another (probably) silly situation:

I know that when you create a column on a table without referencing an existing user created domain, one is automatically generated by the system (named like RDB$nnn) and used in that column - OK. I've created all domains i needed for my tables and went fine up to that point.

The problem is here now: when I created a view, I noticed that the columns referencing directly a table column inherit its domain, but the ones going through functions (UDF, CASE or whatever) get a system generated domain, and I can't use a Cast .. as some_user_domain.

I wanted to know if that behavior is by design or there is a way to make it inherit or accept a specific domain in this situation.

Thanks in advance, even if only for your patience reading this

Reply With Quote
  #2  
Old June 18th, 2004, 02:03 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
Hi,


I'd say that it doesn't really matter in a VIEW column inherits the DOMAIN datatype.

Anyway, a column that goes through a function (albeit an UDF or CASE or whatever) isn't the same as the domain anymore (a CASE can change a NUMERIC datatype to a VARCHAR, for instance). So it makes sense.

--

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
Upscene Productions
http://www.upscene.com
__________________
Martijn Tonies
Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
Upscene Productions
http://www.upscene.com

Reply With Quote
  #3  
Old June 18th, 2004, 06:42 AM
lronqui lronqui is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 4 lronqui User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your reply

My concern wasn't about changing the domain, but the creation of too many system domains (they weren't reused in any of my tests). I don't know if it is a problem or not but, in a database with, let's say, hundreds of views and stored procedures you will end up with a lot of system domains. Of course, this might be pretty usual in the Firebird world and my worries just nonsense of a begginer, wich i really am

Best regards

Reply With Quote
  #4  
Old June 18th, 2004, 08:11 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
>this might be pretty usual in the Firebird world

It is

I really wouldn't worry about those...

--

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
Upscene Productions
http://www.upscene.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Views and domains


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway