Apple WebObjects 3.5 Manual de usuario Pagina 63

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 120
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 62
The Movies Application
63
Enterprise Objects and the Movies Database
Enterprise Objects Framework manages the interaction between the
database and objects in the Movies application. Its primary responsibility is
to fetch data from relational databases into enterprise objects. An enterprise
object, like any other object, couples data with methods for operating on
that data. In addition, an enterprise object has properties that map to stored
data. Enterprise object classes typically correspond to database tables. An
enterprise object instance corresponds to a single row or record in a database
table.
The Movies application centers around three kinds of enterprise objects:
Movies, MovieRoles, and Talents. A movie has many roles, and talents (or
actors) play those roles.
The Movie, MovieRole, and Talent enterprise objects in the Movies
application correspond to tables in a relational database. For example,
the Talent enterprise object corresponds to the TALENT table in the
database, which has LAST_NAME and FIRST_NAME columns. The
Talent enterprise object class in turn has
lastName and firstName instance
variables. In an application, Talent objects are instantiated using the data
from a corresponding database row, as shown in the following figure:
Enterprise Objects and Relationships
Relational databases model not just individual entities, but entities’
relationships to one another. For example, a movie has zero, one, or more
roles. This is modeled in the database by both the MOVIE table and
Talent
1
0
2
8
F
e
d
e
r
i
g
h
i
C
r
a
i
g
1
1
3
2
F
e
l
d
m
a
n
C
o
r
e
y
T
A
L
E
N
T
_
I
D
L
A
S
T
_
N
A
M
E
F
I
R
S
T
_
N
A
M
E
T
A
L
E
N
T
lastName "Federighi"
firstName "Craig"
Vista de pagina 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 119 120

Comentarios a estos manuales

Sin comentarios