[Mystara Database] Maps

Home of Thorf's myriad Secret Projects.

Moderators: Havard, agathokles, Thorf

Post Reply
User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

[Mystara Database] Maps

Post by Thorf » Tue Jul 01, 2008 5:20 am

With the Maps section, I want to establish an archive of all official maps, and hopefully some of the fan-made creations too, with various details on each one, such as date of release, area covered (referencing the location tables), scale, cartographer, and so on.

It would also be very helpful if I could enter all the notes on each map into the database. At some point in the future, when we have a user interface, this would allow map pages with all the relevant data to be generated automatically.

The Maps section requires the following fields for each map (* means that field may require multiple entries for one map):
  • Map Name
  • Cartographer*
  • Source*
  • Publication Date
  • Format*
  • Type
  • Hex Scale
  • Area shown
  • Officialness
  • Notes
And here's my current design for all of this. It's quite complicated...

First, area shown will be done using a linkage table with the locations section, but since we haven't got that set in stone yet I will leave it alone for now.

mdb_map
id
map_name
mdb_map_type_id @
mdb_map_scale_id @
description/notes

mdb_map_type
id
map_type
description

mdb_map_hex_scale
id
map_hex_scale
description

A map is defined as a certain area (indicated by the name) shown at a certain scale, in a certain way (type). The other tables will define the different versions of these base maps.

mdb_map_instance
id
mdb_map_id @
mdb_officialness_id @
mdb_map_format_id @
publication_date (year and optionally month too)
url
description

mdb_officialness
id
officialness
description

mdb_map_format
id
map_format
description

Finally, these two tables define the authors and sources of a particular instance of a map.

mdb_map_author_linkage
id
mdb_map_instance_id @
mdb_author_id @

mdb_map_source_linkage
id
mdb_map_instance_id @
mdb_source_id @

Some examples of the types I'm defining in all these tables:

Map formats: Poster map, Inside cover map, Trifold cover map, In-book map; PNG file, JPEG file, GIF file, PDF file.
Map types: Geographical, Political, Contour, Town, etc.
Map hex scales: 2 miles per hex, 8 miles per hex, 24 miles per hex, ... ..., Non-hex.
Officialness: Official, Based entirely on official sources, Speculative based on official sources, Unofficial (not based on official sources).

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Notes on Maps

Post by Thorf » Tue Jul 15, 2008 8:55 am

This is a table to store notes on maps based on a source. The "Notes on Updated map" sections from the Geographical Mapping forum will be entered here, linked to the map they refer to.

mdb_map_note
id
mdb_map_id @
(mdb_map_id @ ???)
mdb_map_note_type @
note

mdb_map_note_type
id
note_type

The last two tables attach sources to notes, allowing multiple sources to be assigned to each note.

mdb_map_note_source
id
mdb_source_id @
source_page_reference

mdb_map_note_source_linkage
id
mdb_map_note_id @
mdb_map_note_source_id @

I wondered about linking notes to map instances, but decided against it on the grounds that it seems more useful to keep all the notes attached to the relevant overall map. On the other hand, it would obviously be possible to attach a note to both the overall map and a particular instance of it, which might be the best solution. Any thoughts?

Note Types: Addition, Deletion, Art Error, Continuity Error, Labelling Error, ...

Additions and Deletion are in comparison with previous and successive instances of the map (which seems to answer my question about the need to attach to two instances!), and signify the deliberate addition or deletion of map elements. They also cover new information added or deleted based on a source.

Art Errors involve hexes with the wrong colour or symbol and such. Continuity Errors deal with accidental discontinuity between maps. Labelling Errors are problems with captions.

There may be more types needed that I haven't thought of yet. It should become apparent pretty quickly when entering the notes into the database.

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Re: Maps

Post by Thorf » Tue Jul 22, 2008 8:49 am

I'm considering redefining the way the maps tables work. Specifically, it has occurred to me that we may want to refer to the maps themselves as sources; this means that they need to go in the sources table. It really seems to make more sense to have them there to refer to.

Therefore, the sources table is likely to become another hierarchical table, with parent-child sources. For example, GAZ1 will be a parent source with child sources consisting of a trifold cover, a 64 page book, and a poster map. In theory each of these could also have child sources, for example the hex map and the different town maps shown on the poster map.

But these are really what I have been referring to as instances of maps, so we only really need one change to the map tables:

mdb_map_instance
id
mdb_map_id @ (defines the overall map)
mdb_source_id @ (defines the particular instance of the map)
mdb_officialness_id @
mdb_map_format_id @
publication_date (year and optionally month too)
url
description

So to sum up, the tables are based around map templates and instances of those maps. Templates define a map by the area it shows as well as its scale and type. Instances ties together these templates with developed instances that have been produced and added to the sources table.

Since maps are now sources, we don't need to define things twice, so we can delete most of the fields from the instances table (struck through above). Of course we can also delete the tables mdb_map_source_linkage and mdb_map_author_linkage altogether. Map formats will probably be folded into the general formats field in the sources menu, which should include similar options anyway.

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Maps: New Specification

Post by Thorf » Tue Jul 22, 2008 8:57 am

So to sum up, here is my latest design for the maps tables:

mdb_map
id
map_name
mdb_map_type_id @
mdb_map_scale_id @
description/notes

mdb_map_type
id
map_type
description

mdb_map_hex_scale
id
map_hex_scale
description

mdb_map_instance
id
mdb_map_id @ (defines the overall map)
mdb_source_id @ (defines the particular instance of the map)

(We could rename this table mdb_map_source_linkage if we wanted to...)

mdb_officialness (a universal table for the whole database)
id
officialness
description

mdb_format (a universal table, mainly used in the Sources section)
id
map_format
description

mdb_map_note
id
mdb_map_id @ (the overall map this note pertains to)
mdb_source_id @ (the specific instance of a map this note concerns)
mdb_map_note_type @
note

(The map_id should be set automatically if a source_id is entered, because the source_id should already have an associated map_id. On the other hand it's also possible to make a note about the map in general, without referencing a particular map instance.)

mdb_map_note_type
id
note_type

mdb_map_note_source
id
mdb_map_note_id @
mdb_source_id @
source_page_reference

Post Reply

Return to “Thorf's Projects”