Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What is the relation between view and Sequence

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-02-2009
Member
 
Join Date: Aug 2008
Posts: 990
What is the relation between view and Sequence
  

Hi,

I want to know what is the relation between view and Sequence in database?

Regards,

Reply With Quote
  #2  
Old 13-02-2009
Member
 
Join Date: May 2008
Posts: 2,290
Re: What is the relation between view and Sequence

Both are not related at all. A sequence is a database object that you can use to generate new values in, well, sequence. A sequence is not tied to any table or view. You can use the values from a sequence for whatever you like.

A view is exactly what its name implies: a (different) view on the data in your database. A view can be created on tables or other views and it essentially encapsulates a query, including joins, subselects, olap functions, ... - whatever DB2 (or SQL in general) lets you do in a query.
Reply With Quote
  #3  
Old 13-02-2009
Member
 
Join Date: May 2008
Posts: 40
Re: What is the relation between view and Sequence

a sequence is a function whose domain is the set of positive integers
while a series is just a succession of separate numbers which is formed according to some rule or law

that means that a sequence must be a function (look at you're algebra 2 notes to define that one) and consists of a set of positive integer terms while a series doesn't have to be a function and is not confined as far as its input (not technically referred to as domain in this case because a series is not a function)

that is why one can equate the sum of a series because a series itself is not "a sum of numbers" but it is a good question math semantics always have their place in discussions/arguments
Reply With Quote
  #4  
Old 13-02-2009
Member
 
Join Date: May 2008
Posts: 27
Re: What is the relation between view and Sequence

The similarity is that both are sort of "virtual tables", i.e., not physically stored but their data is "generated" when they are interrogated.
Apart from that, not much similarity.

If by "relation" you mean: use one in the definition of the other:
it is *not* possible to define a view where one column contains all values ever generated by a sequence. If that's what you want, you have to "materialize" those values, i.e., create a table, not a view.
And if that's all the sequence would be used for, then an identity column would be the more appropriate thing to use.
Reply With Quote
  #5  
Old 13-02-2009
Member
 
Join Date: Jan 2008
Posts: 1,514
Re: What is the relation between view and Sequence

A view is a logical table based on a table or another view.
A view contain no data itself but it is like a window through which data from tables can be views and changed.
A sequence is a user created database object that can be
shared by multiple user to generate unique integers.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is the relation between view and Sequence"
Thread Thread Starter Forum Replies Last Post
Aveline's Dragon Age II: Mark of the Assassin quest in relation to DA lore SPOILERS Kamalaa Video Games 4 15-10-2011 11:13 PM
Transferring field info from 'Gantt Chart' view to 'Resource Usage' view MikeCrayon Microsoft Project 6 24-09-2011 01:32 AM
Explorer vs. Firefox in relation to windows sizing Dhatri Technology & Internet 6 16-09-2011 06:16 PM
access - one to many relation AbAhAcHi- Windows Software 1 17-05-2011 01:30 AM
How to switch from Form view to Design View? AlienKing Software Development 3 24-09-2009 12:29 PM


All times are GMT +5.5. The time now is 07:01 PM.