📺 Develpreneur YouTube Episode

Video + transcript

SQL Sync Part 26

2022-11-10 •Youtube

Detailed Notes

Focus for this episode: We move into trying to build our query to pull only required data in child tables. This mostly walks through some research and examples to try to build our solution.

This tutorial walks through the creation of a database synchronization tool in Python. It continues our Python and SQL Tutorials with a useful application that provides a deeper look at SQL structures and commands.

Repository For Code: git clone [email protected]:rbroadhead/dbsync.git

Transcript Text
thank you
[Music]
well hello and welcome back we are
continuing our season or series of
tutorials we're looking at now we're
sort of combining SQL in Python last
episode we started working through a
little bit of on the Fly problem solving
and we're going to continue that this
time our goal being
to be able to limit rows that are pulled
across but
to grab the related rows in those cases
because there's situations where it's
not going to be the same and of course
the rows we grab would not necessarily
be the same now last time we left off
we were able to we're going through here
and we're basically saying hey uh when
we're with this new smart empty sink
thing that we're looking at we can go
through all the root tables if they
don't have anything else we're going to
pull uh you know for example whatever
our Max rows is so if we want to pull
100 rows we'll go to our root tables and
we'll pull 100 rows of those
that's pretty easy
but then what we need to do is that
means okay now we've got to go through
the non-root tables and that we're going
to go through we go through each of
those we identify what the parents are
and then for each of those we're going
to load the parent table data before we
get down to this one
and what we can do is now this is where
it can I because what we're going to end
up doing
is we're going to find for each one so
for example here we've got two
uh references
and so this is actually going to be a
good little tricky thing to do because
what we're going to need to do for each
reference that we have
we're going to say
we're going to go to the parent
and we're going to select all the values
that are that reference value
and then we're going to use those values
to select values from the child
so it's going to look a little bit I
think it's one of those it's probably
worth doing it uh
with not automated first so let's look
here I'll show you what we're going to
go through and then we'll come back
later and we'll do the programming side
so okay so this one let's look at
uh let's see so we're going to look at
let me order by table name I want to get
a couple
um
I'd like to get a couple where it's the
same twice
um
so just hit references same table uh
I'll have to come back to that uh we'll
take a look at that specific let's start
with contract
so the contract table
references performer host and
performance
and let's go ahead and take the same one
I'm going to need all of the values
because I think that's one
where we did not we're not grabbing the
column that we need
and so for example
for contract we were we're going to uh
we're going to select some ID
from performer
because then that's where we're going to
have all of the we're going to find out
what contracts we need
and uh and it's really going to be just
a distinct
because we only need it for each one
but we need to figure out what is that
what's that ID value
and so let's go look at the where
constraint and we're going to label it
we're going to limit this a little bit
and table name equals
contract so we'll simplify what we're
doing right now
so here's our three
and the first one we're dealing with is
performer and so performer here
we can see that we have a reference
table
and we're going to be able to see
uh let's see we need to find what
it is referenced on so we're probably
going to need our constraint information
then
uh let's see so that's a referential
let's just make sure so that's catalog
schema
make sure I didn't mention it Miss it in
the update rule delete rule table name
reference table name
so I need to know what the values are
with that and so this is going to come
from
uh let's see referentials constraints
we may have to flip back over to the
code where did we find that we found
that out of
go back over here
because we did that when we built our
indexes
drop table same columns missing indexes
so we're probably going to do let's do
show indexes
let's just show indexes and I think it's
from table name
yep so if we do show indexes from
and we'll get our table which is
uh what do we say it was contract let me
move this back up so I'm sort of moving
doing all this coding in the same place
let's come up here
and let's do these okay
so I may not need that so instead I'm
going to do show indexes from contract
okay so here
I can see
a key name
and now here what you'll see is I don't
have the column I'm sorry the table
that it is uh linked to
so what I'm going to need
is I'm going to need this information
here
so I need to for example find this cons
this constraint name here
that's on performer because I've got to
figure out what is how is it linked and
so if I look at the indexes
and then I can see here I can see where
my performer is
but I don't know how to get that back to
a table
and so I'm going to need probably from
something else let's see what else have
we
found information on let's go look at
the information schema
if this may get a little bit complex
um
you let's go here
let's just go to information schema
it is show tables
because what we're going to need is
probably
let's see if we look at like
we have referential constraints
so we knew that this is on so this is
good so we do missing indexes
we were going to get it from here
so we needed to get it from the name
on table
column name oh this is an index I'm
sorry we need foreign keys
so we need
oh did we not this may be a gap did we
not get we've got indexes
and
oh it was in the table itself it was in
the create table
um
so if we go to create table
here we go
we got that information from describe
so
let's try that
so if we go here
if we just do describe contract but we
have to go back to the giganator one
here
if we go here okay
so now
see we're still Source stock because
what we're trying to figure out is here
where is our table
so
I wonder if we missed one here because
that's a primary
so primary key easy enough
but what we do need
uh that's referential constraints
and this one is referential and
constraints
uh let's see referential constraints
referential constraints
so this may be a little bit tricky
because what we need to do is rebuild
that index
and that's missing functions
procedures so we're going to have to
figure this sucker out we're gonna have
to go back here
then we're going to do a little bit of
looking around so let's go look at
actually I'm going to flip it over here
because I think I can probably so if I
go over here too
information schema
uh is he going to tell me oh it's just
going to show me views it's not going to
give me my tables okay
so let's go back over here
so I'm going to go here I'm going to
show tables
and so what I'm going to need is
probably
something so we know that it's not in
referential constraints
because if we pull everything from that
we don't see we see our schema
but we do not see I'm sorry we see our
schema
oh here we go
shoot we did have it okay my mistake I
totally missed it so
good well there you can see where we
sometimes go through stuff okay so here
what I need to do is so that was on my
left I can't believe I didn't go there
so what I need to do here is I really
need from this I need the referenced
referenced
table name
and then I need uh oh from that let me
do I need from that I need the
column so that is it so I get my table
name from there
is this going to give me my oops
uh let's go back over here
and I do not have my now I do see here
where I will see I can always go to that
column but
um wait let's go back so that's my table
name but what I need is
to figure out the how do I tie the
column to the table
that I'm creating
and so I think this is going to be it so
here I can see that I have it but I
don't have a name
um
whoop if I come jump all the way back up
here
if I do star
so I do need okay I'm sorry
not as far along as I thought I was on
this and being able to track this one
down so for example here what I need to
know I know this is performer ID but I
need to figure out how do I know that
other than I just know it here
I don't know what my column name is in
this table that ties to this uh
this constraint
so now I need to go back to
my columns
um
did I do okay
I lost it so I'm just gonna go here
and do show tables
whoop
let's have some check constraints let's
see what looks like it could be useful I
have profiling referential contains
constraints privileges
stats variables tables
let's look at tables and table
constraints
and see what those give me
so let's do
same thing but this is going to be let's
do table constraints
see if it gives me okay so here's table
constraints
and again it gives me the primary table
but it doesn't give me the column nor
the
the table in the column that's left to
and so now if I do what I say I can do
constraints let's see if this works
it's not constraints it's
uh what did I call it it was table oh
tables
let's see if tables will give me
anything
okay so it's not constraint schema
let's see if this will give me
okay
so here it just tells me what the table
is uh and this is just table level stuff
so it's not going to be tables
let's see what else I can get
so I could look at columns let's see if
columns will get me anything will it
uh let's see
because I really want so it's not table
constraints
could be index statistics
let's look at that real quick
indexed statistics
and that just gives me a table and index
name
an a schema ooh let's try that
let's say we
grab from statistics
so I may have to do a little combo here
where table name equals contract okay
oops I'm in the wrong place
am I
um
why okay
interesting okay so I don't have any
statistics so that's not the one I need
uh I'll show tables again
so let's see if I did
let's see use your variables
this may be
an nodb one so let's go look at
is there anything that looks really good
there's an index table sys fields
locks
so I think we want to go back to so we
did table constraints let's go look at
oh we did look at table constraints
didn't we uh from table
strengths
and that gives us just the name
and nothing else it gives us our foreign
key but what we don't get is we don't
get our foreign keys anywhere
so what we're going to need to do is I'm
going to step into a little more
research on this one
because what we're not finding is how to
link our table and our ID so we're sort
of there we know that from here
we're going to be able to look to it and
we're going to say here's
our parents but we need to know is what
field in our table links us to the table
there because here what we're going to
do is
[Music]
um
let's go to gigganite uh well
[Music]
we'll do it like this because what we're
going to do is we're going to do
here let's describe
kickinator.performer
and I'll show you where we're going with
this
uh
that lowercase G it's a lowercase G
okay so we're gonna want like for
example for contract
there is probably in here somewhere oh
I'm sorry contract
is
oh
which we can probably do it that way oh
wait maybe we'll just go here we just
grab the primary key so it's like oh my
mistake we just fixed it all right I
just found it so we're going to select
distinct performer ID
from oh
okay from that except
oh I'm sorry we need to do it from here
we need to we need to do it from
contract first
so my mistake
so what we want to do here if we
describe contract
maybe I'll be able to fix this
and we'll have to come back in the next
episode so this will be a cliffhanger so
we describe this
so here
yeah what we need to do is we need to
know like for example
um
uh so contract has a performer
so what we need to do for oh that's
right because this is for so contract
needs to have those performers exist
so we need to know what is the ID in the
performer table because what we're going
to need to do is we're going to do
distinct uh we're going to actually
select from
contract
we're going to select distinct performer
ID and then that
is where we're going to have to do
select
star from
kinginator performer
where
uh
where is I think it's a performer ID
here
uh from for former where
let's do this
where
performer ID in
this
and that's going to give us the records
that we need because we don't need
anything if it's not in contract
um oh
there we go so that's what we're going
to try to get to figure out how to
automate that and that's what we're
going to tackle next time around so
again we're doing a little bit of
problem solving through this but I think
it's one of those that it's useful to
see how we got here otherwise
you may get a little bit lost we start
cranking out some of the code so what
we're going to you know we know what our
goal is now what we have to do here is
create this and so in this case we know
that our table
we know this is our table name so this
is this is the current Table
and we could get this performer ID
in the select constraints
uh can't we no we can get it from uh
contract
so we may be able to find it here
but we know that this
uh let's see where so this comes from
the this is the parent
which we got from table constraints
um
oh not sorry not table constraints from
referentialing constraints
so this is the reference table name
uh so this is actually
referenced
table name and this is going to be the
primary key so we're going to so we'll
have to be able to get that
what we know that we get this
from the reference table name
here
and so what we need is we need to be
able to see where
in this constraint what is that and so
we're going to dig that up next time
apologies we're going a little long but
like I said I think the problem solving
may be useful as well it's good for us
to just sort of go back and see what we
did why we did it that being said now
let's get to it so go out there and have
yourself a great day a great week and we
will talk to you next time
foreign
Transcript Segments
10.7

