In this exercise we're going to ask you to create an AF Database
and then create a specific structure. And that structure's
going to look like this. It's going to have Elements and
Element References, and we'll start with a
Production Line that defines what kind of
physically, you know, how the flow works. So we've got a Production Area
and a Production Line 1, and within that we've got a
couple of these Mixing Tanks. Now, in
addition, we want to create a structure that the
Instrument people, the Maintenance folks, can look at, so
these, you know, what are these? These are Tanks. So, we've got an
Equipment Maintenance View that's has a heading
simply called Tanks, and there's a couple of --
we have these Mixing Tanks organized under
there. It's the same Mixing Tanks you see here.
If you delete one here it'll delete over here, of course, and if you make
one change here it'll change here. It's the exact same thing.
It's just organized in two different places, or it appears in two different
places. And, in fact, when we do this, these will be
Element References. You'll notice these will be Element References
here. We're simply going to be referencing this Element here.
Now I don't want to let the opportunity go to mention
the type of References we're
going to be making between these right here, these,
these kind of Parent Objects here
and the Children Objects that are underneath here.
If you recall, we discussed a Reference Type and there's either
what was called a Composition Type, Strong or Weak.
Well, we're going to, we're going to use the Default which is the Parent-
Child, which is also Strong. It's,
it's the Strong type. So,
between this Object right here and this Object,
these Object down here, that's going to be a Strong Reference,
a Parent-Child Reference. Okay. What that means is
that, essentially when
this Parent is deleted, if it is the
last Strong Reference
to the Children, if there are no other Parents, if
that, those Children have no other Parents, then those
Children will actually be deleted. Now,
in this case though, we're actually going to be
having two Parents
for these Child Elements. The Child
Elements here are going to also have a Parent-Child
Relationship with this Element over here,
and that's going to be a Strong Relationship,
or a Strong, you know, Element Reference.
And so what that means is that if
you do decide to delete this
those Elements will not be deleted because there is still going to be
at lease one Parent for these Elements.
And, that's what this, that's what we mean by a
Strong Relationship. Now, if these had a Weak Relationship
between this Parent and these Child,
then if you deleted this, this
Parent right here would delete the Children in both places.
But, in this case, since we're having Strong, then, you know, once you have,
once you've got that Strong Parent-Child
Relationship defined, all the Parents
have to be deleted for those Elements to be
deleted, for the Child Elements to be deleted.
So that's kind of parenthetical. It's not real critical, but I
didn't want to go without mentioning that again. That's something that,
it's not, it's not used a great deal, but it's an
Option that's available to you. Now,
we're looking at this, this class
workbook here, and like all the class workbooks it's got a
nice step-by-step solution, but also it's got a
nice warning at the front. Please, don't use the step-by-step solution
unless you've tried it first yourself. You will notice
that there's an Approach Section at the beginning of each exercise,
so see if you can use that first. And if this
is really confusing, you're saying where's this workbook come from?
I don't, I don't have any workbook. Now this workbook is
available to you from the Main Menu where
you started your computer-based training. So, if you haven't downloaded
it yet, that is available to you for downloads.
So go ahead and just download that. Open it up or print it out,
and you've got your workbook. Okay, go ahead and
pause the video and give it a shot, and then when you're done, come on back
and take a look at the solution.
Okay, ready? We start this exercise
in the PI System Explorer. The first thing we have to do is
connect to the right AF Database. So I'll
choose the Database Option here. I'll go out and
make sure I'm connected to the proper Database. I actually have
two in this network environment I can choose from.
The one I'm going to use is this one which is local for me.
It looks like I'm already connected to that. But, if you had not been
connected, you would just go ahead and choose Connect
to make sure you are connected, and then
select the, or excuse me, and then create
a brand new database. Now just be careful you
don't select or override or delete
this Configuration Database. Remember, that Configuration Database
is what we use for internal
things that are stored from the Client Application, so
internal to OSIsoft is what we store in
Configuration, mostly Client Setting. So
What we're going to do is we're going to create a brand new database, called
OSIsoft Plant. Of course, in your situation,
if you want to call it something a little bit more appropriate,
instead of OSIsoft Plant, you can do that.
This is going to be OSIsoft Plant, this is going to be
a Test for the CBT exercise,
and we'll go ahead and say OK. And that should
create a brand new AF Database,
that at this point should be completely empty.
We look up here. We see no Elements. If we go
down to the Navigator Pane, look at Library,
there's no Templates, etc., so
a brand new AF Database. I wanted to start
with two Elements at the same level. One was called
OSIsoft Plant, the other was Equipment Maintenance, so
what I'll do is I'll just choose. From here
I can choose, right mouse-click and choose New Element,
and in the Dialog Box that appears,
well, since this is at the highest level you'll notice
there is no Option for the Reference Type. Reference Type's
going to be, always be Parent-Child at the highest level.
So this creates my
Element, and I need to change the name of that Element.
I was going to call this first one OSIsoft
Plant, and then we're going to create a second one
at the same level. That second at the
same level's going to be called the Equipment Maintenance.
So, there's a couple of ways I could do this.
I could go up here and do a right
click and choose New Element.
Actually, if I'm here on this level, if I choose
New Element, it'll be at the same level as
the current Element, which is what we want here.
So that's going to be called Equipment Maintenance,
and I'll go ahead and check
these two things in. There we go.
We can check these in at any point to commit that
to the AF Database. Under
OSIsoft Plant I'm going to create a, an Element called Production
Area. Underneath here I'm going to create Tanks. Now this is
the first time, when we do one of these new Elements, that we have
the choice to do a new Child Element. And, I'll go ahead and create
that new Child Element here.
And when we, as we've done each of these,
you notice we left the Element Template blank.
We're just going to use No Template in this case. We have no Templates in this
AF Database. We just created it. So, I'm going to go ahead and choose
the Strong Reference there, that Parent-
Child Reference.
And this Element
is going to be called the Production Area.
And in the Equipment
Maintenance Element I want to create 8 Tanks.
I'll do a right-click here. Let's choose a new Child
Element. A Child Element again, no
Element Template. We'll just choose the Parent-Child. That's
the Strong Reference. And this is going to be
called Tanks.
So far, so good. We've got the structure
looking like what we, what we've called for in
the exercise. Now we need to add a couple of these,
these Mixing Tanks and the Storage Tanks. We'll do that underneath
the Production Area first, and then we're going to make reference to
them over here in the Tanks. Now I almost forgot. We need
to add a Production Line 1 underneath the Production
Area. So, I'll right-click, choose New Child Element.
This is going to be called Production Line 1.
Same Strong Reference. No Element Template here.
Now under this Production Line 1 we want to create these two
Tanks: a Mixing Tank 1 and a Storage Tank 1.
And the way we do this in the exercise, we've demonstrated this
in the exercise by choosing New Child Element and
just as we had done before, we'll call
these -- well we'll do these one at a time. We're
going to call this Mixing Tank 1 and Storage
Tank 1. But, you know what? We've done this so many times, let me show you
another way we could have -- we could do it. Remember, if you hold down
the Control Key, you can copy these Elements,
so I'm going to hold down the Control Key, click, and then drag
this, and as you can see, it's created a
duplicate of that Element. It incremented the name,
called it Mixing Tank 2. Let's change
this to Storage Tank 1.
There we are. The only thing that remains
in this exercise is to make References to here,
so we're going to do this as an Element Reference.
When I do a right-click here, we'll do a new
Element Reference. So, we'll chose Add Element
Reference. We'll go out and Browse for that
specific, these specific Elements, Mixing Tank 1 and
Storage Tank 1. So let's do this twice here.
There's our Mixing Tank 1. I'll go ahead and
say OK. We're choosing that same
Parent-Child Relationship, and
then we'll also add the Storage Tank 1.
We'll do a New Element Reference.
We could have done both of those
at the same time, using that Search--
Storage Tank 1. , we're going to make that Reference
a Parent-Child Reference. That's what the exercise calls
for. And, once this looks good, we'll go ahead and check
all this in. Choose Check In. That commits
everything to the AF Database.