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
Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



if it interfaces with the db, it is db code. put the entire application in the database

Adbot
ADBOT LOVES YOU

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

i don't know anything about stored procedures :smith:

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

our databases don't appear to have any though??

Valeyard
Mar 30, 2012


Grimey Drawer
Object Relational Manager's ftw

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
it's just a sql query that you save and then instead of writing "select * from Butts" you can call it like "getAllButts"

obv you usually do this with slightly more complex queries and pass in parameters just like a function call

Shaggar
Apr 26, 2006

because it is part of the database schema, not part of your application.

Shaggar
Apr 26, 2006

Elder Postsman posted:

our databases don't appear to have any though??

fail

Shaggar
Apr 26, 2006
stored procs are a translation layer between your application and the database. they are dependent on the database, not on the application so they belong in the database.

Valeyard
Mar 30, 2012


Grimey Drawer
Django handles it really well

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Bloody posted:

getting them into and out of the database is such a mess

i have to hit like four different tables to get all the crap out

*gentle chuckle*

Shaggar posted:

database code belongs in the database, not in your application.

yeah

but if it's code that generates an object for your application it's not purely database code and doesn't necessarily belong only in the database

Shaggar
Apr 26, 2006
yes it does because it cant exist outside the database. like you cant move the sql to another db server and have it work unless all the other schema comes with it.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

Plastic Snake posted:

it's just a sql query that you save and then instead of writing "select * from Butts" you can call it like "getAllButts"

obv you usually do this with slightly more complex queries and pass in parameters just like a function call

thanks for this helpful and informative post.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"


we are moving away from mysql to sqlserver and uh either mongo (ugh) or cassandra (???) so that will prob change

Shaggar
Apr 26, 2006
procs arent common in mysql cause amateur databases breed amateur designs

DimpledChad
May 14, 2002
Rigging elections since '87.

lol

GNU Order
Feb 28, 2011

That's a paddlin'

I started reading RFC1855 on Netiquitte instead of writing bad code. it's amazing


"A good rule of thumb: be conservative in what you send and liberal in what you receive. You should not send heated messages (we call these "flames") even if you are provoked. On the other hand, you shouldn't be surprised if you get flamed and it's not prudent to respond to flames.

In general, most people who use the Internet don't have time to answer general questions about the Internet and its workings. Don't send unsolicited mail asking for information to people whose names you might have seen in RFCs or on mailing lists.

GNU Order
Feb 28, 2011

That's a paddlin'

Wait overnight to send emotional responses to messages. If you really have strong feelings about a subject, indicate it via FLAME ON/OFF enclosures.


FLAME ON

distortion park
Apr 25, 2011


today i learnt that regular expressions are not actually regular in most cases

DimpledChad
May 14, 2002
Rigging elections since '87.
i give all my expressions metamucil

Luigi Thirty
Apr 30, 2006

Emergency confection port.

yase at last someone was impressed by my internet hat resume and wants code samples and they're not an hour away everything's coming up milhouse

gonadic io
Feb 16, 2011

>>=

pointsofdata posted:

today i learnt that regular expressions are not actually regular in most cases

with recursion and groups and stuff etc you can parse xml with them

Moist von Lipwig
Oct 28, 2006

by FactsAreUseless
Tortured By Flan

Luigi Thirty posted:

internet hat resume

???

?!?!?

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Elder Postsman posted:

we are moving away from mysql to sqlserver and uh either mongo (ugh) or cassandra (???) so that will prob change

ok, sqlserver is actually a legit sql db

use cassandra, lmao @ mongo

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

Luigi Thirty posted:

yase at last someone was impressed by my internet hat resume and wants code samples and they're not an hour away everything's coming up milhouse
:allears:

Luigi Thirty
Apr 30, 2006

Emergency confection port.


I don't have work experience so my resume is all projects I've done and one of them was that Internet hats site that got a million hits in 2 years

Moist von Lipwig
Oct 28, 2006

by FactsAreUseless
Tortured By Flan
ohhhh right, that makes sense

Workaday Wizard
Oct 23, 2009

by Pragmatica
godspeed luigi

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

pointsofdata posted:

today i learnt that regular expressions are not actually regular in most cases

i friggin hate regex but it is Really Useful

Valeyard
Mar 30, 2012


Grimey Drawer
im sorry for this terrible code,
code:
lines = [( v, vd_vartype (fromJust (H.lookup v ocl_args)) , vd_argmode (fromJust (H.lookup v ocl_args)), fst(s) ) | v <- arg_names, s <- sizeDeclsZipped, snd(s) == v]

distortion park
Apr 25, 2011


Elder Postsman posted:

i friggin hate regex but it is Really Useful

it spices things up a bit for sure

gonadic io
Feb 16, 2011

>>=

:argh:

also do '(s, d) <- sizeDeclsZipped' rather than using fst and snd

gonadic io
Feb 16, 2011

>>=
also you've consistently done no error checking whatsoever, are you just assuming for the purposes of the assignment that all fortran code is valid?

Valeyard
Mar 30, 2012


Grimey Drawer

AlsoD posted:

also you've consistently done no error checking whatsoever, are you just assuming for the purposes of the assignment that all fortran code is valid?

yup! and i can also luckily assume that the attributes in the fortran variable declarations follow a strict order

AlsoD posted:

:argh:

also do '(s, d) <- sizeDeclsZipped' rather than using fst and snd

ok that makes more sense, thanks

e: lectuer said this exercise is going to be marked purely by how many unit tests it passes, and I am pretty sure thats because he knows he is going to get a pile of unreadable mess

Valeyard fucked around with this message at 23:52 on Nov 21, 2014

Deacon of Delicious
Aug 20, 2007

I bet the twist ending is Dracula's dick-babies
what are good resources for learning how to database. something more in depth than just SQLzoo. something where I'd work with postgre, or with theory so I wouldn't even need a specific SQL implementation

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



i thought the one we used in my db class was p good but i cant for the life of me remember what its called

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



a very helpful post if i do say so myself

Deacon of Delicious
Aug 20, 2007

I bet the twist ending is Dracula's dick-babies

Snapchat A Titty posted:

a very helpful post if i do say so myself

well now I know a helpful resource exists, so your post has given me the most important thing: *~hope~*

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Lord Of Texas posted:

I guess part of it depends on your setup - if you as a developer have full control over your database AND it rarely changes AND your codebase is small, then just do whatever. Where I'm at, due to decisions out of my control my app is sharing a database which changes frequently so maintaining hundreds of stored procs that change frequently via Liquibase as opposed to in SVN would be a loving nightmare.

(also Liquibase does not handle stored procs particularly well anyway, I've heard Datical does a better job but we're still on the open source LB)


Unless you're in a land where you hand a database to end users, the line drawn between database code and application code is pretty much irrelevant, put it where it's the most maintainable (in traditional VC.) It's like shoving all of your validation into your presentation because "that's where it belongs!!!", then you end up with an untestable (by anything but manual tests or Selenium) unmaintainable mess.


I don't see "sproc" much but goddamn "parm" is obnoxious. Type the stupid extra a

What in the heck is liquibase

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I remember in high school we used this computer based oracle training system that was all flash animations

Adbot
ADBOT LOVES YOU

jesus WEP
Oct 17, 2004


Deacon of Delicious posted:

well now I know a helpful resource exists, so your post has given me the most important thing: *~hope~*
i still have my course notes and materials from the db course i took a while back if you give me an email address

  • Locked thread