thank you

18.89

[Music]

27.18

well hello and welcome back we are

29.4

continuing our season or series of

31.859

tutorials we're looking at now we're

34.26

sort of combining SQL in Python last

37.079

episode we started working through a

38.94

little bit of on the Fly problem solving

41.82

and we're going to continue that this

43.379

time our goal being

45.98

to be able to limit rows that are pulled

49.92

across but

52.16

to grab the related rows in those cases

56.579

because there's situations where it's

58.62

not going to be the same and of course

60.239

the rows we grab would not necessarily

62.52

be the same now last time we left off

66.54

we were able to we're going through here

69.78

and we're basically saying hey uh when

73.02

we're with this new smart empty sink

75.119

thing that we're looking at we can go

77.04

through all the root tables if they

78.659

don't have anything else we're going to

80.4

pull uh you know for example whatever

82.92

our Max rows is so if we want to pull

84.479

100 rows we'll go to our root tables and

87.24

we'll pull 100 rows of those

89.42

that's pretty easy

91.56

but then what we need to do is that

93.06

means okay now we've got to go through

94.56

the non-root tables and that we're going

98.52

to go through we go through each of

100.14

those we identify what the parents are

103.92

and then for each of those we're going

105.9

to load the parent table data before we

110.04

get down to this one

112.02

