Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
PIZZA.BAT
Nov 12, 2016


:cheers:


DONT THREAD ON ME posted:

i get it but you can build a thing in postgres with a jsonb column (or with a schema because it's really not that hard) without caring about it and it will take the same amount of effort, work better, and you wont be hosed when your bullshit thing suddenly becomes important.

if you don't care about it, why use tools that are going to force you to spend more time working on it in the long run i dont get this philosophy at all



"it doesn't matter, let's build it on node! then we get to spend hundreds of hours in the long run fixing bullshit dependency issues!"""

oh yeah i'm talking about schemaless in general, not mongo

i don't think i've ever run into someone who's run a real project on mongo who didn't hate it

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Rex-Goliath posted:

oh yeah i'm talking about schemaless in general, not mongo

i don't think i've ever run into someone who's run a real project on mongo who didn't hate it

oh yeah that's reasonable. be pragmatic. you're definitely better off going with post gres though, then you only need to do a migration if you ever need to switch to a real schema.

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

Rex-Goliath posted:

lol at some of you being beaten into submission and feeling like you just gotta have a schema because what’s the big deal?? once you’ve built something without having to care about it you’ll understand the appeal

yeah, you don't build it "properly" because you're not a subject matter expert on the underlying database engine, so your site performs terribly and then obama hires a bunch of google employees to fix it.

post hole digger
Mar 21, 2011


lol

PIZZA.BAT
Nov 12, 2016


:cheers:


Fiedler posted:

yeah, you don't build it "properly" because you're not a subject matter expert on the underlying database engine, so your site performs terribly and then obama hires a bunch of google employees to fix it.

tell me how they hurt you

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
i love to have my schemas defined implicitly by the code using the data so that i can never be quite sure what fields should be present

KOTEX GOD OF BLOOD
Jul 7, 2012

Skim Milk posted:

necc0 is now bad database shaggar
liking things is illegal in yospos

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Plorkyeran posted:

i love to have my schemas defined implicitly by the code using the data so that i can never be quite sure what fields should be present

this but unironically

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
best thing about having no schema is the abundance of null-checks that happen in code

skimothy milkerson
Nov 19, 2006

KOTEX GOD OF BLOOD posted:

liking things is illegal in yospos

if liking you are posting is wrong, i dont want to be right

skimothy milkerson
Nov 19, 2006

giant cock man, hows the new crib so far?

Trabisnikof
Dec 24, 2005

i liked couchdb :(

SpaceAceJase
Nov 8, 2008

and you
have proved
to be...

a real shitty poster,
and a real james
Who loving cares what database your dumb poo poo is using just trust the ORM and ship it

echinopsis
Apr 13, 2004

by Fluffdaddy
in my brief attempt to understand databases I *think* I understand a relational database but I can't for the life of my conceptualise an entirely different concept, unless that concept is basically just a filesystem without a filesystem, ie, data/documents with names that you can access

building a dynamic web page when I only put in an hour a week is hard, and have to learn python, postgres, django, javascript and html. I think. installing enough poo poo on my macpro to get it all running by installing pip and poo poo takes long enough as it is. I have a webpage that currently goes to one of two pages depending on if you type in one of two urls... and I think learning how to database is going to be key to making my website worthwhile. but also is the javascript and html. anyway lol its a lot to learn when I can never be hosed doing anything on it

echinopsis
Apr 13, 2004

by Fluffdaddy
its gonna be good tho belieb u me

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

echinopsis posted:

in my brief attempt to understand databases I *think* I understand a relational database but I can't for the life of my conceptualise an entirely different concept, unless that concept is basically just a filesystem without a filesystem, ie, data/documents with names that you can access

that's what it is. i mean it's more than that, better performance and querying features, the documents arent usually files but usually some structured data, it's usually stored partially in memory, etc.

the same thing confused me at first too.

power botton
Nov 2, 2011

Didn't Postgres with a PK, jsonb table outperform mongo when you turned off all the synchronous commit and fsync safety and when you enabled all that pesky "database" stuff in mongo it was slower than Postgres's defaults?

akadajet
Sep 14, 2003

SpaceAceJase posted:

Who loving cares what database your dumb poo poo is using just trust the ORM and ship it

yeah, but my impotence mismatch.

PIZZA.BAT
Nov 12, 2016


:cheers:


fart simpson posted:

this but unironically

PIZZA.BAT
Nov 12, 2016


:cheers:


Skim Milk posted:

giant cock man, hows the new crib so far?

p good p good. developer is a scatterbrained idiot who i’m gonna have to take to small claims court over some small stuff but overall i’m happy

PIZZA.BAT
Nov 12, 2016


:cheers:


Trabisnikof posted:

i liked couchdb :(

its p dece yeah

SYSV Fanfic
Sep 9, 2003

by Pragmatica
Mongodb should have just sold seats on it's board for $30 or $50k.

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Rex-Goliath posted:

lol at some of you being beaten into submission and feeling like you just gotta have a schema because what’s the big deal?? once you’ve built something without having to care about it you’ll understand the appeal

i have done what you say before and i did not understand the appeal. if you want to prototype something schemaless as a proof of concept, where you only care about the happy path through your code, then sure i guess that's ok. but as soon as you have a persistent datastore, why would you NOT want a schema? unless you're doing free text search, your program is gonna care about the structure of your data, and the data will probably outlive your code, so why wouldn't you want your database to do all it can to help? you're implicitly defining a schema regardless... sql ddl is not hard

My Linux Rig
Mar 27, 2010
Probation
Can't post for 6 years!

DELETE CASCADE posted:

i don't understand why anyone would use mongodb or even want a document store. your poo poo's relational, yes it is, i promise, look harder at it, or have someone else design the schema if your brain is too broken from staring at json all day. then you get to use sql and a stable rdbms and live happily ever after

I’ve worked a year and a half on a project with a in house json document store and all I can say is blech

bring back relational databases

gonadic io
Feb 16, 2011

>>=
There is always a schema. Whether this schema explicitly exists in a file, or is implicitly constructed by the fields that the code looks for is up to you.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
people who use document stores for things that aren't documents are lovely people and give software development a worse name that it already has.

get out of my field, dummies.

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe
can't we just blame mongos period of popularity on front-enders going "full stack" aka we need jabascript end-to-end

PIZZA.BAT
Nov 12, 2016


:cheers:


DELETE CASCADE posted:

i have done what you say before and i did not understand the appeal. if you want to prototype something schemaless as a proof of concept, where you only care about the happy path through your code, then sure i guess that's ok. but as soon as you have a persistent datastore, why would you NOT want a schema? unless you're doing free text search, your program is gonna care about the structure of your data, and the data will probably outlive your code, so why wouldn't you want your database to do all it can to help? you're implicitly defining a schema regardless... sql ddl is not hard

if your schema is defined in code why are you redundantly defining it again? isn’t that what unit/integration tests are for?

gonadic io
Feb 16, 2011

>>=

Rex-Goliath posted:

if your schema is defined in code why are you redundantly defining it again? isn’t that what unit/integration tests are for?

serious answer: because usually it's unclear and fragile in code, split across lots of different places. explicit schemas define it in one unarguable place and unambiguously

non-serious answer: unit tests are redundant with the code, why bother with them. if there's an issue your users will tell you

PIZZA.BAT
Nov 12, 2016


:cheers:


if it’s something critical like a primary key or whatever you can enable schema validation on any elements which shouldn’t change or have to follow certain guidelines. with that other systems are still free to write additional information should it become necessary without all the front work being necessary

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Rex-Goliath posted:

if your schema is defined in code why are you redundantly defining it again? isn’t that what unit/integration tests are for?

I feel like this is the same argument I have with dynamic typing advocates. Sure, I can write unit tests to verify at runtime that every value has the type I think it does. But why not let the type system do that for me? It’s less work, less error prone, easier to maintain, easier to understand and communicate, and allows for optimizations that penetrate even through layers of code I don’t control. It’s not redundant because I don’t write unit tests to verify that an int is an int, or in this case that a column has the proper type or foreign key relationship.

I’d also reiterate what I said in the post you quoted: the data Is not owned by my code, simply processed by it. Other codebases belonging to different teams also manipulate it, and I’d like to enforce its integrity in the same central location where it is stored. That way I don’t have to run my team’s test suite only to find that the data has been corrupted by someone else’s code. In fact, you could throw my code away, and the data will remain just fine for the next project that comes up, documented and enforced by the schema.

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe
"that just sounds like a database with extra steps"

PIZZA.BAT
Nov 12, 2016


:cheers:


if you’re concerned about that you can still enable schema validations in document stores. hard schemas don’t only exist in relational dbs

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Rex-Goliath posted:

if you’re concerned about that you can still enable schema validations in document stores. hard schemas don’t only exist in relational dbs

great now i'm using a document db AND i have to define a schema? why not just expend the extra 30 minutes of effort and define a schema that will make my life and everyone elses life easier?

DONT THREAD ON ME fucked around with this message at 21:48 on Jan 15, 2019

abigserve
Sep 13, 2009

this is a better avatar than what I had before
Isn't storing json far less storage efficient because it stores the fields with every document

PIZZA.BAT
Nov 12, 2016


:cheers:


because you can store full entities which can be as complex as you want without having to deal with setting up all the tables and relationships first. if you’re using xml you can also use namespaces to version your schema which allows you to refractor data on a production system with zero downtime or gymnastics which is nice

PIZZA.BAT
Nov 12, 2016


:cheers:


abigserve posted:

Isn't storing json far less storage efficient because it stores the fields with every document

depends on the db. the smart ones split the docs apart into a series of trees and pointers which allows for heavy overlapping. there’s probably a lot of real dumb implementations out there too

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Rex-Goliath posted:

because you can store full entities which can be as complex as you want without having to deal with setting up all the tables and relationships first.

if your data is relational this ends up turning into a pile of spaghetti bullshit extremely fast. i just went through 2 years of dealing with this. never again.

if your data isn't relational then fine, i guess.

e: sorry for being a dick schemaless ruined my life for the last 2 years.

DONT THREAD ON ME fucked around with this message at 21:56 on Jan 15, 2019

PIZZA.BAT
Nov 12, 2016


:cheers:


yeah i’m literally a nosql consultant i’ve seen my fair share of horror stories. it’s absolutely not a replacement for considerate design and general best practices and tons of shops treat it that way. just because you don’t have to have a schema doesn’t mean it’s not important for certain entities

if you know what you’re doing though you can build some pretty crazy poo poo in months that would be effectively impossible for a relational system

Adbot
ADBOT LOVES YOU

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Rex-Goliath posted:

yeah i’m literally a nosql consultant

sorry about your loss

  • Locked thread