hello i'm ok taxes 2013 she two rooms this video I'm gonna be talking you
through
multi-table queries to gonna play along follow the link below the video to the
down a section a website and download
axis 2013 TVs are seven an open it up
just like me a great group
but what we're gonna do okay mostly work where you are
poll also similar to queries and we create query rooms
sorted ascending but remember that causes that have one table
and always able Crary is a query where you use more than one table
and multi-table and why do you need them
I'm well if we take a look
Anna are table who for booking details
10 I'm
if you have a table booking details and table rooms
you can see that they're linked by
this field here which is the remind the foreign key no love the
numbers here correspond to numbers in this
I'm table here and the reason we've broken down it's two tables instead of
having
the room numbers shown here is I
because if balkan normalization if you don't normalization is go back a few
videos
a couple videos and check that one out with the ideas are often have
one enormous table has all the patroness
really unwieldy in yo la serpiente de ti break it down into
discrete truck today to and but what we can do that having broken down as we can
use queries to put it back together again
so for example if shocked close another know why
before when it's actually see this
the said if seeing 123 123 for for
the numbers I wanted to see the actual number I can do that using the query
I will show you how are now so you go to create
and your query design and here we choose the tables we were
so we're gonna choose table booking details and table rooms
from personal control parts of my life I for them click at
now because the two tables
already have a already related a room I T in Ramadi FK
you ready Craigslist join for us which is really useful
in all we do for it thank every single record and the DoubleClick in
with the field so not records from table booking details we have a table rooms
for second in our runner
I'm I just pretty much get the same as stay working details
ice get the numbers if I take al
remind tsk and I track over room number
now when I run a I'm exactly the same table which is
booking details bar I have
room number is so the room I D which is for me better to see
so what I've done using this query is i've
taken two entities are split down enough so put back together again
and that's kinda why we use multi table query so that we can reconstitute
data into information it's useful for us so it kind of
I it's the bit where once we normalize we put it all back together again so
it's
popular with a magic trick is a look exactly the same as
if you just a single table with room numbers and booking details
by actually follows the rules normalization I so much better data
model
and makes everything whose dis but the better way of creating a database
at now question Christian Christian Christian
and when you create a most same query like this
I have the moment I said I've taken
room ID out not in room number I would
just moms make his point I would do something like this for report but for
wanted to create a
report because I save them a quick query testimony
in closer for cooking query test
and I create I report now obviously haven't started to
Burke when of not having crazy the report you can see that I've got all the
information about the booking details but also got the room number now which
is
why wanna see other wanna see 1234
87 so doesn't mean anything to me if you're creating
report no close to
let you know a close early like to ukraine report this
wave a.m. having the two tables
and then dropping a disorder related
I'm a tribute from the other table linens case for number is great for
reports
if ukraine form and I'm
would you do this with you
crop room number in there or would you stick room I T
we first thought would be actually are the room number cuz on creating a former
want to actually see
number the room is no good to me to see one two three four and the
I D keys but actually
we closed our what's click on table booking details
and I create form
now missus a moving away from over tailhook responders
resume explaining this I just want you to know so when
used in I'm and
like I said one of them is if ukraine report you definitely to mod table query
if you just basing I E form of a
table I view myself base of a query for example you might want to sort it but
you don't have to and doesn't actually three mo table because if I go to worse
Israel mighty
working do I'm seeing the one at the moment I can actually change this
to reflect the room number and without actually changing the underlying data so
who is still holds the
primary case too far right click here and go
changed to combo box working nowadays I can actually
changed combo box to select dates firm
room and I do that by going to data row source
click on the three docks I'm interested in Table rooms
by drop in Table remove remind the and room number
you know what while Amir I'm going to sort in ascending this runner
straight repairing a query insider form
close to so at the moment
of still saying number one but I can change the column count 2-2
and I can change the column widths
a let's just say one and three
networks
well maybe has actually me for you so if you click here
because you see when you click in a although was storing the
ID field reconnecting now see the room number
we could take that step for the because
if we so clicked in Ramadi if we click on
column with fear and change it 0 which refers to the
ID field first column is 0 with 0 which means in a pissy
an essay for which refers to the room number
now we've completely hidden the ID field and I would just seen the room number
so I've been used in more detail query of tissues I've actually basis just of a
normal table
and we've used the ID filled
I and still storing the ID number but we've used
a century lookup to actually display
day to this meaningful for us okay so
now the small digression but I think who were the one as well
you consider and so just to recap
movie table pre-release bill more uses than
marv to describe the we remain uses so reconstitute data
from a normal my state back into something that we can actually
visually see and obviously very common to use them in
reports I'm now look who said
I if you're Craig form have a serious think about whether you would need to
put
two tables together because they are you better off using the ID
from way factory have to use the ID from
take the table and then change it to a combo box in user
lookup field so that's more a table queries hope that wasn't too confusing
and hopes in exterior