and what we can do is now this is where

116.52

it can I because what we're going to end

117.899

up doing

119

is we're going to find for each one so

122.28

for example here we've got two

125.759

uh references

128.399

and so this is actually going to be a

129.72

good little tricky thing to do because

131.099

what we're going to need to do for each

133.5

reference that we have

135.72

we're going to say

138.18

we're going to go to the parent

140.819

and we're going to select all the values

144.06

that are that reference value

146.94

and then we're going to use those values

150.48

to select values from the child

154.86

so it's going to look a little bit I

157.56

think it's one of those it's probably

158.58

worth doing it uh

161.36

with not automated first so let's look

164.94

here I'll show you what we're going to

166.8

go through and then we'll come back

167.76

later and we'll do the programming side

170.04

so okay so this one let's look at

175.2

uh let's see so we're going to look at

177.84

let me order by table name I want to get

179.459

a couple

181.14

um

182.519

I'd like to get a couple where it's the

185.4

same twice

188.519

um

189.98

so just hit references same table uh

193.8

I'll have to come back to that uh we'll

195.3

take a look at that specific let's start

196.56

with contract

198.42

so the contract table

201

references performer host and

204.06

performance

206.12

and let's go ahead and take the same one

209.58

I'm going to need all of the values

210.9

because I think that's one

213.54

where we did not we're not grabbing the

216.18

column that we need

220.379

and so for example

224.04

for contract we were we're going to uh

228.959

we're going to select some ID

232.08

from performer

235.739

because then that's where we're going to

237.239

have all of the we're going to find out

238.62

what contracts we need

242.06

and uh and it's really going to be just

244.98

a distinct

246.599

because we only need it for each one

249.06

but we need to figure out what is that

251.819

what's that ID value

254.159

and so let's go look at the where

257.519

constraint and we're going to label it

259.979

we're going to limit this a little bit

261.479

and table name equals

263.639

contract so we'll simplify what we're

265.86

doing right now

267.66

so here's our three

269.58

and the first one we're dealing with is

271.74

performer and so performer here

275.22

we can see that we have a reference

278.4

table

280.259

and we're going to be able to see

285

uh let's see we need to find what

290.22

it is referenced on so we're probably

293.639

going to need our constraint information

295.62

then

298.199

uh let's see so that's a referential

300.12

let's just make sure so that's catalog

301.919

schema

303.84

make sure I didn't mention it Miss it in

306.12

the update rule delete rule table name

309.44

reference table name

312.84

so I need to know what the values are

316.44

with that and so this is going to come

319.199

from

320.94

uh let's see referentials constraints

324.96

we may have to flip back over to the

326.34

code where did we find that we found

328.44

that out of

330.18

go back over here

332.46

because we did that when we built our

334.62

indexes

337.699

drop table same columns missing indexes

345.9

so we're probably going to do let's do

348.24

show indexes

351.479

let's just show indexes and I think it's

354.66

from table name

357.479

yep so if we do show indexes from

361.44

and we'll get our table which is

364.56

uh what do we say it was contract let me

367.68

move this back up so I'm sort of moving

369.3

doing all this coding in the same place

372.479

let's come up here

375.56

and let's do these okay

381.78

so I may not need that so instead I'm

385.02

going to do show indexes from contract

389.479

okay so here

391.979

I can see

395.039

a key name

397.319

and now here what you'll see is I don't

399.3

have the column I'm sorry the table

403.68

that it is uh linked to

407.52

so what I'm going to need

409.44

is I'm going to need this information

414.72

here

417.419

so I need to for example find this cons

420.18

this constraint name here

423.18

that's on performer because I've got to

425.039

figure out what is how is it linked and

428.039

so if I look at the indexes

435.36

and then I can see here I can see where

437.52

my performer is

439.199

but I don't know how to get that back to

443.4

a table

445.919

and so I'm going to need probably from

448.74

something else let's see what else have

450.3

we

451.979

found information on let's go look at

457.08

the information schema

460.199

if this may get a little bit complex

464.94

um

467.28

you let's go here

470.34

let's just go to information schema

473.22

it is show tables

476.58

because what we're going to need is

478.68

probably

482.28

let's see if we look at like

485.52

we have referential constraints

494.58

so we knew that this is on so this is

497.22

good so we do missing indexes

500.879

we were going to get it from here

509.34

so we needed to get it from the name

513.659

on table

515.94

column name oh this is an index I'm

517.8

sorry we need foreign keys

523.74

so we need

527.76

oh did we not this may be a gap did we

531.12

not get we've got indexes

535.38

and

539.58

oh it was in the table itself it was in

542.88

the create table

544.26

um

546.24

so if we go to create table

550.98

here we go

552.68

we got that information from describe

556.26

so

557.64

let's try that

559.08

so if we go here

561.72

if we just do describe contract but we

564.42

have to go back to the giganator one

566.22

here

569.94

if we go here okay

573.66

so now

576.36

see we're still Source stock because

578.16

what we're trying to figure out is here

579.42

where is our table

583.279

so

585.12

I wonder if we missed one here because

586.98

that's a primary

589.08

so primary key easy enough

592.86

but what we do need

595.44

uh that's referential constraints

601.14

and this one is referential and

604.62

constraints

610.1

uh let's see referential constraints

614.42

referential constraints

617.58

so this may be a little bit tricky

619.2

because what we need to do is rebuild

623.279

that index

627.24

and that's missing functions

630.86

procedures so we're going to have to

633.3

figure this sucker out we're gonna have

