Results 11 to 20 of 76
Thread: SQL layout
-
07-22-2010, 01:11 AM #11in 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
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.
-
07-22-2010, 02:12 AM #12
- 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.
-
07-22-2010, 02:19 AM #13
- 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.
-
07-22-2010, 07:51 AM #14
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)
-
07-22-2010, 08:20 AM #15
- Join Date
- Oct 2001
- Location
- Woerden, Netherlands
- Posts
- 10,373
- Downloads
- 48
- Uploads
- 1
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.
-
07-22-2010, 01:46 PM #16
-
07-22-2010, 01:49 PM #17
-
07-23-2010, 04:49 AM #18
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 !
-
07-23-2010, 05:17 AM #19
-
07-23-2010, 06:34 AM #20
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks