I’m just trying to confirm that the Alloy model I’ve created sort of corresponds to a high-level ERD. I’m trying to model a database to allow me to capture all the various comic book issues I’ve got in anthology books. For example I’ve got Fantastic Four Omnibus Volume 2. What I want to do is to be able to track that the book has issues 31-60 of Fantastic Four, track the stories in each book and the author and artist of each story with the intent of eventually being able to identify all books containing stories by particular artists/authors etc. That is, show me all books I have containing art by e. g. Steve Ditko.
So this is the Alloy Model I’ve come up with:
sig Name {}
sig Month {}
sig Year {}
abstract sig Creator {
, first: one Name
, last: one Name
}
sig IssueNumber {}
sig Title {}
sig PublicationDate {
, month: some Month
, year: some Year
}
sig Author in Creator{ }
sig Artist in Creator{ }
sig Story
{
, written_by: some Author
, drawn_by: some Artist
, inked_by: some Artist
, title: some Title
}
sig Issue
{
,stories: some Story
,number: one IssueNumber
,publisher: one Publisher
,date: one PublicationDate
}
sig Publisher
{
, publisherName: one Name
}
sig Book
{
, story: some Story
, title: some Title
, date: some PublicationDate
, publisher: some Publisher
}
And this is my ERD:
I think I’ve created the relationships in my Alloy model correctly but since I’m still a novice with Alloy, I wouldn’t mind someone who’s more of an old hand taking a look and advising me. Have I created the correct alloy model to capture the same information as I have in my ERD?
