Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Multiple categories for items

Name: Anonymous 2008-04-20 15:20

i've seen a lot of different solutions for this and i'm wondering what /prog/ uses

when you have items in a database and each item needs to be able to belong to multiple categories, so obviously you have a column for categories, or in some cases even a table in it's own lol, but how do you encode the values of each items parent categories?

i've been leaning mostly towards serializing it but maybe there's a better way that i'm missing

Name: Anonymous 2008-04-20 15:26

Use three tables:

* Object
* Categories
* Object-Category relationships

WARNING: This is not Enterprise-ready.

Name: Anonymous 2008-04-20 15:26

>>1
Sorry, but I don't find your post interesting

Name: Anonymous 2008-04-20 15:38

Use 12 tables:

- Objects
- Object Managers
- Object - Object Manager relationships
- Customers
- Object - Customer relationships
- Suppliers
- Categories
- Category Factories
- Category Factory - Supplier relationships
- Customer - Supplier relationships
- Strategies
- Object - Strategy relationships

WARNING: This is Enterprise-ready.

Name: Anonymous 2008-04-20 16:05

I'd use the factory classes pattern.

Name: Anonymous 2008-04-20 16:11


I guess I'll have to shut you down for good this time,
Already tried a SIGQUIT, so now it's KILL DASH 9.
You gotta learn when it's time for your thread to yield;
It shoulda slept; instead you stepped and now your fate is sealed.
I'll take your process off the run queue without even asking
'Cause my flow is like reentrant and preemptive multitasking.
Your sad rhymes are spinnin' like you're in a deadlock,
You're like a synchronous sock that don't know when to block;
So I pull out my keyboard and I pull out my glock,
And I dismount your girl and I mount /proc
And I've got your fuckin pid and the bottom line
Is that you best not front or else it's KILL DASH NINE.

KILL DASH NINE,
No more CPU time.
I run KILL DASH NINE,
And your process is mine.
I run KILL DASH NINE,
'Cause it's MY time to shine
So don't step outta line or else it's
KILL DASH NINE!

See it ain't about the Benjamins or Pentiums or Athlons,
But you rappin' 50 meters while I'm spittin' in decathlons.
Your shit's old and busted, mine's the new hotness;
You're like CLR and I'm like CLRS.
You're running csh and my shell is bash,
You're the tertiary storage; I'm the L1 cache.
I'm a web crawling spider; you an Internet mosquito;
You thought the 7-layer model referred to a burrito.
You're a dialup connection; I'm a gigabit LAN.
I last a mythical man-month; you a one-minute man.
It's like I'm running Thunderbird and you're still stuck with Pine,
Which is why I think it's time for me to KILL DASH NINE.

Yeah it's KILL DASH NINE
No more CPU time.
'Cause it's KILL DASH NINE,
And your process is mine.
I said KILL DASH NINE
'Cause it's my time to shine,
So don't step outta line or else it's
KILL DASH NINE!

My posse throws down like leaky bucket regulators;
I was coding shit in MIPS while you were playing Space Invaders.
With my finger on the trigger I run ./configure
Yo, this package is big, but MY package is bigger.
I roll my weed with Zig Zag while I zag-zig splay,
And I do a bounds check before I write to an array.
I'm a loc'd out baller writing KLOCS a day,
'Cause it's publish or perish, fool, what can I say?
I'm 26 now, will I live to see 28?
Some days I wonder if I'll survive to graduate.
But hey, that's just fine, I won't ever resign,
And if fools try to step then it's KILL DASH NINE!

Yeah it's KILL DASH NINE,
From my command line
It's KILL DASH NINE
Sending chills down your spine,
I said KILL DASH NINE,
'Cause it's my time to shine,
So don't step outta line or else it's
KILL DASH NINE!

