Deck 14: Using Relational Databases to Provide Object Persistence
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/113
Play
Full screen (f)
Deck 14: Using Relational Databases to Provide Object Persistence
1
Object-oriented languages provide a built-in mechanism for storing a persistent state of an object.This is called:
A) serialization.
B) persistence.
C) integrity constraints.
D) none of the above.
A) serialization.
B) persistence.
C) integrity constraints.
D) none of the above.
A
2
A structure that defines the relationships between domain classes in the object-oriented model and relations in a relational model is called:
A) domain mapping schema.
B) domain logistic class hierarchy.
C) relational-domain model.
D) declarative mapping schema.
A) domain mapping schema.
B) domain logistic class hierarchy.
C) relational-domain model.
D) declarative mapping schema.
D
3
A technique to define structural relationships between object-oriented and relational representations of data is called:
A) object-oriented relational database management systems.
B) persistence.
C) object-relational mapping.
D) relation object mapping.
A) object-oriented relational database management systems.
B) persistence.
C) object-relational mapping.
D) relation object mapping.
C
4
All of the following are object-relational mapping frameworks EXCEPT:
A) (N)Hibernate.
B) EclipseLink
C) JPA.
D) Topdog.
A) (N)Hibernate.
B) EclipseLink
C) JPA.
D) Topdog.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
5
One advantage of the call-level API approach to providing persistence is:
A) low overhead.
B) ability to not write a lot of detailed code.
C) SQL code is generated automatically.
D) does provide transparent persistence.
A) low overhead.
B) ability to not write a lot of detailed code.
C) SQL code is generated automatically.
D) does provide transparent persistence.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
6
Results from a call-level application program interface query are returned as:
A) a set of rows consisting of untyped columns.
B) an SQL query.
C) a cursor.
D) a record set.
A) a set of rows consisting of untyped columns.
B) an SQL query.
C) a cursor.
D) a record set.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
7
Storing the state of an object between application execution sessions is called providing ________ to the object.
A) stateness
B) persistence
C) quality
D) data
A) stateness
B) persistence
C) quality
D) data
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
8
An advantage of the SQL query mapping framework is:
A) direct access to all DBMS capabilities provided through SQL.
B) SQL code generated automatically.
C) database access code is easier to manage than with call-level APIs.
D) both A and C.
A) direct access to all DBMS capabilities provided through SQL.
B) SQL code generated automatically.
C) database access code is easier to manage than with call-level APIs.
D) both A and C.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
9
A(n)________ is a method that provides other objects with access to the state of an object.
A) accessor method
B) attribute method
C) concrete method
D) abstract method
A) accessor method
B) attribute method
C) concrete method
D) abstract method
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
10
The property of an object that separates it from other objects based on its existence is called:
A) object orientation.
B) object persistence.
C) object identity.
D) matrix of objects.
A) object orientation.
B) object persistence.
C) object identity.
D) matrix of objects.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
11
All of the following are disadvantages of using the call-level API approach to providing persistence EXCEPT:
A) little reuse of code.
B) moderate to high overhead.
C) need to write a lot of detailed code.
D) proliferation of code related to database connectivity.
A) little reuse of code.
B) moderate to high overhead.
C) need to write a lot of detailed code.
D) proliferation of code related to database connectivity.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
12
Micrsoft's ________ query is a tool for integrating data access directly into object-oriented environments.
A) visual basic
B) visual c++
C) Language Integrated
D) visual studio
A) visual basic
B) visual c++
C) Language Integrated
D) visual studio
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
13
A persistent solution that hides the underlying storage technology is called:
A) object persistence.
B) translucent persistence.
C) transparent persistence.
D) object permanence.
A) object persistence.
B) translucent persistence.
C) transparent persistence.
D) object permanence.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
14
All of the following are elements of the object-relational impedance mismatch EXCEPT:
A) nature and granularity of data types.
B) methods of assessing non-persistent data.
C) architectural styles.
D) structural relationships.
A) nature and granularity of data types.
B) methods of assessing non-persistent data.
C) architectural styles.
D) structural relationships.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
15
The conceptual gap between the object-oriented approach to application design and the relational model is often labeled as a ________.
A) mismatch
B) schism
C) void
D) goal
A) mismatch
B) schism
C) void
D) goal
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
16
________ are a category of tools which use relational databases to provide object persistence by linking classes to parameters and results of SQL queries.
A) Query mapping parameters
B) SQL query mapping frameworks
C) Object-relational mapping frameworks
D) )Net
A) Query mapping parameters
B) SQL query mapping frameworks
C) Object-relational mapping frameworks
D) )Net
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
17
________ has been an industry standard for a call-level application program interface with which Java programs can access SQL databases.
A) ODBC
B) JDBC
C) XML
D) SOAP
A) ODBC
B) JDBC
C) XML
D) SOAP
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
18
Object-oriented databases never took off because of:
A) lack of organizational inertia
B) lack of powerful query capabilities found in relational databases
C) a less sophisticated mathematical model
D) all of the above.
A) lack of organizational inertia
B) lack of powerful query capabilities found in relational databases
C) a less sophisticated mathematical model
D) all of the above.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
19
A mechanism that provides an application program with access to an external service such as a database management system is called a(n):
A) API.
B) ADO.
C) call-level application program interface.
D) WSDL.
A) API.
B) ADO.
C) call-level application program interface.
D) WSDL.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
20
The identity of the ________ is dealt with differently in the object-oriented and relational worlds.
A) attributes
B) entities
C) objects
D) core Elements
A) attributes
B) entities
C) objects
D) core Elements
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
21
The core element of Hibernate that defines the relationship between the object-oriented classes and relational files are:
A) flat files.
B) relational mapping tables.
C) KML files.
D) XML files.
A) flat files.
B) relational mapping tables.
C) KML files.
D) XML files.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
22
Serialization is a built-in mechanism for storing a persistent state of an object in object-oriented languages.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
23
Object-relational mapping defines structural relationships between object-oriented and relational representations of data.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
24
The difference between the object-oriented world and the relational world is called integrity-object mismatch.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
25
A disadvantage of Object-Relational Mapping Frameworks is:
A) more overhead than with call-level APIs.
B) difficulty with legacy databases.
C) true object-oriented design.
D) both A and B.
A) more overhead than with call-level APIs.
B) difficulty with legacy databases.
C) true object-oriented design.
D) both A and B.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
26
All of the following are disadvantages of the SQL query mapping framework EXCEPT:
A) more overhead than with call-level APIs.
B) does not provide a transparent persistence.
C) database access code more difficult to manage than with call-level APIs.
D) SQL code not generated automatically.
A) more overhead than with call-level APIs.
B) does not provide a transparent persistence.
C) database access code more difficult to manage than with call-level APIs.
D) SQL code not generated automatically.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
27
A class specification for objects that exist for storing the value of a property of another object is called a:
A) value class.
B) sub-type.
C) value type.
D) literal type.
A) value class.
B) sub-type.
C) value type.
D) literal type.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
28
Storing the state of an object between application execution sessions is called providing obfuscation to the object.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
29
The identity of the core elements (objects/entity instances)is dealt with differently in the object-oriented and relational worlds.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
30
All of the following are ways to represent an inheritance structure in a database EXCEPT:
A) table per concrete class with implicit polymorphism.
B) table per concrete class with unions.
C) table per abstract class with joins.
D) table per class hierarchy.
A) table per concrete class with implicit polymorphism.
B) table per concrete class with unions.
C) table per abstract class with joins.
D) table per class hierarchy.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
31
All of the following are advantages of the Object-Relational Mapping Frameworks EXCEPT:
A) highest level of persistence transparency.
B) full separation of the persistence concern.
C) ease of use with legacy databases.
D) enable true object-oriented design.
A) highest level of persistence transparency.
B) full separation of the persistence concern.
C) ease of use with legacy databases.
D) enable true object-oriented design.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
32
A performance problem caused by too many select statements generated by an ORM framework is called:
A) N+J selects problem.
B) N* selects problem.
C) N+1 selects problem.
D) selection classification problem.
A) N+J selects problem.
B) N* selects problem.
C) N+1 selects problem.
D) selection classification problem.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
33
Separation of concerns is violated by:
A) including non-persistent code in all classes.
B) providing persistence related code in all classes.
C) separating code by function.
D) none of the above.
A) including non-persistent code in all classes.
B) providing persistence related code in all classes.
C) separating code by function.
D) none of the above.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
34
All of the following are typical responsibilities of the ORM framework EXCEPT:
A) generating SQL code for database access.
B) query language.
C) distributing code related to database access.
D) providing a layer of abstraction.
A) generating SQL code for database access.
B) query language.
C) distributing code related to database access.
D) providing a layer of abstraction.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
35
Serialization's performance is scalable and provides sufficient response time.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
36
In HQL,what does the following statement do?
Select s.sectionRegNbr
From section as s j
Join s.course c
Where c.courseNbr = 'MGMT 390' and s.semester = 'Spring 2008'
A) List section numbers of all sections of MGMT 390 offered in the Spring of 2008
B) List all students in MGMT 390
C) List all sections of MGMT 390 ever offered
D) Return no results
Select s.sectionRegNbr
From section as s j
Join s.course c
Where c.courseNbr = 'MGMT 390' and s.semester = 'Spring 2008'
A) List section numbers of all sections of MGMT 390 offered in the Spring of 2008
B) List all students in MGMT 390
C) List all sections of MGMT 390 ever offered
D) Return no results
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
37
A model for specifying when and how an ORM framework retrieves persistent objects to the run-time memory during a navigation process is called:
A) fetching strategy.
B) navigation strategy.
C) object permanence.
D) class navigation.
A) fetching strategy.
B) navigation strategy.
C) object permanence.
D) class navigation.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
38
An entity class is:
A) a class that represents a real-world entity.
B) an instance of an entity.
C) a relationship between two classes.
D) none of the above.
A) a class that represents a real-world entity.
B) an instance of an entity.
C) a relationship between two classes.
D) none of the above.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
39
Serialization is not a realistic method for storing large amounts of structured data.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
40
The conceptual gap between the object-oriented approach to application design and the relational model for database design and implementation is often labeled as a perfect match.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
41
Comprehensive object-relational mapping frameworks hide the relational data access methods from the object-oriented applications and provide an entirely translucent persistence layer.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
42
Lack of automatic SQL code generation is a disadvantage in the call-level API approach.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
43
Object-oriented environments typically do not have an inherent,built-in concept of boundaries between transactions.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
44
Closed database connectivity is another call-level API.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
45
JDBC is the industry standard call-level API for Java access to SQL databases.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
46
SQL query mapping frameworks make mapping to legacy database schemas more difficult.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
47
In the relational world,each object has its own identity based upon its existence.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
48
Object-oriented environments and relational environments have the same navigational model for accessing persistent data.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
49
SQL query mapping frameworks do not provide transparent persistence.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
50
Transparent persistence is a solution that hides the underlying storage technology.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
51
IBATIS is an example of an SQL query mapping framework.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
52
One of the advantages of the call-level API approach is the small amount of code needed to be written.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
53
Object-relational mapping frameworks require less overhead than call-level APIs and query mapping frameworks.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
54
SQL Query Mapping Frameworks are an elegant compromise that hide some of the complexity of JDBC and ADO.Net yet give developers full access to SQL.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
55
Hibernate is configured using an HTML file.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
56
In the object-oriented world,a typical way to access a data item is to call the accessor method associated with a specific attribute.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
57
An advantage to the call-level API approach is low overhead.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
58
A structure that defines the relationship between domain classes in the object-oriented model and relations in the relational model is called the independent mapping schema.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
59
The relational database approach is based on the same architectural assumptions as the object-oriented approach.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
60
Relational databases and the processes that are used to design them focus primarily on data (with the exceptions of stored procedures and some object-relational extensions of relational databases)whereas object-oriented environments by definition integrate data and behavior.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
61
ORM frameworks often include a custom query language.An example of this is HQL.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
62
ORM frameworks include tools for managing database performance in the context of object-oriented applications.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
63
________ refers to the process of writing an object into a storage medium or communication channel as a data stream.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
64
Persistence defines an object's capability to maintain its ________ between application execution ________.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
65
The conceptual differences between the object-oriented approach to application design and the relational model for database design is called the ________.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
66
Object-relational mapping (ORM)defines relationships between object-oriented and ________ data.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
67
In HQL,an implicit association join allows us to use object-oriented navigation in the queries.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
68
Serialization's performance is simply not ________ for purposes that require fast and constant response times.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
69
ORM frameworks provide support for transactions and transaction integrity.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
70
Object identity refers to the property of a(n)________ that separating it from other ________ based upon its existence.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
71
A single class can provide persistence for two or more tables when using a value type.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
72
Pulling strategies determine when and how a framework retrieves persistent objects to the run-time memory.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
73
The process of using a limited number of database connections that are shared by multiple applications and users is called pooling of database connections.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
74
ORM frameworks do not generate SQL code.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
75
An object's capability to maintain its state between application execution sessions is called ________.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
76
ORM frameworks provide a layer of abstraction that separates object-oriented applications from the specific details of a specific database application.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
77
A typical way to access a data item in the object-oriented world is through the ________.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
78
An inheritance structure can be represented in at least four ways in a database.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
79
In most cases,the relationship between a class in the object-oriented world and a relational table is one-to-one.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck
80
HQL provides three different ways of expressing joins.
Unlock Deck
Unlock for access to all 113 flashcards in this deck.
Unlock Deck
k this deck