Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
smells like sql spirit
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gmail  
View profile  
 More options Oct 7 2012, 8:22 am
From: gmail <lambrettal...@gmail.com>
Date: Sun, 07 Oct 2012 14:21:58 +0200
Local: Sun, Oct 7 2012 8:21 am
Subject: smells like sql spirit
hi,

i have a modelling problem, that reminds me of fk-tables in RDBMS. i
think i might be missing something obvious.

my model looks like:

team1-[:IS_PARTICIPATING_IN]->m1<-[:IS_PARTICIPATING_IN]-team2
team1-[:IS_PARTICIPATING_IN]->m2<-[:IS_PARTICIPATING_IN]-team3
team1-[:IS_PARTICIPATING_IN]->m3<-[:IS_PARTICIPATING_IN]-team4

(m1, m2, m3 are sports matches)

i want to introduce user rating, so that a number of users can rate a
given team participating in a given match.

so my first thought was to introduce a User node and a HAS_SEEN
relationship:

approach A
----------
# first sports match (User 1)
user1-[:HAS_SEEN]->team1
HAS_SEEN relationship properties could be {stars: 5, sportsmatch:1}

user1-[:HAS_SEEN]->team1
HAS_SEEN relationship properties could be {stars: 6, sportsmatch:1}

# second sports match (User 1)
user1-[:HAS_SEEN]->team1
HAS_SEEN relationship properties could be {stars: 7, sportsmatch:2}
user1-[:HAS_SEEN]->team3
HAS_SEEN relationship properties could be {stars: 8, sportsmatch:2}

# first sports match (User 2)
user2-[:HAS_SEEN]->team1
HAS_SEEN relationship properties could be {stars: 9, sportsmatch:1}
user2-[:HAS_SEEN]->team2
HAS_SEEN relationship properties could be {stars: 10, sportsmatch:1}

in the above model the relation between user rating and
team-participating is leveraged at the HAS_SEEN property level. ugly.

approach B
----------
i have also played with the introduction of an additional "Rating" node:

user1-[:HAS_CREATED_RATING]->rating->[:RATING_OF_TEAM_IN_A_MATCH],
rating->[:IS_A_RATING_OF_TEAM]-team1,
rating->[:IS_A_RATING_OF_MATCH]-m1,

RATING_OF_TEAM_IN_A_MATCH relationship properties could be {stars:5}

it feels like what i really want is to connect a user rating directly to
en existing relationship (eg. the IS_PARTICIPATING_IN relationship in
team1-[:IS_PARTICIPATING_IN]->m1 ) since the user is not really rating a
team or a match but a team participating in a match.

any pointers to better approaches would be much appreciated

thanks
./allan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Oct 7 2012, 11:21 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Sun, 7 Oct 2012 17:20:46 +0200
Local: Sun, Oct 7 2012 11:20 am
Subject: Re: [Neo4j] smells like sql spirit
Allan,
sounds like you should then model the TEAM-PARTICIPATING-IN-MATCH as
its own node, and attach the ratings to that one? Something like

u1-[:RATING{stars:5}]->participation_team1,
team1-[:PARTICIPATE]->participation_team1-[:MATCH]->match1,
u1-[:RATING{stars:4}]->participation_team2,
team2-[:PARTICIPATE]->participation_team2-[:MATCH]->match1

WDYT?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Otten  
View profile  
 More options Oct 8 2012, 9:04 am
From: Rick Otten <rot...@manta.com>
Date: Mon, 8 Oct 2012 13:04:53 +0000
Local: Mon, Oct 8 2012 9:04 am
Subject: RE: [Neo4j] smells like sql spirit
Don't fans watch matches rather than teams?
   fan1-[:has_seen]->m1  ?

It sounds like you want to apply a 'weight' (rating) of some sort to the team nodes so that you can predict future matches, or at least advertise "the fans' choice" for the better team in the match.

Perhaps -- fan1-[:rate]->team1   (if fan1 has seen a match where team1 played)

Team1's total and aggregate rating is collected from the inbound [:rate] relationships.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Otten  
View profile  
 More options Oct 8 2012, 11:59 am
From: Rick Otten <rot...@manta.com>
Date: Mon, 8 Oct 2012 15:59:07 +0000
Local: Mon, Oct 8 2012 11:59 am
Subject: RE: [Neo4j] smells like sql spirit
Instead of saying:
" Team1's total and aggregate rating is collected from the inbound [:rate] relationships."

I meant to say:
"Team1's total and average ratings could be collected from a weight/(star number) property on the inbound [:rate] relationships.

I also meant to note that fan's could 'follow' teams, which would enable an application to do things such as alert them to upcoming matches, report on rankings and scores and match history, and that sort of thing.

So a given fan might have two relationships to a team -  "[rate:]" and "[follows:]" and another relationship to matches "[watched:]".

I meant to say all this, but got interrupted in the midst of my last sentence and hit 'send' instead of finishing my thoughts.  Thanks for letting me finish.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Oct 8 2012, 6:28 pm
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Tue, 9 Oct 2012 00:28:01 +0200
Local: Mon, Oct 8 2012 6:28 pm
Subject: Re: [Neo4j] smells like sql spirit
Rick,
yes, I think users would WATCH matches, but RATE the participation
(nodes) of the teams. I think you could then do

u1-[:RATING{stars:5}]->participation_team1,
team1-[:PARTICIPATE]->participation_team1-[:MATCH]->match1,
u1-[:RATING{stars:4}]->participation_team2,
team2-[:PARTICIPATE]->participation_team2-[:MATCH]->match1,
u1-[:WATCHED{rating:3}]->match1

and maybe even attach a rating to that relationship. WDYT?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gmail  
View profile  
 More options Oct 10 2012, 4:51 pm
From: gmail <lambrettal...@gmail.com>
Date: Wed, 10 Oct 2012 22:51:32 +0200
Local: Wed, Oct 10 2012 4:51 pm
Subject: Re: [Neo4j] smells like sql spirit
hi rick, peter,

many thanks for great ideas and suggestions!

i think i will start off something along your suggestion peter, with a
participation_team node concept. only i think i will name it slightly
different:

u1-[:RATING{stars:5}]->team1,
squad1<-[:IS_BASED_ON]-team1-[:IS_PARTICIPATING_IN_MATCH]->match1,
u1-[:RATING{stars:4}]->team2,
squad2<-[:IS_BASED_ON]-team2-[:IS_PARTICIPATING_IN_MATCH]->match1,
u1-[:WATCHED{rating:3}]->match1

and furthermore for player ratings:

u1-[:RATING{stars:7}]->player1,
person1<-[:IS_IN_REAL_LIFE]-player1-[:IS_PLAYING_A_MATCH_FOR]->team1,
u1-[:RATING{stars:8}]->player2,
person2<-[:IS_IN_REAL_LIFE]-player2-[:IS_PLAYING_A_MATCH_FOR]->team1,
squad1<-[:IS_BASED_ON]-team1-[:IS_PARTICIPATING_IN_MATCH]->match1,

etc.

thanks once again

./allan

On 10/9/12 12:28 AM, Peter Neubauer wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »