Results 1 to 5 of 5

Thread: What is the relation between view and Sequence

  1. #1
    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,

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    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.

  3. #3
    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

  4. #4
    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.

  5. #5
    Join Date
    Jan 2008
    Posts
    1,521

    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.

Similar Threads

  1. Replies: 4
    Last Post: 15-10-2011, 11:13 PM
  2. Replies: 6
    Last Post: 24-09-2011, 01:32 AM
  3. Explorer vs. Firefox in relation to windows sizing
    By Dhatri in forum Technology & Internet
    Replies: 6
    Last Post: 16-09-2011, 06:16 PM
  4. access - one to many relation
    By AbAhAcHi- in forum Windows Software
    Replies: 1
    Last Post: 17-05-2011, 01:30 AM
  5. How to switch from Form view to Design View?
    By AlienKing in forum Software Development
    Replies: 3
    Last Post: 24-09-2009, 12:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,705,103.11804 seconds with 17 queries