and i'm looking taxes 2013 shoot or ooze nice video
I'm gonna be talking you through a tables and data types associate abrams
so if you wanna play along following bloodiest in the section website
download
axis 2013 DB 02 however
if I'm being honest I don't really need to so this open this but but often
2013 we can
what is actually going it the all the tables from the
photo booking system so
as wouldn't a touch anyway DoD really need to worry about that the there
anyway to see can check em out
and right so tables to our tables tables are
two-dimensional greets which is stored data
so think about Excel spreadsheets
and think about her list update thing about shopping list
where you have one column in most who rose through describe that
table terminology first row been on a second row
tomatoes third row milk
so this kind of table you crazy self Excel spreadsheets the same ID
I'm except you can have multiple brokers
I'm so multiple columns so
you have your shopping list on the left and you could have the quantity
the next row over on my view of the location
the column after that I keep saying roe
and I mean to say column what am i doing okay so
hopefully get the idea to a point now if we go to
cray on the tap and go to
let's go Craig table rather than table design
you start to see the idea of what I'm talking about
in the you go a column here which in this case is called ID
and let's name this second column
I must go to from this are here
go to show text amoco this one
shopping list the election will decide the columns was going to lead to
you must but later
you can't really
more authority than a minute and okay sir I click a save this included
table shopping list
and researcher from list and we want number here
quantity and
so far less quantity and over short text again
location so
now let's see if we can to lead to no
week ago design view much time on it we can go to leave that
good starter or never wanna see again II Scott
so and but is it able to hit stores this that data like I said so for example
I'm ban on this only been honest we want
say 5
the known as we're going to get them from the supermarkets
I'm choosing a generic name so as to avoid any kind
issues in the future who else do you want tomatoes
I meet multiple
6 tomatoes were from the fruits too
and if if you know of a free stories
an and well said I say
you ok quantity
to from the corner shop
wait for you get it from the
supermarket you when they're by in Boca is no new chief for
you got it right so that's the idea ever tell you nothing
devastatingly major about this this at a time
so in one column we have
the the may know if the table which is
the armor buying the second column we're listing
the quantity and third column will list in the location
I'm to sit at tables now with data types come in today s
if you drop this into design view I'm
we're choosing the data type in this case got short text this case but number
in this case ago short text
basically the way it works is the I'm
way computers work generally is the different datatypes take up different
amounts a memory
so this word have been honors takes up more memory
than this number five deaths I'm and
for that reason it's important when you make tables at you
choose the most accurate data type is what you sent retelling
access to do when you choose I'm sure text or number is
to make a sort of space a in the memory for
potential I'm items
and so access can organize this memory better it's basically like having
like to lockers a small locker in a large locker
I in the small locker you wanna put small things in the large look you want
to
large things if you this MOU things in the large locka
when it comes to analyzing the in there won't be any space and that's kinda the
same with memory
so you can streamline it down if you look at the different
datatype you got short text and long text
the basically the same idea which is you can put characters there
I'm things that make up words I'm
telephone numbers would actually be short text for example
for the actual text rather than number could you not to calculations on them
they def see short takes long Texas short text has
limit of 255 characters
and long text has a slim if something about 16,000 old
I'm so things each store in short text
I'm for example you go shopping list you gonna store the name to the art because
the show
people's first and last names for sign up an address
think the story long text you might have a table
about something in my van note's feels so you then you probably have
that as long text right next to get the number
I'm now we've got between numbers every
actually different talk today five so when you
to numb the default data type is long integer and integers a whole number
so this means to here
with quantity you can never store for example 5.5
for can't run do anything you want should work well as tons actually
roundout
6 and so you can never do that
because it's an integer now long integer
you go into journal on integer into just those
from some like minus 30 2000
up to 32,000 city trying to thanks 13760
a maybe if you tryin right number thirty 2,769
you should get a park unless they've changed
well we just put 33,000
who have changed it on ask is is long integer
don't has changed it into first though we do that
tried again you know sector
yeah larger than the Phil sites field size settings
rock so you to 32767
ira so that's the limit $32767
these at minus thirty thousand seven hundred and 68 something like that
going the other way so that's a different scene in SWTOR long into their
both
they both hold whole numbers to
long integer go above 32768
so when do you see shadows you'd use long integer for
Eyed Peas say for example every time you had a record
you had unique ID causes
very feasible to go but for amount of ID's and use integers for things like
straw quantities and
so there that to I use quite a lot the third 1i use
law from I'm you talk with other ones is double a base is double for
storing fractional value so much change at the double
today she be save it now I can actually turn and 5.5
so yeah I don't honestly my view explain the other ones cuz I only ever use
integer long integer and double singles actually
the same ideas double fractional based or less by these budgets
never tend to use it so that short text long text number
date time do I need to explain a guess what's storing dates and times
dates ok reserve would be careful
shopping list day so this change that DateTime
that they deceive you well we got
I guess if you click in there now we've restoring is it a race to get a nice to
take text books because the store times I'm
in this sort of former here
think served as a day in the time to talk about I want too much
next currency currency
those obviously for storing money a man is actually a
is for love longing to tie for the belief
I'm loan quote me on that and the other at save a currency
a judas I were saying about currency
discovered and 14,000 for 223 yeah what we're saying we're currency is the
are based in the UK so as I've chosen currency will read of
my currency are selected for my windows which is why China pound
if you take this same database don't change anything in but I open up in
United States for example that would immediately change the dollar
where should do but 90 upset at all it does is a park sometimes it doesn't
you know what maybe they've fixed the in 2013 who knows
and so be on that ok it's all to number in a second
yes and no fields are for things that require
yes and no so I'm
Fort so to say that we don't know burma gonna get our
shopping we don't know at the moment if they're even going to have it come when
we get back
we look over the stuff with Paul and we cycle we were able to get the honors and
broke its mottoes
but we were unable to get milk this is what's called a billion datatype
in that got two options Yes No true/false
get to ago and well so we got
an attachment filled he's so you can attach documents
such as a Word documents excel sheets
very useful actually one of the most useful features in excess is trying to
do this is our secret service
really enormous paying yeah this is actually really useful
and the other thing you've got forget to our numbers lookup
was it I am where you couldn't
basically or showing 0 click on it show it to you
I'm you couldn't go to take Ballys another table so
or do that next so let's say
for example table bookings not as nice a table guests
necks and I want guest ID panel first name and last name
so by last name
finish so now of course we're gonna daily she
is for click here is actually looking up
these values in to stay with you
I can see there's
what you actually see is kinda like a bit over red herring
we see the names but the actual value is storing is the
ID value to this comment P days a little bit over
thing about looking up values and other tables
I'm there's nothing wrong with doing it
per se but it's not for this purpose
i've seen. databases where people have done all kinds of crazy stuff in that
this storing
be ID number but they're actually looking up
valuation separate tables in its just
it can cause so many issues so if you gonna use lookup fields no problem but
keep it simple is a simple lookup field historian
the ID value amber show display the names that simple
keep it simple and your on urban issues and
right last but not least it's about the Alta number
dominance road here now is quite common
well was actually pretty you picked this
that every single table you make has an ID column
and we do the tough in it.
go to order number click on he got a design
and click on primary key
if you want to you save that
and go that day she view and the idea of the ID field
is the I'm imagine but my seat
let's have a look at guests
that's even such a good example and you might have two guests
who Hannah Travis how do you know which one is which
well the identifiable by the guest ID
which is an aura number fill anotha number fill just increments by selves if
I had a record down here
you automatically at one that someone to this was a liar
a trucker
no I didn't do anything with the ID photo but also practically added the
number for
so keep increment in as we stand as you wish
and and
yeah that's the ID field are now safely delete this
is prolly worth mentioning no we had another one not sure yet
a.m. Apple's
doesn't actually reuse the number for again they weren't reuse up from for
ever worry use its a
reuse we'll use the next available number which is number five
and that's the ID for this is kind of critical to
pretty much who love the any table you make that you have this ID field as a
way of identifying it don't rely on
names for example I said you can duplicate you cannot rely on is an IT
field
and it is possible to have by the fields as non
alter numbers but if they're generally is a way to make in order to number
field in excess
you know me on the right path to heaven well structured database
so that's a okay Thank You forces video an OC next video where we should be
talking
about relationships in Tables not in your life
excellent thanks for watchin good boy