Home
Username:
Password:
Macromedia ColdFusion Tutorials

Adhering to Standards / Creating the Access Database

Subtitles of the Movie

Let's create the Microsoft Access database. I have already done it, but we could take a look at it, and you could start one yourself. I have created 4 tables so far: the business table, the business_type table, the village table and the users table. We will just talk about the business, business_type and village right now because that's the first portion of the application that we are going to work on is the business directory. The village table is here just to have as a drop down, so we could lock in any of the forms that a user may come to register their business, their company, lock them down to one of these four villages within the city of Montague. We don't want them to put in any data that doesn't work in the database and let's try and keep things efficient. Let's just give them each business, let's give each business in the business database, business table. Just a number - 1, 2, 3, 4 or 5 - instead of Turners falls, Montague center. So keeps it efficient, we don't have the words Montague center repeated over and over and over and over again. Just the number 2; a little more efficient. Same thing with the business type - we want to lock them into one of the 88 different business types. If it's not on here, we'll ask them to fill in in the description or in the comments field when they are filling in the form that their business doesn't fit into one of these general categories. These were taken from the yellow pages, there are many more, but these pretty much covered most of them. This is also drop down before them when they are filling it out. As well, when we are pulling data out of the business database, the business table, the number refers to or relates to the business type ID in the business records, relates to here. So we can just pull up arts and crafts shops if their ID is number 8. And then the heart of the business listings is the business table itself. Here is the business ID, the type ID, the company's name, their address, the village that they live in, we know state they're in - they're in Massachusetts. The zip code - this could actually be a drop down as well because there's only 5 or 6, and I prefer not to have anyone accidentally put in the wrong zip code. Their phone number, and the first portion of the phone number could also be in a separate table, but let's not go totally crazy. Their email, their website, description, fax number if they have a fax and then a couple of columns over here - preferred and accepted. And accepted is whether or not I've reviewed their record, given them a call to make sure that they are actually a working business, whether there is not expletives, or you know any curses or pornography put in anywhere. I don't want it to go live right off the bat when they request a listing. And preferred if we want to take on advertisers or if we want a certain, if they've given us a little extra money or kick backs, or if they are friends frankly, have them listed up at the top of the listings, and you will see that later as we develop the application. And there are other things that we could add to this as well. Let's take a look at the way the relationships lay out. So you could sort of see the village ID we pull for the village name, the business type ID we pull for the business type name, and here is all the other information. I pulled all these records in from a database that I already had which was a text database. There is a comma delimiter text file, I said get external data, import, chose txt, found it and went to the process of importing it into a table. I had to massage that data first because in the text file, since it is a flat file, it's not a related file. So I had all the business types redundant, I had all the village names redundant in there. So I had to go through and do a search and replace on all the village names to 1/2/3/4/5 and then I had to strip this column out altogether and put in numbers through 88. It was a bit of a tedious process, but I am glad that I did it. The users table we will be using for the corkboards, and anything else that we may want to use. Very important to get their email addresses for marketing purposes, and also for confirmation. We are going to use the email address as, and we may not even use a user name, we may just have email address, but maybe we'll have user name. We will have to figure that out when we actually get to developing the corkboard, but using the email name has now become a standard for helping users manage their own passwords. If they come to your site, can't remember what their password is, the standard question now is - give us your email address, if we find you in the database, we will send you your password and email. This way you can also accumulate a lot of email address and send out a monthly mailing of events going on, or specials or whatever you may have. And that's all we will look at about the database right now. There are other things involved as well, such as the admins table, which we will be adding later, and perhaps news or we'll see what happens. But for now, this is it and this is Access 97 that I am using here. adding later, and perhaps news or we'll see what happens. But for now, this is it and this is Access 97 that I am using here.

Tutorial Information

Course: Macromedia ColdFusion
Author: Mike Muller
SKU: 33287
ISBN: 1930519656
Release Date: 2001-12-19
Duration: 8 hrs / 86 lessons
Work Files: Yes
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available