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
Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.
Yeah that's not a good idea. Don't do that.

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

don't do what and why

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Bloody posted:

c database s: entity designer is reasonably needs suiting except that i have a corner case that is falling apart. in one table i am representing instances of Foos. elsewhere in our system, we take a fixed-size group of Foos (8 Foos) and use them as Bars. Basically, a Bar is a 8-tuple of Foos. Built-in relationships are only of a 1, 0..1, or many cardinality, and coming up with a way to represent my tuple as its own entity type is very cumbersome. in a sql table i would just have 9 columns - 1 identifier for the bar, plus 8 columns for each Foo instance, named appropriately for what each instance means in the tuple. then, elsewhere, i can construct proper relationships between Bars and other stuff. right now, those relationships are all just x-to-many relationships with Foos, but that's not true and hides the real intent

note: there are decent odds i am improperly modeling my data to wind up in this situation in the first place

bithc what the gently caress

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.
Don't build a system that assumes a fixed-size collection of 8 items. Because the size of the collection will change and you'll have to go modify every loving thing to accommodate that. Even if it magically doesn't ever change, the bad habits will stick with you forever.

distortion park
Apr 25, 2011


i haven't used any of these things and hand write all my SQL + orm code (except in f# where it works properly)

Bloody
Mar 3, 2013

Fiedler posted:

Don't build a system that assumes a fixed-size collection of 8 items. Because the size of the collection will change and you'll have to go modify every loving thing to accommodate that. Even if it magically doesn't ever change, the bad habits will stick with you forever.

it isn't an assumption, it is a fact. "cars have four wheels" isnt an assumption

Cat Face Joe
Feb 20, 2005

goth vegan crossfit mom who vapes



uh why not just use excel like a normal company?

Shaggar
Apr 26, 2006

Bloody posted:

it isn't an assumption, it is a fact. "cars have four wheels" isnt an assumption

Then make them properties of the object rather than a collection.

Schadenboner
Aug 15, 2011

by Shine

Bloody posted:

it isn't an assumption, it is a fact. "cars have four wheels" isnt an assumption



?

Bloody
Mar 3, 2013


this is a powered trike

MrMoo
Sep 14, 2000

distortion park
Apr 25, 2011


Bloody posted:

this is a powered trike

turns out cars.db is actually cars_and_trikes.db

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

Bloody posted:

it isn't an assumption, it is a fact. "cars have four wheels" isnt an assumption

https://en.wikipedia.org/wiki/Covini_C6W

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





Bloody
Mar 3, 2013


this is also a powered trike

Bloody
Mar 3, 2013


this is a truck

Bloody
Mar 3, 2013


this is a mistake

Schadenboner
Aug 15, 2011

by Shine

Bloody posted:

a mistake

DSYP

Bloody
Mar 3, 2013


:xd:

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Shaggar posted:

Then make them properties of the object rather than a collection.

and that'll translate into a bar table with 8 columns, each of which is a FK into the foo table?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
design everything in 6NF without NULL and then denormalize as needed for performance

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
aka The CJ Date Method

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Bloody posted:

this is a truck

good 2 see ur image-id neural net is working ok

flakeloaf
Feb 26, 2003

Still better than android clock

Captain Foo posted:

good 2 see ur image-id neural net is working ok

Only registered members can see post attachments!

power botton
Nov 2, 2011

eschaton posted:

design everything in 6NF without NULL and then denormalize as needed for performance

ah yes lets do cool data migrations in production cause you realized you dont need a table full of first letters of names or whatever poo poo 6NF is

Share Bear
Apr 27, 2004

have u tried storing everything as json in blob columns op?? that way your users can program their own collections and aggregations!

Bloody
Mar 3, 2013

i have started using a "structured query language" to define my data in a data "base" and it is maybe suiting my needs

schemaspy is cool and good at turning my database into pretty pictures

qhat
Jul 6, 2015


Shaggar posted:

Create a Visual Studio database project. You can import schema from an existing db or start from scratch. Install SQL Server Data Tools for visual studio if you don't see it in ur template list

the only correct answer currently and ever to exist in this thread

Shaggar
Apr 26, 2006
vs db projects are not really good but they are the least bad option

HoboMan
Nov 4, 2010

Shaggar posted:

vs db projects are not really good but they are the least bad option

this

it sucks

qhat
Jul 6, 2015


Shaggar posted:

vs db projects are not really good but they are the least bad option

SSMS was horrifically buggy once upon a time but they fixed a lot of stuff with 2014 iirc and I was definitely less stressed on avg after that version. Still, was a million times better than MySQL and loving workbench lol.

echinopsis
Apr 13, 2004

by Fluffdaddy
are you trying to present this data

https://twitter.com/hilare_belloc/status/953351694682869760

HoboMan
Nov 4, 2010

ok so i got a slow rear end query from joining two tables in a remote query to our microsoft dynamics nav database from our sql server database. can you even toss indexes on nav tables? does it have a concept of primary keys? i think the big problem is the row estimates a waaaay off, can i even do anything about that?

Farmer Crack-Ass
Jan 2, 2001

this is me posting irl

bloody isn't being as big of a poo poo as you might think, btw. those three-wheelers were explicitly designed so as to not require a full automobile driver's license

Notorious b.s.d.
Jan 25, 2003

by Reene

this is a four wheeled vehicle

the rear wheels are on a short axle, but there are indeed two of them

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
N O R M A L I Z E Y O U R S E L F A N D F A C E T H E Q U E R Y P L A N N E R

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Deep Dish Fuckfest posted:

N O R M A L I Z E Y O U R S E L F A N D F A C E T O Q U E R Y P L A N N E R

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Deep Dish Fuckfest posted:

D E N O R M A L I Z E Y O U R S E L F A N D F A C E T O Q U E R Y P L A N N E R

Bloody
Mar 3, 2013

btw my database is live and extremely needs suiting and thus far the schema i designed ahead of time has adequately answered all questions and appropriately handled all desired use cases to date :)

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

did write one ugly query that had four joins in it lol

  • Locked thread