Welcome to Understanding Data Types and this is going to be Part 1. I'll have to break this one into two parts because I know it'll take me too long to say what I need to say here. So let's talk about data types. Now data types restrict the data that can be stored in a column in a table. Now keep in mind anytime I say the word column I could also say the word field and if you read some of the more technically correct documentation or books out there on databases, you will hear them refer to fields. And they're talking about columns when they do that. Okay. Either one's correct. Now let's use that same employee table that we used in some other videos in the course and we've got the same data in it but I want you to notice that for every column in this table we had to tell Access what data type. Or exactly what type of data we were going to store in each column. Now why do we have to do this? Well if you think about what's going on here, Access has to set aside memory to hold this data. And by telling it what kind of data type, we are telling it all at once what kind of data we're going to store there and how much space we need to store that data. Now there will be a movie later on in the course entitled Data Types and I'll go through each individual data type that we can use in Access and we'll talk about the amount of memory they use and that sort of thing. Okay. But for now don't worry about that part of it. Okay. But we're going to have to assign a data type to every column, you could also call that a field in every table in our database. Now notice here this brings up an interesting one with Social Security Number. First of all you say well most Social Security Numbers have a dash, have two dashes in there but yours doesn't have them. Well I don't want to store that dash. If I have say 10,000 rows and in that 10,000 rows I've got two dashes and let's make it easy, those two dashes take up one byte or, or maybe even just one bit of data each. Well then that means in 10,000 rows I've got 20, I'm storing 20,000 bits of data that are duplicate, there's no reason for it. So what I could do is I could basically make this a text type and utilize a mask. And the mask would show the hyphens or the dashes but I don't have to actually store them in the database and that's, that's a much better situation. We'll talk about masks a little bit later on in the course as well. Now the reason I brought all that up. When you're designing a database you'll have to make those kinds of decisions. Don't worry if you don't know why, as soon as you see one you will pick a way to do it and you'd be willing to fight to the death over the way that you're doing it. Okay. Now the data type restricts the data that can be stored in that column. And there are ten data types that are available to you in Access 2013. You'll see these later as we go through the course but when I start to create a table in Access, when I work on each one of my fields or columns I have to choose which data type I want. And I can choose text from memo, number, date time data type, currency data type and again let me remind you there's going to be a separate video entitled just Data Types. But we'll talk more about the memory requirements of each one of these and why you'd want to use one over the other and that sort of thing. Next is the auto number data type, the yes no data type, OLE or object linking and embedding object date type, the hyperlink data type and an attachment data type. Now already just by looking at these some of you, the wheels are turning. You're like wait a minute a yes no data type, hmm I could do that. There are times I could really use a yes no and that's all. Or even how about a hyperlink? What if I put as part of everybody's record a, a hyperlink out to their Facebook page, their blog, their website, whatever? So a lot of these data types can kind of give you a little hint about some of the things you can do. So you got ten to choose from and you'll have to set these on the columns and again we will dig into this a little bit more later. But for now I'm going to end this Part 1 right here. Join me in Part 2 and we'll continue to talk about some of the very basic aspects that will help you to understand data types.
| Course: | Microsoft Access 2013 |
| Author: | Mark Long |
| SKU: | 34405 |
| ISBN: | 978-1-61866-090-9 |
| Release Date: | 2013-02-01 |
| Duration: | 7 hrs / 89 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |