Page 2 of 8 FirstFirst 123456 ... LastLast
Results 11 to 20 of 76

Thread: SQL layout

  1. #11
    Senior Member Dyark's Avatar
    Join Date
    Jun 2007
    Location
    montreal, canada
    Posts
    163
    Downloads
    99
    Uploads
    2
    in the sql files for example we have for regents/rulers

    Class1
    CLvl1
    Class2
    CLvl2
    Class3
    CLvl3


    why not simply create a pivot table called regent_classes as a "bridge" between regent and classes?

    it would look like:

    regent_classes_regentid
    regent_classes_classid
    regent_classes_classlevel
    Looking at what you say, it would be better that I change the database right now, then waiting to change it at the end !

    Also I am a home made programmer (no studies) so there are this I do not think about when I program or elaborate things, help is always welcome.

    I am not a huge fan of really long columns names, but if you think it is neceessary i wil change them.

  2. #12
    Moo! Are you happy now? Arjan's Avatar
    Join Date
    Oct 2001
    Location
    Woerden, Netherlands
    Posts
    10,373
    Downloads
    48
    Uploads
    1
    well i am a homemade programmer myself as well, but learned a lot during the years.. even a few days ago a friend told me about fereignkey relations between tables.. something i never had to use before.. but for a tool or the flash game i am working on it is going to be very needed to prevent data from becoming corrupted.

    i dont really like the long names either, but i do it because i am not such a good database manager.
    if you want to make a sql statement joining many tables it can get very confusing because many of the tables have: ID, Name, Description. so therefor i like the names containing the table name.. is just a way for me to make things clear and to debug through a statement to see where things go wrong.
    Te audire non possum. Musa sapientum fixa est in aure.

  3. #13
    Moo! Are you happy now? Arjan's Avatar
    Join Date
    Oct 2001
    Location
    Woerden, Netherlands
    Posts
    10,373
    Downloads
    48
    Uploads
    1
    but we can come up with a naming convention that suits us all.

    for example we can say:
    ID fields have the table name: regent_id (while i call the table regents, plural, i like the id field to be singular.. a row contains a regent)

    the other common columns i would like to see an identifier as well.
    ie
    Name -> regent_name , domain_name, province_name etc
    Description -> regent_description, domain_description, province_description etc

    i have to look over the DB to see if there are more, dont recall right now

    for the other unique column name i dont really care what name is used.
    Te audire non possum. Musa sapientum fixa est in aure.

  4. #14
    Senior Member Dyark's Avatar
    Join Date
    Jun 2007
    Location
    montreal, canada
    Posts
    163
    Downloads
    99
    Uploads
    2
    what do you use for the reference of the other table ?

    me, personal like, is _ref so in the domain table the regent column would be regent_ref

    I am also building a flash application (for me it is the easiest way) but the build has to be made by php first (all the actions are call via URLRequest statment)

  5. #15
    Moo! Are you happy now? Arjan's Avatar
    Join Date
    Oct 2001
    Location
    Woerden, Netherlands
    Posts
    10,373
    Downloads
    48
    Uploads
    1
    Quote Originally Posted by Dyark View Post
    what do you use for the reference of the other table ?

    me, personal like, is _ref so in the domain table the regent column would be regent_ref

    I am also building a flash application (for me it is the easiest way) but the build has to be made by php first (all the actions are call via URLRequest statment)
    i just use regentid
    so currently i have
    realm_regentid
    prov_regentid
    domain_regentid
    holding_regentid
    and so on...

    but i am thinking of just going back to plain "regentid" for all tables.

    hmm flash, curl...ill take that topic to a new thread.. curious about a few things...
    Te audire non possum. Musa sapientum fixa est in aure.

  6. #16
    Senior Member Dyark's Avatar
    Join Date
    Jun 2007
    Location
    montreal, canada
    Posts
    163
    Downloads
    99
    Uploads
    2
    Quote Originally Posted by Arjan View Post

    hmm flash, curl...ill take that topic to a new thread.. curious about a few things...

    send me a link (I hate looking for it )

  7. #17
    Site Moderator Sorontar's Avatar
    Join Date
    Jul 2002
    Location
    Melbourne, Australia
    Posts
    4,248
    Downloads
    88
    Uploads
    8
    Quote Originally Posted by Dyark View Post
    send me a link (I hate looking for it )
    http://www.birthright.net/forums/fla...15.html?t=5315

  8. #18
    Senior Member Dyark's Avatar
    Join Date
    Jun 2007
    Location
    montreal, canada
    Posts
    163
    Downloads
    99
    Uploads
    2
    i have started to correct the old birdmail database, there is a lot to do, but i take off all the old non essentiel column and correct things like the mutiple class !

  9. #19
    Senior Member Dyark's Avatar
    Join Date
    Jun 2007
    Location
    montreal, canada
    Posts
    163
    Downloads
    99
    Uploads
    2
    Arjan I got a question.

    if you want to have name of the column with the name of the table, this could be really long to program (long character to type).

    Is this what you really want before I proceed ? Do you prefer to have alias on your request ?

    let me know

  10. #20
    Moo! Are you happy now? Arjan's Avatar
    Join Date
    Oct 2001
    Location
    Woerden, Netherlands
    Posts
    10,373
    Downloads
    48
    Uploads
    1
    Quote Originally Posted by Dyark View Post
    i have started to correct the old birdmail database, there is a lot to do, but i take off all the old non essentiel column and correct things like the mutiple class !
    oh yes... thats what i was talking about

    Quote Originally Posted by Dyark View Post
    Arjan I got a question.

    if you want to have name of the column with the name of the table, this could be really long to program (long character to type).

    Is this what you really want before I proceed ? Do you prefer to have alias on your request ?

    let me know
    i already fixed some tables, i will post my sql file in a second
    Te audire non possum. Musa sapientum fixa est in aure.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
BIRTHRIGHT, DUNGEONS & DRAGONS, D&D, the BIRTHRIGHT logo, and the D&D logo are trademarks owned by Wizards of the Coast, Inc., a subsidiary of Hasbro, Inc., and are used by permission. ©2002-2010 Wizards of the Coast, Inc.