fs sa rlidwka
I'll chown your home and take your access away
Comin' straight outta Stanford, ain't nobody tougher,
Control-X, Control-C, I'll discard your fuckin' buffer.
You're outside your scope, son, close them curly brackets,
'Cause I drop punk-ass bitches like a modem drops packets.
Dump your motherfucking core, and trace your stack
'Cause where your ass is going, there won't be no callback.
See my style is divine and my code is sublime,
My career's in a climb and yours is in a decline.
I'll write a pound-define and assign you as mine,
So refine those sad rhymes or remove your plus signs,

Or it's KILL DASH NINE,
No more CPU time,
'Cause it's KILL DASH NINE,
And your process is mine,
I said KILL DASH NINE
'Cause it's my time to shine,
Bitch you stepped outta line and now it's
KILL DASH NINE!

Name: Anonymous 2008-04-20 16:17

>>4
Nonono, for Enterprise-ready Certification you'll need some stored procedures, temporary tables, and all the data in a single table with a million columns.

Name: Anonymous 2008-04-20 16:50

yeah i guess the three table approach isn't so bad, i'll go with that

Name: Anonymous 2008-04-20 16:56

Expressions evaluate to some value without changing any state. This is a nice property of Haskell, because it makes reasoning about programs easier and programs are very robust.

Name: Anonymous 2008-04-20 17:07

/prog/, you're fucking useless.

Name: Anonymous 2008-04-20 20:15

>>6
car car car car cdr cdr cdr cdr car cdr eval apply

Name: Anonymous 2008-04-20 23:45

>>11
(eval (sage '1208718983))

Name: Anonymous 2008-04-21 6:54

wow now i'm not the one to make note of this because i've used /prog/ for so long and just looked through all the trolling and bullshit, but srsly gais

it used to be that you could ask a serious question here and you would get trolled but not THIS much, now it's just like someone is running automatic bots on the site posting random memes in every thread

Name: Anonymous 2008-04-21 7:09

>>13
What the fuck are you talking about? There's really only one reasonable way to do what >>1 wants, and it was provided by >>2. If you want discussion on why that's the best solution, then it's another story.

Thread has been over for a long time.

Name: Anonymous 2008-04-21 7:35

Hi, I'm here to collect the beet toll.

Name: Anonymous 2008-04-21 9:06

>>15
Memes have advantages as well; take beet toll: it came to be as ``beet trolled'' a simple typo. Now I double-check everything I write, just to be sure not to create another meme.

Name: Anonymous 2008-04-21 9:32

>>16
EXPERT DVORAK TYPIST

Name: Anonymous 2008-04-21 9:47

>>1
What do you mean by parent categories? Have you a tree of categories that you need to analyse, as well as apply the leaves of this tree to items?

Name: Anonymous 2008-04-21 9:53

>>17
Wrong.

Name: Anonymous 2008-04-21 12:10

>>3-7,9-19
YHBT by me (>>2).

Name: Anonymous 2008-04-21 12:14

>>20
That's not trolling.

Name: Anonymous 2008-04-21 14:19

>>21
Yes it is, replying seriously when the point of /prog/ is to post stupid memes and spam shit is actually a troll.

Name: Anonymous 2008-04-21 14:22

>>22
No, it's not.

Name: Anonymous 2008-04-21 14:37

>>23
You are trolling me, please stop or I will rage.

Name: Anonymous 2008-04-21 14:40

>>20-24
Same person.

Name: Anonymous 2008-04-21 14:43

>>25
ergo your wrong biotech

Name: Anonymous 2008-04-21 15:19

>>26
[m]back to the simic combine, please[/code]

Name: Anonymous 2009-03-06 13:27


Time which you seem to imply that   modified GPL code   is considered GPL   code that section   does not imply   make a modification   to Foobar and   therefore your modifications   to a GPL   code base distributed   on their own   semen smeared over!

Name: Anonymous 2011-02-04 12:36

Name: Sgt.Kabukiman 2012-05-22 23:10

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: Anonymous 2013-01-19 14:39

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List