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
Test for existence?
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
  8 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
 
Kevin Burton  
View profile  
 More options Nov 8 2012, 11:54 am
From: Kevin Burton <rkevinbur...@charter.net>
Date: Thu, 8 Nov 2012 08:54:35 -0800 (PST)
Local: Thurs, Nov 8 2012 11:54 am
Subject: Test for existence?

I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?

Thank you.


 
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.
Tatham Oddie  
View profile  
 More options Nov 8 2012, 2:20 pm
From: Tatham Oddie <tat...@oddie.com.au>
Date: Thu, 8 Nov 2012 19:19:13 +0000
Local: Thurs, Nov 8 2012 2:19 pm
Subject: RE: Test for existence?

So you want to check to see if there's any node, anywhere in the entire graph, where Foo == "Bar"? (This will be terrible if you have more than 1000 or so nodes in your graph. You should use an index.)

Or you want to check if node 67 exists?

-- Tatham

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?

I would like an example on how I can do the simple operation of testing for a nodes existence? I don't have any references so the test will have to be based on the values in the node. Is this possible?

Thank you.
--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


 
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.
Kevin Burton  
View profile  
 More options Nov 8 2012, 2:31 pm
From: "Kevin Burton" <rkevinbur...@charter.net>
Date: Thu, 8 Nov 2012 13:31:45 -0600
Local: Thurs, Nov 8 2012 2:31 pm
Subject: RE: Test for existence?

I guess I want the first query. I was hoping that the query would be limited
since I only want to query all of the nodes of a specific type that have in
your words the property 'Foo == Bar'. Say I have the following class:

Public class MyNode

{

    Public string Foo { get; set }

}

I run into this situation since our relational database can have many
duplicates and before I create a whole new node I want to know if there are
any nodes with that same value and instead of creating it I want to 'get'
it. Am I thinking about this wrong?

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com
Subject: RE: Test for existence?

So you want to check to see if there's any node, anywhere in the entire
graph, where Foo == "Bar"? (This will be terrible if you have more than 1000
or so nodes in your graph. You should use an index.)

Or you want to check if node 67 exists?

-- Tatham

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?

I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?

Thank you.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


 
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.
Tatham Oddie  
View profile  
 More options Nov 8 2012, 2:45 pm
From: Tatham Oddie <tat...@oddie.com.au>
Date: Thu, 8 Nov 2012 19:45:04 +0000
Local: Thurs, Nov 8 2012 2:45 pm
Subject: Re: Test for existence?

The type information only exists in .NET to help us serialize and deserialize into known models, and to provide IntelliSense through the query syntax where possible. This information is not in Neo4j. To Neo4j, you just have property bags.

You can run a Cypher query like this:

START n=node(*)
WHERE n.Id! = 123
RETURN n

But that will read every single node off the disk. Sloooow.

An index is the better way to do this.

How many nodes do you have? 10, 100, 1000, 10000, …?

There's also the CREATE UNIQUE clause in Cypher which will do upsert style operations. We expose this clause via the wrapper in a simple way, but not a great way. It needs some polish.

--
Tatham Oddie
Tiny phone keyboard = tiny message

On 09/11/2012, at 6:31, "Kevin Burton" <rkevinbur...@charter.net<mailto:rkevinbur...@charter.net>> wrote:

I guess I want the first query. I was hoping that the query would be limited since I only want to query all of the nodes of a specific type that have in your words the property ‘Foo == Bar’. Say I have the following class:

Public class MyNode
{
    Public string Foo { get; set }

}

I run into this situation since our relational database can have many duplicates and before I create a whole new node I want to know if there are any nodes with that same value and instead of creating it I want to ‘get’ it. Am I thinking about this wrong?

From: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com> [mailto:neo4jclient@googlegroups.com] On Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com>
Subject: RE: Test for existence?

So you want to check to see if there’s any node, anywhere in the entire graph, where Foo == "Bar"? (This will be terrible if you have more than 1000 or so nodes in your graph. You should use an index.)

Or you want to check if node 67 exists?

-- Tatham

From: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com> [mailto:neo4jclient@googlegroups.com] On Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com>
Subject: Test for existence?

I would like an example on how I can do the simple operation of testing for a nodes existence? I don't have any references so the test will have to be based on the values in the node. Is this possible?

Thank you.
--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


 
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.
Kevin Burton  
View profile  
 More options Nov 8 2012, 3:45 pm
From: "Kevin Burton" <rkevinbur...@charter.net>
Date: Thu, 8 Nov 2012 14:45:28 -0600
Local: Thurs, Nov 8 2012 3:45 pm
Subject: RE: Test for existence?

There is very little info on Cypher queries with neo4jclient.

I am planning on about 100000 nodes after the population from SQL server
happens but at first there will be only a few. Then as the population
continues there will be more and more. If an index is a better way how do I
create an index with neo4jclient?

I am relatively new to neo4j so I don't know the benefit of an 'upsert
operation' or what 'CREATE UNIQUE' will do. They both seem Cypher related
and again using Cypher with neo4jclient doesn't have a lot of documentation
on it that I could find.

Thank you.

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:45 PM
To: <neo4jclient@googlegroups.com>
Cc: neo4jclient@googlegroups.com
Subject: Re: Test for existence?

The type information only exists in .NET to help us serialize and
deserialize into known models, and to provide IntelliSense through the query
syntax where possible. This information is not in Neo4j. To Neo4j, you just
have property bags.

You can run a Cypher query like this:

START n=node(*)

WHERE n.Id! = 123

RETURN n

But that will read every single node off the disk. Sloooow.

An index is the better way to do this.

How many nodes do you have? 10, 100, 1000, 10000, .?

There's also the CREATE UNIQUE clause in Cypher which will do upsert style
operations. We expose this clause via the wrapper in a simple way, but not a
great way. It needs some polish.

--

Tatham Oddie

Tiny phone keyboard = tiny message

On 09/11/2012, at 6:31, "Kevin Burton" <rkevinbur...@charter.net> wrote:

I guess I want the first query. I was hoping that the query would be limited
since I only want to query all of the nodes of a specific type that have in
your words the property 'Foo == Bar'. Say I have the following class:

Public class MyNode

{

    Public string Foo { get; set }

}

I run into this situation since our relational database can have many
duplicates and before I create a whole new node I want to know if there are
any nodes with that same value and instead of creating it I want to 'get'
it. Am I thinking about this wrong?

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com
Subject: RE: Test for existence?

So you want to check to see if there's any node, anywhere in the entire
graph, where Foo == "Bar"? (This will be terrible if you have more than 1000
or so nodes in your graph. You should use an index.)

Or you want to check if node 67 exists?

-- Tatham

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?

I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?

Thank you.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


 
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.
Kevin Burton  
View profile  
 More options Nov 13 2012, 2:12 pm
From: Kevin Burton <rkevinbur...@charter.net>
Date: Tue, 13 Nov 2012 11:12:29 -0800 (PST)
Local: Tues, Nov 13 2012 2:12 pm
Subject: Re: Test for existence?

Let me clarify. I am using this in the context of populating a Neo4j
database from an existing SQL database using Neo4jClient with .NET. Suppose
I have 10000 skus and 100 departments. Each of the skus will be 'in' one of
the departments. I read the first sku and create a sku node and a
department node and create a relation between the two nodes. I read the
next sku and since I know that the skus are unique I create a sku node but
before I create a new department node I want to see that the department
(specified by an number of criteria) eixts as a node or not. Otherwise if I
create a department every time I read a new sku in I will have 10000
departments.Ideally I would like to have a method that returns all of the
department nodes that meet a certain criteria. If that list count is 0 then
the node does not exist. Also I would want to query just the department
nodes as if the criteria was limited to just the name of the department
then it is possible that a sku name and department name would be the same.
I don't want sku nodes returned. Just department nodes. Since I am using
Neo4j and you suggest using indexes what would be the call using
Neo4jClient to set up that index? How would I set up this 'department
query' using Neo4jCLient? Thank you.


 
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.
Kevin Burton  
View profile  
 More options Nov 15 2012, 2:18 pm
From: "Kevin Burton" <rkevinbur...@charter.net>
Date: Thu, 15 Nov 2012 13:18:42 -0600
Local: Thurs, Nov 15 2012 2:18 pm
Subject: RE: Test for existence?

This brings up two questions in my mind.

1.       How do I run a Cypher query with neo4jclient (starting with a
GraphClient)?

2.       What is the best way to create a node with neo4jclient that has the
same properties as the properties on the .NET model class?

Is this possible with neo4jclient?

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:45 PM
To: <neo4jclient@googlegroups.com>
Cc: neo4jclient@googlegroups.com
Subject: Re: Test for existence?

The type information only exists in .NET to help us serialize and
deserialize into known models, and to provide IntelliSense through the query
syntax where possible. This information is not in Neo4j. To Neo4j, you just
have property bags.

You can run a Cypher query like this:

START n=node(*)

WHERE n.Id! = 123

RETURN n

But that will read every single node off the disk. Sloooow.

An index is the better way to do this.

How many nodes do you have? 10, 100, 1000, 10000, .?

There's also the CREATE UNIQUE clause in Cypher which will do upsert style
operations. We expose this clause via the wrapper in a simple way, but not a
great way. It needs some polish.

--

Tatham Oddie

Tiny phone keyboard = tiny message

On 09/11/2012, at 6:31, "Kevin Burton" <rkevinbur...@charter.net> wrote:

I guess I want the first query. I was hoping that the query would be limited
since I only want to query all of the nodes of a specific type that have in
your words the property 'Foo == Bar'. Say I have the following class:

Public class MyNode

{

    Public string Foo { get; set }

}

I run into this situation since our relational database can have many
duplicates and before I create a whole new node I want to know if there are
any nodes with that same value and instead of creating it I want to 'get'
it. Am I thinking about this wrong?

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com
Subject: RE: Test for existence?

So you want to check to see if there's any node, anywhere in the entire
graph, where Foo == "Bar"? (This will be terrible if you have more than 1000
or so nodes in your graph. You should use an index.)

Or you want to check if node 67 exists?

-- Tatham

From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?

I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?

Thank you.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


 
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.
Kevin Burton  
View profile  
 More options Nov 15 2012, 3:50 pm
From: Kevin Burton <rkevinbur...@charter.net>
Date: Thu, 15 Nov 2012 12:50:29 -0800 (PST)
Local: Thurs, Nov 15 2012 3:50 pm
Subject: Re: Test for existence?

Let me step back. I have a database table that has columns (amoung
others) for product id, variant id, and department. There are about 50,000
rows that have unique variant ids and there are about 10 unique
departments. So before I create a department node I want to see if that
department node exists or not, otherwise I would create 50,000 department
nodes. Also I want to make sure that I am only checking for *department*
nodes because there the name of the product node may be the same as the
department and I don't want to return product nodes when I am querying for
department nodes.

There have been several posts on this thread suggesting various Cypher
queries but I don't know how to run a Cypher query with Neo4jClient. Also
it was suggested that I should use an index. Again I am not sure how to set
up an index with Neo4jClient.

Thank you.

Ideas?


 
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 »