Hide Caption
Show Caption
The Manage Database Dialog is going to become very familiar to you. You're going
to spend a lot of time in here because this is the structure of your database.
You have your tables, you have your fields, and you have your relationships. Now,
we're making a simple contact manager in the beginner tutorial and we'll expand
upon that in Add Tables and Relationships, but for now, all we need to do is
work with the Field section. That's all we have, just because we're just
starting out and not all databases need multiple tables. The simplest database
can be one table, such as a contact manager, where you're storing just records
for people. But if we added on companies, or products, or invoices, or any
other kind of information that would need to be stored separately, we'd need an
additional table. So we're going to start with our fields and you can see down
here where your cursor's blinking, that's where you type in the fields. Now
before you start typing in field names, you really need to think about your
Naming Conventions. There are quite a few Naming Conventions, in fact, at the
FileMaker.com website, there's an entire 30 to 50 page document that covers
Naming Conventions, now that's for really advanced developers and but at the
very least you should consider some of the ideas I'm going to give you and then
start building on those ideas, develop your own, maybe eventually read that
document on the FileMaker.com website and get more ideas. But we'll present some
of them now, so the first thing you should consider is even if you're not going
to publish your FileMaker database to the web, in other words, allow web
browsers to access it, you still need to consider field naming conventions.
And since fields are searched and show up in the URL when you're doing that search,
you need to make sure that they obey the conventions that you see in a URL. So
that means all lowercase, no spaces, and also, you need to make sure that it's
all lower ASCII. Now, FileMaker is the friendly kind of database and it will go
ahead and convert spaces into something that is readable by a web browser in
the URL. I believe it gives you a %20 instead. But if you obey naming
conventions, it'll be much easier to read that URL, and think of that URL as if
you do a Google search often, it puts all that information up in the URL, it
says, you know, it's always hard to read, you wonder where it came from. Well
that's all of its information communicating with the database, so we want to
make sure that's easy to read and obeys all the conventions of a web browser.
So, we're going to go ahead and do that, and we're going to start off here with our
Company field. So we just simply type it in, and it's always good to use a comment.
In this case, the Company field is very self-explanatory, but in a lot of cases you
may be six months down the line or even, in my case, a week down the line, and
completely forget why you created that field, and if you have a comment, you've
documented it and you know why you created that field. So even though this field
is easy to understand and self-explanatory, just for practice, let's put a
comment in here. So we'll say Stores, Organization, Title. And then all you have
to do is move your mouse down here and click Create, it'll pop that field up
here and now you have one field inside of your database. So we can move on to
the rest of the fields, and we'll start with First Name, but we're going to type
in Name_First. Why are we going to do that? Well, this allows us to sort these
fields so they're next to each other, in other words, we'll have Name First and
Name Last and we can have them sort next to each other. So I like to put Name
First instead of First Name because then it's easier for me to find the stuff.
Now, this is not necessarily what you have to show the people who are using your
solution, you can change what that label is next to the field, this is just for
your own use for ease of finding what you're looking for. And then, we're not
going to enter comments anymore because it's going to take a long time, so I'm
going to delete this one and then create. And then we'll type in Name_Last, and
now once you get going, you don't have to click the Create button, you can
actually just hit the Enter or Return key. And you'll notice that once you do
that, it highlights Name Last again, and you can type in the next field right
over it, and just hit the Return key or the Enter key. Then we'll go on to City,
State, Postal code, and then we're also going to create a Phone field, and we're
also going to create an Email field. Now the next field we're going to create is
the Date of Birth field, or DOB. We haven't showed you what Type is, and there's
actually quite a few types, we've done all text fields, which is your most
common type, but there are other types. And you want to make sure you choose
the right type because you can enter a date into a text field, but it won't find
or sort properly. So we have text fields, number fields, date fields, time
fields, time stamp fields, which are a combination of date and time separated
by a space, a container field which can hold your graphics or your PDF documents
or your Word documents, or any file from your hard drive that you want to put
in there. And you also have calculation fields, which we're not going to get
into, but they can calculate things much like a spreadsheet. And you also have
summary fields, which are essentially used for reports. So we're going to switch
to Date, and then hit Create. And you notice it says Date here, so I always go
and check this to make sure because I can tell you if you get the wrong type,
you may not notice for a long time, and what will happen is you'll start
getting a problem, you'll scratch your head and you'll wonder, well why is this
not searching correctly. And I'd tell you, 9 times out of 10, it's a simple,
rather than a difficult problem, it's just a simple issue that you created it
with the wrong type, so be really careful when you're doing this, make sure each
field is the right type, so as you create one, just glance up here and go, is
that the right type? Yes. And that way, you'll be sure that you don't fall prey
to this problem. So once you're done typing in all these fields, all you have to
do is click OK, and there you go. FileMaker automatically creates a layout for
you, which we'll go into later, and it puts all your fields on the layout and
just stacks them right on top of each other. In fact, it even creates a record
for you. So, we're going to go ahead and modify this so it looks better, it's
not a very good looking layout, I mean the font is hard to read and maybe we
don't need City, State, and Postal Code stacked on top of each other, maybe we
want them next to each other. We'll do all that when we start working with the
layout.