634.86

to go back here

638.58

then we're going to do a little bit of

639.779

looking around so let's go look at

642.48

actually I'm going to flip it over here

643.56

because I think I can probably so if I

646.14

go over here too

649.2

information schema

653.279

uh is he going to tell me oh it's just

655.74

going to show me views it's not going to

657.06

give me my tables okay

659.279

so let's go back over here

662.64

so I'm going to go here I'm going to

664.92

show tables

667.2

and so what I'm going to need is

669.06

probably

671.339

something so we know that it's not in

676.64

referential constraints

680.579

because if we pull everything from that

685.8

we don't see we see our schema

691.26

but we do not see I'm sorry we see our

693.779

schema

694.92

oh here we go

696.36

shoot we did have it okay my mistake I

699.839

totally missed it so

701.82

good well there you can see where we

703.74

sometimes go through stuff okay so here

706.32

what I need to do is so that was on my

708.36

left I can't believe I didn't go there

709.56

so what I need to do here is I really

711.66

need from this I need the referenced

717.32

referenced

718.86

table name

724.079

and then I need uh oh from that let me

727.14

do I need from that I need the

730.16

column so that is it so I get my table

733.019

name from there

736.92

is this going to give me my oops

739.38

uh let's go back over here

744.839

and I do not have my now I do see here

750.839

where I will see I can always go to that

753.54

column but

756.24

um wait let's go back so that's my table

758.22

name but what I need is

761.579

to figure out the how do I tie the

764.04

column to the table

766.98

that I'm creating

768.779

and so I think this is going to be it so

770.279

here I can see that I have it but I

772.32

don't have a name

775.86

um

777.42

whoop if I come jump all the way back up

780.12

here

781.56

if I do star

784.26

so I do need okay I'm sorry

786.899

not as far along as I thought I was on

788.7

this and being able to track this one

790.019

down so for example here what I need to

793.44

know I know this is performer ID but I

795.48

need to figure out how do I know that

797.04

other than I just know it here

802.62

I don't know what my column name is in

805.98

this table that ties to this uh

810.06

this constraint

812.459

so now I need to go back to

815.399

my columns

817.86

um

820.38

did I do okay

823.32

I lost it so I'm just gonna go here

826.62

and do show tables

829.98

whoop

834.6

let's have some check constraints let's

836.459

see what looks like it could be useful I

839.639

have profiling referential contains

842.76

constraints privileges

846.12

stats variables tables

849.54

let's look at tables and table

852.06

constraints

854.88

and see what those give me

858.839

so let's do

861.959

same thing but this is going to be let's

864.72

do table constraints

869.639

see if it gives me okay so here's table

871.56

constraints

873.42

and again it gives me the primary table

876.72

but it doesn't give me the column nor

878.7

the

881.339

the table in the column that's left to

883.86

and so now if I do what I say I can do

885.779

constraints let's see if this works

888.12

it's not constraints it's

894.6

uh what did I call it it was table oh

897.6

tables

899.459

let's see if tables will give me

904.38

anything

913.26

okay so it's not constraint schema

917.459

let's see if this will give me

920.22

okay

922.98

so here it just tells me what the table

925.019

is uh and this is just table level stuff

928.68

so it's not going to be tables

931.199

let's see what else I can get

937.44

so I could look at columns let's see if

939.959

columns will get me anything will it

943.22

uh let's see

947.1

because I really want so it's not table

949.5

constraints

953.279

could be index statistics

957.899

let's look at that real quick

961.76

indexed statistics

967.62

and that just gives me a table and index

970.5

name

971.88

an a schema ooh let's try that

975.06

let's say we

977.639

grab from statistics

982.079

so I may have to do a little combo here

986.36

where table name equals contract okay

990.36

oops I'm in the wrong place

993.899

am I

996.66

um

1002.74

why okay

1009.56

interesting okay so I don't have any

1011.3

statistics so that's not the one I need

1015.199

uh I'll show tables again

1024.4

so let's see if I did

1029.839

let's see use your variables

1035.6

this may be

1041.059

an nodb one so let's go look at

1046.939

is there anything that looks really good

1050.9

there's an index table sys fields

1058.1

locks

1063.02

so I think we want to go back to so we

1065.539

did table constraints let's go look at

1068.539

oh we did look at table constraints

1070.58

didn't we uh from table

1074.24

strengths

1077.059

and that gives us just the name

1080.32

and nothing else it gives us our foreign

1083.12

key but what we don't get is we don't

1085.4

get our foreign keys anywhere

1087.98

so what we're going to need to do is I'm

1089.72

going to step into a little more

1092.12

research on this one

1093.559

because what we're not finding is how to

1097.52

link our table and our ID so we're sort

1101.6

of there we know that from here

1104.66

we're going to be able to look to it and

1105.919

we're going to say here's

1107.539

our parents but we need to know is what

1111.74

field in our table links us to the table

1115.34

there because here what we're going to

1116.84

do is

1118.81

[Music]

1119.059

um

1119.96

let's go to gigganite uh well

1123.25

[Music]

1124.4

we'll do it like this because what we're

1125.72

going to do is we're going to do

1130.28

here let's describe

1134.72

kickinator.performer

1137.299

and I'll show you where we're going with

1138.74

this

1140.12

uh

1142.7

that lowercase G it's a lowercase G

1150.74

okay so we're gonna want like for

1153.74

example for contract

1156.74

there is probably in here somewhere oh

1159.919

I'm sorry contract

1163.52

is

1164.96

oh

1166.16

which we can probably do it that way oh

1167.78

wait maybe we'll just go here we just

1169.22

grab the primary key so it's like oh my

1172.16

mistake we just fixed it all right I

1173.84

just found it so we're going to select

1174.799

distinct performer ID

1177.1

from oh

1179.419

okay from that except

1184.94

oh I'm sorry we need to do it from here

1186.799

we need to we need to do it from

1188.48

contract first

1190.46

so my mistake

1193.88

so what we want to do here if we

1196.7

describe contract

1199.58

maybe I'll be able to fix this

1202.22

and we'll have to come back in the next

1203.66

episode so this will be a cliffhanger so

1205.46

we describe this

1208.1

so here

1210.14

yeah what we need to do is we need to

1211.4

know like for example

1213.44

um

1214.88

uh so contract has a performer

1217.88

so what we need to do for oh that's

1219.86

right because this is for so contract

1222.679

needs to have those performers exist

1225.559

so we need to know what is the ID in the

1227.72

performer table because what we're going

1229.1

to need to do is we're going to do

1230.539

distinct uh we're going to actually

1233.12

select from

1235.22

contract

1241.64

we're going to select distinct performer

1243.74

ID and then that

1246.74

is where we're going to have to do

1248.36

select

1250.78

star from

1253.76

kinginator performer

1259.7

where

1261.74

uh

1263.78

where is I think it's a performer ID

1265.94

here

1270.62

uh from for former where

1277.34

let's do this

1279.559

where

1281.32

performer ID in

1285.74

this

1287.24

and that's going to give us the records

1289.1

that we need because we don't need

1290.36

anything if it's not in contract

1293.419

um oh

1299.48

there we go so that's what we're going

1301.52

to try to get to figure out how to

1303.5

automate that and that's what we're

1305.059

going to tackle next time around so

1306.76

again we're doing a little bit of

1308.84

problem solving through this but I think

1310.34

it's one of those that it's useful to

1312.32

see how we got here otherwise

1315.52

you may get a little bit lost we start

1317.659

cranking out some of the code so what

1319.82

we're going to you know we know what our

1321.2

goal is now what we have to do here is

1324.2

create this and so in this case we know

1327.26

that our table

1329.6

we know this is our table name so this

1332.44

is this is the current Table

1337.039

and we could get this performer ID

1342.4

in the select constraints

1347.179

uh can't we no we can get it from uh

1352.88

contract

1355.039

so we may be able to find it here

1358.52

but we know that this

1361.52

uh let's see where so this comes from

1364.52

the this is the parent

1368.12

which we got from table constraints

1373.4

um

1374.24

oh not sorry not table constraints from

1376.28

referentialing constraints

1379.34

so this is the reference table name

1382.059

uh so this is actually

1387.62

referenced

1390.44

table name and this is going to be the

1392.9

primary key so we're going to so we'll

1394.94

have to be able to get that

1397.159

what we know that we get this

1400.34

from the reference table name

1402.44

here

1404.059

and so what we need is we need to be

1406.22

able to see where

1407.96

in this constraint what is that and so

1410.179

we're going to dig that up next time

1411.76

apologies we're going a little long but

1413.78

like I said I think the problem solving

1415.58

may be useful as well it's good for us

1417.74

to just sort of go back and see what we

1419.9

did why we did it that being said now

1422.419

let's get to it so go out there and have

1423.799

yourself a great day a great week and we

1426.5

will talk to you next time

1429.679

foreign