in Search
     
Latest post 11-29-2006 2:47 PM by keithrull. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-28-2006 2:29 AM

    • KoNSeNTo
    • Top 50 Contributor
    • Joined on 04-07-2006
    • Posts 26
    • Points 520

    Image Gallery

    Wow long time no post...

    Anyway, yung sa mga nakakaalala noon, I got the hang of MySQL and na-implement ko na yun for the blog entries. Ang balak ko naman gamitan ng database naman eh yung image galleries. Pano po ba ang pinakabasic na database structure for image galleries?

    Expected Cardinalities:

    1. An album may contain one or more pictures.
    2. A picture may only belong to only one album.

    Thanks in advance for any help ^__^

    devpinoy sig
    • Post Points: 20
  • 11-29-2006 2:47 PM In reply to

    • keithrull
    • Top 10 Contributor
    • Joined on 08-08-2005
    • San Diego, CA
    • Posts 1,956
    • Points 39,255

    Re: Image Gallery

    Try this:

    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
    Album
    ---------------------------
    AlbumId         int
    Name            varchar
    Description     varchar
    DateCreated     date



    Photos
    ---------------------------
    PhotoId          int
    AlbumId          int
    Name             varchar
    Url              varchar
    Description      varchar
    DateCreated      date


    Comments
    ---------------------------
    CommentId       int
    PhotoId         int
    Name            varchar
    Email           varchar
    Url             varchar
    Message         varchar
    DateCreated     date



    AlbumId    Name          Description                     Date
    1          First Album   xxxxxxxxxxxxxxxxxxxxxxxxxxxx    11/29/2006
    2          Second Album  xxxxxxxxxxxxxxxxxxxxxxxxx      11/29/2006
    3          Third Album   xxxxxxxxxxxxxxxxxxxxxxxxx   11/29/2006



    PhotoId    AlbumId    Name            Url                        Description                  DateCreated
    1          1          Name1       ~/images/name1.gif       xxxxxxxxxxxxxxxxxxxxxxxx     11/29/2006
    2          1          Name2       ~/images/name2.gif     xxxxxxxxxxxxxxxxxxxxxxxxxxx  11/29/2006
    3          2          Name3       ~/images/name3.gif     xxxxxxxxxxxxxxxxxxxxx        11/29/2006
    4          2          Name4       ~/images/name4.gif         xxxxxxxxxxxxxxxxxxxxxxxx     11/29/2006
    5          2          Name5       ~/images/name5.gif        xxxxxxxxxxxxxxxxxxxxxxxxxxx  11/29/2006
    6          3          Name6       ~/images/name6.gif     xxxxxxxxxxxxxxxxxxxxxxxxx    11/29/2006



    Commentid  PhotoId    Name          Email         Url                       Message                       DateCreated
    1          1          Name1         e@mail.com    http://www.devpinoy.org   xxxxxxxxxxxxxxxxxxxxxxxx      11/29/2006
    2          1          Name2xxxx     e@mail.com    http://www.devpinoy.org   xxxxxxxxxxxxxxxxxxxxxxxxxx    11/29/2006
    3          2          Name3asddf    
    e@mail.com    http://www.keithrull.com  xxxxxxxxxxxxxxxxxxxxx         11/29/2006
    4          3          Name4         e@mail.com    http://www.keithrull.com  xxxxxxxxxxxxxxxxxxxxxxxx      11/29/2006
    5          4          Name55555     e@mail.com    http://www.keithrull.com  xxxxxxxxxxxxxxxxxxxxxxxxxxx   11/29/2006
    6          5          Name6xsfss    e@mail.com    http://www.keithrull.com  xxxxxxxxxxxxxxxxxxxxxxxxx     1/29/2006

    devpinoy sig

    • Post Points: 5
Page 1 of 1 (2 items)