What is meant by vector field?explain with an example

Showing Answers 1 - 4 of 4 Answers

murali

  • Aug 30th, 2006
 

A vector is a sequence of the same type of elements. The element type may be any type including a vector or record type.

 It is a  field which tell us how many times a particular field is repeated .for example

Take this input

Cust_id    purchase_amount  purchase date

101          1000                     29.08.06

101           500                      30.08.06

102           1050                     31.08.06

103          1140                     1.0906

103          1000                      02.0906

103           500                       30.09.06

 

Cust_id  total_purchase_amount     no_purchase purchase_date(1)  purchase_date(2

 

101          1500                                 2                 29.08.06                 30.08.06

102           1050                                1                  31.08.06            

103           2640                                3                  1.09.06                 02.09.06  so on

 

 

Here no_purchase is the vector field which rep the no of times a cust hase done purchases.

 

  Was this answer useful?  Yes

muralidharreddy.v

  • Feb 7th, 2007
 

Hi Vector is nothing but Array's in C. for example Transactions[0] Transactions[1] Transactions[2]Customer ID n dt Amount dt Amount dt AmountC002142 2 1994.03.23 52.20 1994.06.22 22.25 C003213 3 1993.02.12 47.95 1994.11.05 221.24 1995.12.11 17.42C004221 1 1994.08.15 25.25 C008231 2 1993.10.22 122.00 1995.12.10 52.10This is vector concepts. When you call customer Id with C002142 then we will get all the Transactions of his data trhough array.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions