jugglingdb icon indicating copy to clipboard operation
jugglingdb copied to clipboard

No schema?

Open jdarling opened this issue 10 years ago • 11 comments

I searched for this and couldn't really see an answer to it. Can you use JugglingDB without a schema? Or a way to use it with a minimal schema (must contain at least but can contain more than)?

Basically just use JugglingDB as an abstraction/access layer?

jdarling avatar Jul 16 '14 18:07 jdarling

You can't use jugglingdb without schema. Could you please clarify what you mean by minimal schema?

1602 avatar Jul 17 '14 03:07 1602

Sure, say I have a "contacts" schema. Minimum I want firstName and lastName, but I don't know what else will be stored to it. So I would like to be able to stuff anything in along with firstName and lastName.

IE: I may have the following object to store even though my schema is only firstName and lastName

{
  firstName: 'Jeremy',
  lastName: 'Darling',
  githubAccount: 'jdarling'
}

jdarling avatar Jul 17 '14 03:07 jdarling

It won't work. Store unknown details in JSON field.

On Thu, Jul 17, 2014 at 7:19 AM, jdarling [email protected] wrote:

Sure, say I have a "contacts" schema. Minimum I want firstName and lastName, but I don't know what else will be stored to it. So I would like to be able to stuff anything in along with firstName and lastName. IE: I may have the following object to store even though my schema is only firstName and lastName

{
  firstName: 'Jeremy',
  lastName: 'Darling',
  githubAccount: 'jdarling'
}

Reply to this email directly or view it on GitHub: https://github.com/1602/jugglingdb/issues/411#issuecomment-49254448

anatoliychakkaev avatar Jul 17 '14 05:07 anatoliychakkaev

I also have come across same use cases , is it the same case when using mongo adapter ?

pasindud avatar Aug 10 '14 11:08 pasindud

Yes

On 10 August 2014 12:57, Pasindu De Silva [email protected] wrote:

I also have come across same use cases , is it the same case when using mongo adapter ?

— Reply to this email directly or view it on GitHub https://github.com/1602/jugglingdb/issues/411#issuecomment-51712825.

Thanks, Anatoliy Chakkaev

anatoliychakkaev avatar Aug 14 '14 09:08 anatoliychakkaev

wouldn't that defeat the purpose about nosql being schema-less ?

pasindud avatar Aug 14 '14 11:08 pasindud

Short answer is "no". In practice when you need something schema-less, that means that you have architecture problem. All that schema-less gives you is friction free migration and development.

On 14 August 2014 12:40, Pasindu De Silva [email protected] wrote:

wouldn't that defeat the purpose about nosql being schema-less ?

— Reply to this email directly or view it on GitHub https://github.com/1602/jugglingdb/issues/411#issuecomment-52173015.

Thanks, Anatoliy Chakkaev

anatoliychakkaev avatar Aug 14 '14 12:08 anatoliychakkaev

I have a reason to use the JSON schema format in my app. Could I do my own schema validation and use JugglingDB simply for access? Or could a plug in for schema validation be designed to replace the default schema system in JugglingDB?

What would you recommend in this case to avoid duplicating schemas? What type of pull request would you accept in this regard? JSON schema is growing in popularity and standardization. Thank you.

http://json-schema.org/

bmiller59 avatar Apr 27 '16 00:04 bmiller59

This one is deep change of jugglingdb internals. I need to keep this requirement in mind while rebuilding stuff for major release. It could be completely schema-less with some restrictions, i.e. no automigrations for sql, different approach for data types handling, etc.. This should be carefully considered.

1602 avatar Jul 14 '16 11:07 1602

What are some of the drivers that force us to remove the schema?

mansuleman avatar Jul 16 '16 09:07 mansuleman

Would be nice for me too to have a "minimal schema". Any news on this?

GerkinDev avatar Aug 25 '17 17:08 GerkinDev