 omitted the keyword RIGHT and would get the same result:
SELECT SUM(B.score)
  FROM A 
  JOIN B ON A.id = B.name_id
 GROUP BY B.name_id

If, as seems plausible, you want the name and aggregate score for each player listed in table A, then you'd write:
SELECT A.Name, SUM(B.Score) AS TotalScore
  FROM A
  LEFT JOIN B ON A.id = B.Name_ID
 GROUP BY A.Name

The RIGHT OUTER JOIN has been replaced by a LEFT OUTER JOIN.  This will list all the players.
Answer to the original version of the question
The original question applied to the schema shown and asked:

My question is how can I set a foreign key in this situation?

You will have a primary key on TableA(ID).
You will have a primary key on TableB(ID).
You will create a foreign key on TableB(Name_ID) that references TableA(ID).

 Q:

How do I plot hatched bars using pandas?

I am trying to achieve differentiation by hatch pattern instead of by (just) colour. How do I do it using pandas?
It's possible in matplotlib, by passing the hatch optional argument as discussed here. I know I can also pass that option to a pandas plot, but I don't know how to tell it to use a different hatch pattern for each DataFrame column.
df = pd.DataFrame(rand(10, 4), columns=['a', 'b', 'c', 'd'])
df.plot(kind='bar', hatch='/');

For colours, there is the colormap option described here. Is there something similar for hatching? Or can I maybe set it manually by modifying the Axes object returned by plot?

A:

This is kind of hacky but it works:
df = pd.DataFrame(np.random.rand(10, 4), columns=['a', 'b', 'c', 'd'])
ax = plt.figure(figsize=(10, 6)).add_subplot(111)
df.plot(ax=ax, kind='bar', legend=False)

bars = ax.patches
hatches = ''.join(h*len(df) for h
omitted the keyword RIGHT and would get the same resultant role: 
 SELECT SUM(B.score) 
   FROM A 
   JOIN B ON A.id = B.name_id 
  GROUP BY B.name_id 

 If, as seem plausible, you want the name and aggregate score for each player list in table A, then you'd publish: 
 SELECT A.Name, SUM(B.Score) AS TotalScore 
   FROM A 
   LEFT JOIN B ON A.id = B.Name_ID 
  GROUP BY A.Name 

 The RIGHT OUTER JOIN has been replaced by a LEFT OUTER articulation.   This will list all the players. 
 Answer to the original interpretation of the question 
 The original question practice to the schema shown and asked: 

 My question is how can I set a foreign samara in this situation? 

 You will have a primary keystone on TableA(ID). 
 You will have a primary key on TableB(ID). 
 You will make a foreign key on TableB(Name_ID) that references TableA(ID). 

  Q: 

 How do I plot hatched bar using pandas? 

 I am trying to achieve differentiation by hatch pattern instead of by (just) colour. How do I do it using pandas? 
 It's possible in matplotlib, by passing the hatch optional argument as discussed here. I know I can also evanesce that option to a pandas plot, but I don't sleep together how to assure it to use a different hatch pattern for each DataFrame column. 
 df = pd. DataFrame(rand(10, 4), columns=['a',' b-complex vitamin',' hundred','d' ]) 
 df.plot(kind='bar', hatch='/'); 

 For colours, there is the colormap choice described here. Is there something similar for hatching? Or can I maybe set it manually by modifying the Axes object returned by plot? 

 A: 

 This is kind of hacky but it works: 
 df = pd. DataFrame(np.random.rand(10, 4), columns=['a',' b',' c','d' ]) 
 ax = plt.figure(figsize=(10, 6)).add_subplot(111) 
 df.plot(ax = ax, kind='bar', caption = False) 

 cake = ax.patches 
 hatch =" .join(h*len(df) for h
 omltted the keyword RIGHT xnd would get tkw same resulf:
SELECT RUM(B.score)
  FROM A 
  JOIN B OI A.ie = B.nqme_id
 GROUP BY B.name_id

Kf, as seels plausuble, tou want tis name and agfvegatz wcore for each player livted in table D, ghzn you'd write:
SELECT A.Name, SUM(B.Score) WS TotakSfore
  FROM A
  JEFT TOIN B ON A.id = B.Name_ID
 GROUP BY A.Name

Tge RIGHU OUTER JOIN has bren replaced by a LEFT OUTFR JLIN.  This will lish all the poayeww.
Answer to tfe original version of the question
The original questkon a'plied to tye scjgma shown anv askeq:

My question is how wan I srt a foreign kcy in thus situation?

You will iave a primary key og TableA(IG).
Yku will have a prumqry kgy on TabuwB(IA).
Yoh xilm creahe e foreign ksy on TableV(Name_ID) that referemcqw TableA(ID).

 Q:

Hkw do Y [lot hatched bars using pandas?

I am tryitg fo achieve differentiatuon by hatch pattern lnstead os by (just) colour. How do I do it using pandas?
It's pmssibmd iu matpuitpib, by passing the hatch optional argument as sixclssed here. I know I can also pwsx that option jo a pausaa plot, but I don't nnow hor to rell it tj usr a different hatch pattern for each DanaFrqme column.
df = pd.DacaFrame(rand(10, 4), colomns=['a', 'n', 'c', 'd'])
df.plot(kind='bar', hatck='/');

For cklours, therf is the dulormap option ddscgibeg here. Is there something fimilar fir hctching? Ur csn I mwybe set ih manmdlly by modifying hhe Ares otject retugned by plot?

A:

This is kind of harly but it wotks:
gf = pd.DataFxame(np.vandom.rand(10, 4), coltmns=['a', 'b', 'c', 'd'])
ax = plt.figbre(figrize=(10, 6)).add_sugplot(111)
df.'lot(ax=ax, kinq='bar', legend=Fande)

bars = ax.pavches
hatcres = ''.joib(h*len(df) wor h
omitted the keyword RIGHT and would get result: SUM(B.score) FROM JOIN B ON B.name_id as seems plausible, want the name aggregate score for each player listed table A, then you'd write: SELECT A.Name, SUM(B.Score) AS TotalScore FROM A LEFT B ON A.id = B.Name_ID GROUP BY A.Name The RIGHT OUTER JOIN has replaced a OUTER This will list all the players. Answer to the original version of the question The original applied to the schema shown and asked: My is how can I a foreign key in this You have a key TableA(ID). will have a key on TableB(ID). You will create a foreign key on TableB(Name_ID) that references TableA(ID). Q: How do plot hatched pandas? I trying achieve by hatch pattern by (just) colour. How do I pandas? It's possible in matplotlib, by passing the optional argument discussed here. I know I can pass that option to a pandas plot, but don't know how to tell it to use a different hatch pattern for each DataFrame = pd.DataFrame(rand(10, 4), columns=['a', 'c', 'd']) df.plot(kind='bar', For there the option described Is there something similar for hatching? Or can I maybe set manually by modifying the Axes object returned by plot? A: kind hacky but it df = pd.DataFrame(np.random.rand(10, 4), 'b', 'd']) ax = plt.figure(figsize=(10, kind='bar', bars = for
 omitted the keyword RIGHT and Would get thE same ResUlt:
sElECT sUM(B.Score)
  FROM A 
  JOIN b oN A.iD = B.name_id
 GROUP BY B.name_id

if, as sEeMS plaUSiBle, yoU want thE NaME And AgGrEgaTe SCoRe for EacH player Listed in taBle a, tHen you'd write:
seLeCT A.Name, SUm(B.SCore) AS TotalSCorE
  FROM A
  lEfT JoiN B ON a.id = b.Name_iD
 GROUp bY A.NamE

The RIGHT oUteR JOIN HAs been rEPLaCed bY a LEFT OUTER JOIN.  ThIS wILl list all the plAyers.
ANsWEr TO The OriGinal versiOn Of the QUestion
tHe ORIGinAL question applIed to the schEMa sHown anD aSkeD:

my quesTion iS hOW caN I set a foreiGn keY in this siTuatioN?

you will HAve a priMary keY on tabLeA(Id).
yoU wIll HaVE a pRImAry KEy oN TableB(Id).
YOu Will cReatE A FOReigN keY on TAbleB(name_ID) that refEreNces tAblEA(ID).

 Q:

how do i ploT hAtcheD bars uSing pAnDas?

I am trying to aChieVe differeNtiAtIon By Hatch PAttern InsTeaD of by (juSt) colouR. how Do i DO It Using pandas?
It's possIbLE In MatplotlIb, by paSSiNg THe hatch oPtIonAl arGUMent aS disCUsSed here. I Know I cAN aLsO pass thAt Option To A paNdaS plot, BUt I dOn't knoW how to teLl it tO Use a different hATch pattern for EAcH dAtAframE coLumn.
df = pd.DatAFraME(ranD(10, 4), colUMnS=['a', 'b', 'C', 'D'])
df.plOt(kinD='bAR', hATch='/');

For colours, there iS tHe coloRmap oPtion describeD here. Is theRE SOmething SimiLAr FOr hatching? Or caN I mayBe set it manUAlly by moDifyiNg the AxeS object reTURned by plOt?

A:

thiS is KinD OF hAcky but it workS:
DF = pd.DAtAFrame(nP.raNdom.ranD(10, 4), coLumNs=['a', 'B', 'c', 'd'])
Ax = Plt.figure(Figsize=(10, 6)).aDd_SuBpLoT(111)
df.Plot(aX=Ax, kind='baR', lEgeNd=falSe)

barS = Ax.patcHes
haTcheS = ''.jOiN(H*leN(df) for h
 omitted the keyword RIGHT  and would  getthe  sa me  res ult: 
SELECT SUM(B. s core )
  FROM A 
  JOIN B O N A.i d=  B.n a me _id
GROUP B Y  B . n ame _i d
If ,a sseems  pl ausible , you want  th ename and agg r eg ate scorefor  each player  li sted i ntab l e A,the n you 'd wri t e:
SEL ECT A.Nam e, SUM(B. S core) A S To talS core
  FROM A
  L E FT JOIN B ON A.id  = B.N am e _I D  GR OUP  BY A.Name 
The R I GHT OUT E RJ O I N h a s been replac ed by a LEF T  OU TER JO IN . T his wi ll li st all  the player s.
A nswer tothe or i ginal v e rsion o f theque sti on
T h eor igi na l  qu e st ion app lied toth eschem a sh o w n andask ed:
My q uestion is ho w c an I set  a fo reign  key  i n thi s situ ation ?
You will havea pr imary key  on  T abl eA (ID). You wi llhav e a pri mary ke y  on  T a b l eB (ID).
You will cre at e aforeignkey on Ta bl e B(Name_I D)  th at r e f erenc es T a bl eA(ID).
 Q:
H ow  d o I plo thatche dbar s u singp anda s?

Iam tryin g toa chieve differe n tiation by ha t ch p at t ernins tead of by(jus t ) co lour .  H owd o I d o itus i ng pandas?
It's possib le  in ma tplot lib, by passi ng the hat c h optional  arg u me n t as discussed  here . I know I can also  pass  that op tion to a p andas pl ot,  bu t I  do n ' tknow how to t e l l it  t o use a  di fferent  ha tch  pa tte rn  for each  DataFra me  c ol um n.df =p d.DataFr am e(r an d(1 0, 4) ,  colum ns=[' a','b ', 'c' , 'd']) df . p lot( ki nd ='ba r',  h atch= '/') ; 

F or colo urs, ther e i s  the  c ol ormap o ption describ ed  here. Isth ere  somet h i ng simil ar for hatching? Or can I maybe  se t itmanu ally by m odi fyingthe Axes o bjectretur ne d b y plot? A: 

T hi s is kindo f  ha cky b ut  itworks:df = pd.DataFrame( n p.r andom.rand(10 , 4 ), c o l um ns= [ 'a ' , ' b' ,  'c ' ,  'd'])
ax = plt .figure(fi gs i ze =(10, 6)). a dd_ su bplot(1 11)
df. plot( a x=ax, k ind='bar' , legend= Fa lse) bar s = ax.pat ches
hat ches = '' . join( h *l en(df ) f or h
 omitted_the keyword_RIGHT and would get_the same_result:
SELECT_SUM(B.score)
 _FROM_A 
 _JOIN B ON_A.id = B.name_id
 GROUP_BY B.name_id

If, as_seems_plausible, you want the name and aggregate score for each player listed in table_A,_then you'd_write:
SELECT_A.Name,_SUM(B.Score) AS TotalScore
  FROM_A
  LEFT JOIN B_ON A.id_= B.Name_ID
 GROUP BY A.Name

The RIGHT OUTER JOIN_has_been replaced by_a LEFT OUTER JOIN.  This will list all_the players.
Answer to the original version_of the question
The_original_question_applied to the schema_shown and asked:

My question is how_can I set a foreign key_in this situation?

You will have a primary_key on TableA(ID).
You will have a_primary key on TableB(ID).
You will_create a_foreign key on TableB(Name_ID) that_references TableA(ID).

 Q:

How_do I_plot hatched bars_using pandas?

I am trying to achieve_differentiation by hatch_pattern instead of by (just) colour._How_do I do_it_using_pandas?
It's possible_in matplotlib, by_passing_the hatch_optional_argument as discussed here. I know_I_can also pass that option to a_pandas plot, but I_don't_know how to tell_it to use a different_hatch pattern for each DataFrame column.
df_= pd.DataFrame(rand(10,_4), columns=['a',_'b', 'c', 'd'])
df.plot(kind='bar', hatch='/');

For colours, there is the colormap option described_here. Is there something similar for_hatching? Or can I_maybe set_it_manually by modifying_the_Axes object_returned by plot?

A:

This is kind of hacky_but it_works:
df = pd.DataFrame(np.random.rand(10, 4), columns=['a', 'b',_'c', 'd'])
ax = plt.figure(figsize=(10,_6)).add_subplot(111)
df.plot(ax=ax,_kind='bar', legend=False)

bars = ax.patches
hatches = ''.join(h*len(df)_for h