« first day (1068 days earlier)
← previous day
next day →
last day (1590 days later) »
TehShrike
03:16
@user2688108 As the topic says,
Ask your question, and then hang around a while to see if an expert looks back at their screen and answers it!
@indago Cool, looks like you got a good answer!
4 hours later…
Kanwar
07:33
Anybody having knwoledge for SSRS or is there any other room please can u give me the link
3 hours later…
indago
10:41
@TehShrike yes thanks,if you have any suggestions please feel free to add you version of the answer or any performance changes, i will be glad to hear your view
4 hours later…
ChrisForrence
14:35
Ohayou! I've kicking around a notification table schema, and I need another pair of eyes for it
user2688108
ok, sorry im newbie in chat. The question is that:
stackoverflow.com/questions/21608619/…
Thanks everybody
ChrisForrence
Hmm
I'm trying to understand what you're asking
user2688108
Oh
i can explain you more
if you want
My gold is create a text cell, that only allows values from other column of other table
for example: i have a column employee_areas:
and a column areas (in other table)
i want to put one or more areas in employee
ChrisForrence
Ah, and the value in 'areas' has to match 'name' in the table 'areas'?
user2688108
but only allow current existing areas
exactly
ChrisForrence
14:40
Ok
user2688108
but the employee can be in more than one areas
that's the problem
at same time
then i don't know if i can do it with mysql only, or i need to use my program layer
ChrisForrence
But that's fine; and you've got rows in your employee_areas table for each combination of employee and area?
user2688108
no no
employee areas
is a column
in employee
ChrisForrence
Oh. Why?
Or basically, here's what I'd do
user2688108
yes
tell me please
ChrisForrence
14:43
I'd remove that column from
employees
, then create a table
employee_areas
with two columns:
employee_id
and
area_id
user2688108
and then?
ChrisForrence
In that
employee_areas
table, you'd have your primary key be (
employee_id
,
area_id
)
user2688108
both?
ChrisForrence
Yep
(You can do that)
user2688108
ok
but...
ChrisForrence
14:44
Then you'd have two
foreign key
constraints
user2688108
if i put employee_id like PK
i can't put
more than one
value
with
ChrisForrence
That's why you have it be a paired primary key
user2688108
the same employee_Id
oohh
ChrisForrence
Literally, the line would be `PRIMARY KEY('employee_id','area_id')
user2688108
ooh
ChrisForrence
14:46
And that would prevent duplicate entries of '2,3' and '2,3', for example
user2688108
oh
ChrisForrence
'2,4', '2,5' would be alright (if an employee was part of multiple areas
user2688108
yep
oh, i didn't realised that
ChrisForrence
Yep
user2688108
i'm very new in mysql programming
oh
thank you
ChrisForrence
14:47
I can tell! It's alright; I've been doing this for a couple of years ;)
user2688108
thanks
a lot of thanks
you save my life
haha
bye
ChrisForrence
Take it easy, good luck with your school project
5 hours later…
Anton_Sh
19:31
is it a right place to ask something about doctrine?
4 hours later…
compguy24
23:09
trying to select x from y WHERE x only = a, AND NOTHING ELSE
« first day (1068 days earlier)
← previous day
next day →
last day (1590 days later) »
all rooms
Transcript for
Feb
6
Feb '14
7
Feb
8
MySQL and relational databases
Ask your question, and then hang around a while to see if an e...
mysql
rdbms
sql
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile