Professional Web Applications Themes

Creating an array of integers inside mysql databases - MySQL

Hi , I am totally new to mysql....... so help me out........ here is my query........ i would like to create an array of integers inside the table under a single column . also i would like to know how to access the indexes within the array and update them....... ? ....

  1. #1

    Default Creating an array of integers inside mysql databases

    Hi ,
    I am totally new to mysql....... so help me out........ here is
    my query........ i would like to create an array of integers inside the
    table under a single column . also i would like to know how to access
    the indexes within the array and update them....... ? .

    crazzybugger Guest

  2. #2

    Default Re: Creating an array of integers inside mysql databases


    crazzybugger wrote: 

    v3.23,4.x: http://dev.mysql.com/doc/refman/4.1/en/
    v5.0: http://dev.mysql.com/doc/refman/5.0/en/

    toby Guest

  3. #3

    Default Re: Creating an array of integers inside mysql databases

    crazzybugger wrote: 

    Well, first of all I would recommend you read up on relational databases
    in general.

    RDB's don't have "arrays". They have rows and columns, and each
    row/column intersection contains a value.

    And indexes are internal to an RDB. You do not access them directly.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  4. #4

    Default Re: Creating an array of integers inside mysql databases

    On 17 Sep 2006 11:53:46 -0700, crazzybugger wrote: 

    What problem are you trying to solve?

    --
    80. If my weakest troops fail to eliminate a hero, I will send out my best
    troops instead of wasting time with progressively stronger ones as he
    gets closer and closer to my fortress.
    --Peter Anspach's list of things to do as an Evil Overlord
    Peter Guest

  5. #5

    Default Re: Creating an array of integers inside mysql databases


    Jerry Stuckle wrote: 
    >
    > Well, first of all I would recommend you read up on relational databases
    > in general.
    >
    > RDB's don't have "arrays". They have rows and columns, and each
    > row/column intersection contains a value.
    >
    > And indexes are internal to an RDB. You do not access them directly.
    >
    > --
    > ==================
    > Remove the "x" from my email address
    > Jerry Stuckle
    > JDS Computer Training Corp.
    > net
    > ==================[/ref]

    Actually i was referring to the java.sql.Array class( i am confused
    with what it does! ) .
    it has methods to manipulate the array of stuff.....
    here is what i am trying to do:
    ------------------------------------------
    I am trying to store an array of snapshots
    (time in milliseconds) for every person name stored in the data base .
    however if i am going to create a column for each and every snapshot
    would'nt it make the database very very huge ?
    here is the structure
    --------------------------------------------------------
    name | time1 | time2 | ........... timen |
    --------------------------------------------------------
    i thought i could store this in the form
    ---------------------------------
    name | time ( array ) |
    --------------------------------
    now i come to understand this is not possible........so suggest me how
    to implement it in a better manner!

    crazzybugger Guest

  6. #6

    Default Re: Creating an array of integers inside mysql databases

    crazzybugger wrote: 
    >>
    >>Well, first of all I would recommend you read up on relational databases
    >>in general.
    >>
    >>RDB's don't have "arrays". They have rows and columns, and each
    >>row/column intersection contains a value.
    >>
    >>And indexes are internal to an RDB. You do not access them directly.
    >>
    >>--
    >>==================
    >>Remove the "x" from my email address
    >>Jerry Stuckle
    >>JDS Computer Training Corp.
    >>net
    >>==================[/ref]
    >
    >
    > Actually i was referring to the java.sql.Array class( i am confused
    > with what it does! ) .
    > it has methods to manipulate the array of stuff.....
    > here is what i am trying to do:
    > ------------------------------------------
    > I am trying to store an array of snapshots
    > (time in milliseconds) for every person name stored in the data base .
    > however if i am going to create a column for each and every snapshot
    > would'nt it make the database very very huge ?
    > here is the structure
    > --------------------------------------------------------
    > name | time1 | time2 | ........... timen |
    > --------------------------------------------------------
    > i thought i could store this in the form
    > ---------------------------------
    > name | time ( array ) |
    > --------------------------------
    > now i come to understand this is not possible........so suggest me how
    > to implement it in a better manner!
    >[/ref]

    java.sql.Array is a java interface, not a SQL construct. It works with
    a SET datatype supported by some databases but not MySQL.

    You should study up on database normalization. This type of data can
    often be best handled with a second table containing two columns - a
    person id and the time.


    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  7. #7

    Default Re: Creating an array of integers inside mysql databases

    crazzybugger wrote:
     
    > >
    > > Well, first of all I would recommend you read up on relational databases
    > > in general.
    > >
    > > RDB's don't have "arrays". They have rows and columns, and each
    > > row/column intersection contains a value.
    > >
    > > And indexes are internal to an RDB. You do not access them directly.
    > >
    > > --
    > > ==================
    > > Remove the "x" from my email address
    > > Jerry Stuckle
    > > JDS Computer Training Corp.
    > > net
    > > ==================[/ref]
    >
    > Actually i was referring to the java.sql.Array class( i am confused
    > with what it does! ) .
    > it has methods to manipulate the array of stuff.....
    > here is what i am trying to do:
    > ------------------------------------------
    > I am trying to store an array of snapshots
    > (time in milliseconds) for every person name stored in the data base .
    > however if i am going to create a column for each and every snapshot
    > would'nt it make the database very very huge ?
    > here is the structure
    > --------------------------------------------------------
    > name | time1 | time2 | ........... timen |
    > --------------------------------------------------------
    > i thought i could store this in the form
    > ---------------------------------
    > name | time ( array ) |
    > --------------------------------
    > now i come to understand this is not possible........so suggest me how
    > to implement it in a better manner![/ref]

    Strip the times into a separate table, and store each time 'snapshot' as a different record.

    --

    Murdoc Guest

Similar Threads

  1. #39643 [NEW]: Integers selected from a MySQL-database are treated as strings
    By harmen_php_net at xtremesf dot nl in forum PHP Bugs
    Replies: 2
    Last Post: November 27th, 03:23 PM
  2. Replies: 0
    Last Post: November 27th, 02:57 PM
  3. MySQL Databases lost
    By Stephane M in forum MySQL
    Replies: 3
    Last Post: April 5th, 03:34 PM
  4. Any head-starts for creating databases?
    By RonSanSolo in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: June 26th, 02:06 PM
  5. Creating compressed databases
    By Rick Altman in forum FileMaker
    Replies: 0
    Last Post: July 18th, 11:31 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139