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
Making the transition from LDAP/RDBMS to Graph
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
 
Christopher Hydak  
View profile  
 More options Aug 15 2012, 3:33 pm
From: Christopher Hydak <chy...@identropy.com>
Date: Wed, 15 Aug 2012 12:33:56 -0700 (PDT)
Local: Wed, Aug 15 2012 3:33 pm
Subject: Making the transition from LDAP/RDBMS to Graph

I'm having some difficulties making the transition from a traditional
schema-based database to a graph database and I was hoping that someone
here can beat the truth into me.  I am creating a user store, which
obviously can have many relationships and attributes. It makes certain
sense to use a graphdb for this type of data, but I can't get over how I
can enforce required attributes when creating a new person.  I find that I
want to create a template graph that is pretty much the same thing as a
schema.  Is that even possible in neo4j or am I missing the point?

Here is a sample SQL schema for a person object that I am using.

CREATE TABLE [dbo].[Users](
[UID_Person] [nvarchar](38) NOT NULL,
[FirstName] [nvarchar](50) NULL,
[LastName] [nvarchar](50) NULL,
[DepartmentUID] [nvarchar](38) NULL,
[WorkPhone] [nvarchar](15) NULL,
[ManagerUID] [nvarchar](38) NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
(
[UID_Person] ASC
)

Thanks,
Christopher


 
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.
Nigel Small  
View profile  
 More options Aug 15 2012, 5:48 pm
From: Nigel Small <ni...@nigelsmall.net>
Date: Wed, 15 Aug 2012 22:48:22 +0100
Local: Wed, Aug 15 2012 5:48 pm
Subject: Re: [Neo4j] Making the transition from LDAP/RDBMS to Graph

Hi Christopher

Neo4j specifically avoids imposing any structure or rules at all onto your
data and nodes are deliberately typeless entities. Instead, it becomes
solely the responsibility of the application which owns and uses that data
store to manage how that content is used (and whether certain fields are
mandatory or not).

From a personal point of view, I tend to think more in terms of duck
typing<http://en.wikipedia.org/wiki/Duck_typing>when storing data in
Neo4j. In your case, this could mean that your
application might allow any node with a "FirstName" and "LastName" property
to be treated as a person or if a node has one or more outgoing "MANAGES"
relationships then it can be seen as a manager.

Hope this helps
Nige

On 15 August 2012 20:33, Christopher Hydak <chy...@identropy.com> 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.
Michael Hunger  
View profile  
 More options Aug 15 2012, 9:17 pm
From: Michael Hunger <michael.hun...@neopersistence.com>
Date: Thu, 16 Aug 2012 03:17:01 +0200
Local: Wed, Aug 15 2012 9:17 pm
Subject: Re: [Neo4j] Making the transition from LDAP/RDBMS to Graph

All your properties except the id are nullable so what do want to enforce?

Which language/deployment ?

Why do you want to enforce the attributes?

Sent from mobile device

Am 15.08.2012 um 21:33 schrieb Christopher Hydak <chy...@identropy.com>:


 
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.
Christopher Hydak  
View profile  
 More options Aug 16 2012, 8:35 am
From: Christopher Hydak <chy...@identropy.com>
Date: Thu, 16 Aug 2012 05:35:59 -0700 (PDT)
Local: Thurs, Aug 16 2012 8:35 am
Subject: Re: [Neo4j] Making the transition from LDAP/RDBMS to Graph

Thanks for both of the responses.

Nigel, That does help level-set the idea in my head.   From my legacy SQL
point of view, provided I maintain my required fields in my insert
statement in the language, Java, I can enforce any structure I want.

Michael, the example I sent you was a small subset of what I really have.
 Typically, there are more attributes such as password, that would be a
required field in any user store.  Every user must have a password.  So,
when I create a person node, I must require a password attribute to be set.

Thanks,
Christopher


 
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.
Michael Hunger  
View profile  
 More options Aug 16 2012, 9:12 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Thu, 16 Aug 2012 15:12:38 +0200
Local: Thurs, Aug 16 2012 9:12 am
Subject: Re: [Neo4j] Making the transition from LDAP/RDBMS to Graph

Christopher,

you would actually do it in your application level code, before creating the nodes and relationships.

What you can do in neo4j is to register a transactioneventhandler which is passed the newly created data before commit and can verify if the creates/updates are valid or roll back the transaction by throwing an exception.

HTH

Michael

Am 16.08.2012 um 14:35 schrieb Christopher Hydak:


 
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.
Charles Bedon  
View profile  
 More options Aug 17 2012, 9:49 am
From: Charles Bedon <charles.be...@zoho.com>
Date: Fri, 17 Aug 2012 08:49:57 -0500
Local: Fri, Aug 17 2012 9:49 am
Subject: Re: [Neo4j] Making the transition from LDAP/RDBMS to Graph

Hello

You have to take into account these aspects:

1. N4J is schemaless, so a node represeting a "record" may not have the same properties as another node representing the same "type" of element. That's the nature of the db and it's suitable for most use cases.

2. There can't be null property values. You can't set "FirstName" to null, for example. That will raise an IllegalArgumentException.

Try checking your data model constrains at application level, not at db level. Yeah, this can be a downside depending on the point of view.

-------------------------------------
Charles Edward Bedón Cortázar
Network Management, Data Analysis and Free Software http://www.neotropic.co | Follow Neotropic on Twitter
Open Source Network Inventory for the masses!  http://kuwaiba.sourceforge.net | Follow Kuwaiba on Twitter
Linux Registered User #386666

---- Am Wed, 15 Aug 2012 20:17:01 -0500 Michael Hunger &lt;michael.hun...@neopersistence.com&gt; schrieb ----

All your properties except the id are nullable so what do want to enforce?

Which language/deployment ?

Why do you want to enforce the attributes?

Sent from mobile device

Am 15.08.2012 um 21:33 schrieb Christopher Hydak &lt;chy...@identropy.com&gt;:

I'm having some difficulties making the transition from a traditional schema-based database to a graph database and I was hoping that someone here can beat the truth into me.  I am creating a user store, which obviously can have many relationships and attributes. It makes certain sense to use a graphdb for this type of data, but I can't get over how I can enforce required attributes when creating a new person.  I find that I want to create a template graph that is pretty much the same thing as a schema.  Is that even possible in neo4j or am I missing the point?

Here is a sample SQL schema for a person object that I am using.

CREATE TABLE [dbo].[Users](
 [UID_Person] [nvarchar](38) NOT NULL,
 [FirstName] [nvarchar](50) NULL,
 [LastName] [nvarchar](50) NULL,
 [DepartmentUID] [nvarchar](38) NULL,
 [WorkPhone] [nvarchar](15) NULL,
 [ManagerUID] [nvarchar](38) NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
(
 [UID_Person] ASC
)

Thanks,
Christopher

 --

 --


 
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 »