prova Flashcards
- What are the 3 conceptual layers?
presentation layer, application layer, resource manager layer
- Pros and cons TOP-down approach?
pro: focus on high level goals, addresses functional and non-functional requirements
con: can only be applied if the IS is developed from scratch
- Explain bottom-up approach:
1 - define access channels and client platforms
2 - examine existing resources and their functionality (RM layer)
3 - wrap existing resources, integrate them into consistent interface (AL layer)
4) adapt output of AL for client (P layer)
- why is bottom-up a good approach?
Design focuses on integration/reuse of existing (legacy) systems/applications. It is not an advantage to use it, but a necessity
- Name the 4 distribution alternatives (understand them all):
transaction as unit of distribution, application as unit of distribution, db operation as unit of distribtuion, middleware controls distribution
transaction as unit of distribution pros and cons:
pro: simple and easy solution. works in heterogeneous environments
cons: inflexible, limited scope, transaction restricted to single node
application as unit of distribution. Pros and cons:
pros: locaIIty processing. Supports application reuse.
cons: inflexibility regarding data access operations. Complex program model. db access operations cannot reach across multiple nodes\
db operation as unit of distribution. Pros and cons:
pro: high flexible for data access
con: increase communication onverhead, program model complexity
middleware controls distribution:
pros: high flexible data access,simple and powerful programing model
cons: increased communication overhead, schema integration required
- what are the five components of CORBA ?
transactional client, transactional server, recoverable server, object request broker, transactional service (OTS)
- in the corba, which components receive prepare command?
transactional service (OTS) and recoverable server
- what are the 3 approaches for coupling database and programming language?
static embedded sql, dynamic embedded sql, and call level interface CLI
- why is SQLJ binary portable?
java is a platform independent language. The use of SQLJ-precompiler/translator avoids DBMS-SPECIFIC precompiler technology. Therefore, compiled SQLJ application is portable.
- which coupling database approach jdbc uses?
CLI
- Which approaches sqlj uses?
embedded sql with binary portability
- which approach uses early query compilation and is vendor-specific?
static-embedded sql
- explain how the components of db-gw support access to multiple database at the same time:
the Driver Manager manages interactions between Applications and Drivers and it is capable of realize n:m-relationship between application and drivers. It loads the drivers for the multiple databases and it maps the data sources to the drivers.
- PROS call-level interface (cli) static, and dynamic sql
pros: avoids vendor-specific pre-compiler (binary portable program)
- PROS AND CONS static embedded sql (early query compilation)
pro: performance
con: vendor specific pre-compiler. Code resulting from pre-compiler is not portable
- CONS dynamic embedded sql (late query compilation)
con: vendor specific pre-compiler. Code resulting from pre-compiler is not portable
- explain the difference between orthogonal persistence and independence persistence
in orthogonal persistence the persistence is independent of data type, class. Instances of the same class may be transient or persistent. Independence persistence, also known as transparent persistence, the code operating on transient and persistent objects is basicaly the same. There is no impact on the client object when interacting with persistent objects. There is no special codign for implementing persistence.
- what are the 2 peristent components for entity beans?
Bean Manager Persistence (BMP)
CMP
- which mechanism requires developers to write the code for the database access call?
Bean manager persistence - BMP
- WSDL - which sub-element contains the address of the service’s location?
endpoint
- WSDL - which subelement refers to the protocol for message transport?
binding
- WSDL - what XML standard is used to specify the type element?
XMLSchema
- WSDL - what are the protocols that can be used with SOAP?
SOAP is transport independent. Any protocol: HTTP, HTTPS, SMTP…
- what are the elements of a SOAP message?
root element:Envelop
sub elements: fault, header, and body elements
- which element is mandatory to exist in a SOAP message
body element
- WHAT are the 4 techniques to manage sessions?
HTTP authentication, cookies, hiding fields in forms, URL enconding
- describe pros and cons from the 4 techniques to manage session:
hiding fields in form: pro: supported by every browser and browser configuration. con: increase complexity of the application and the response time suffers.
http authentication: adv: automatically supported by browsers and web-servers. cons: user registration and authentication before every session
cookies: adv.: automatically included in web server interaction by the browser. disadv: it can be disabled by the browser
url encoding: adv: supported by all browsers and configurations. disadv: realization is complex. personalized url is not user friendly.
- name advantages and disadvantages of asynchronous transaction processing compared to synchronous single transaction:
advantages of asynchronous: If the server is down or a connection error occurs, the client can keep processing and putting messages on the queue. it is easier to implement load balance. It’s possible to create a prioritization of the requests
disadvantages: requests may not be directly authorized and executed. The server response can take more time to return to client.
Question: Sometimes we lazy replication with a very long delay practiced (eg 8h). Describe a scenario where did makes sense .
?
- name 3 approaches to realize change data capture:
snapshot, log based, trigger based, audit columns
- CUPID schema-element named AvgRoomPricePerNight. Name and perform the 4 steps to normalize it:
tokenize: avg room price per night
expand: average room price per night
eliminate: average room price night
tagging: average (static) room (hotel) price (money) night (time)
- SCHEMA INTEGRATION: name the four properties that a integrated schema should have and describe how it can be violated
minimal, complete, correct, intelligible
- why ACID is too strict for a complex workflow? what are the alternatives to support transactions in workflow?
only appropriate for individual activities or restricted subset of activities (atomic spheres)
- describe the schema reference architecture for the federated DBMS:
external schema, federated schema, export schema, component schema, local schema
Name the 6 types of heterogeneity and explain them:
Technological heterogeneity, data model heterogeneity, schematic heterogeneity, structural heterogeneity, syntatic heterogeneity, semantic heterogeneity
Pick ONE appropriate distribution alternative (1..4) for each approach of unit of distribution: DataBase Gateway, Web-Service, Federated DBMS, RMI/RPC, TP Monitor
db gw: db operation
federated dbms: middleware as unit of distribution
TP Monitor: middleware controlling distribution
RMI/RPC - application as unit of distribution
Corba: application as unit of distribution
web-service: application as unit of distribution
Name 3 database gateways coupling approaches and say if each of them: code or binary compatible, early or late compiled
Static embedded sql (early compiled, source compatible)
dynamic embedded sql (late compiled, source compatible)
call level interface (CLI) (late compiled e binary compatible)
Single-master lazy-replication scheme with 1 master and 2 slaves is used
Name advantages and disadvantages
Adv: If a connection error occurs or if a slave is down, the master still works. As it uses a master with 2 slaves, it avoids conflicts.
disadvantages: data in replicas may be not updated. Therefore, if updated data is required, you cannot use the slaves as a source to read data.
Name 3 advantages and disadvantages of CLI
Adv: Portability, uniform data access, flexibility
disadv: performance and increases application complexity.
in which states of the Entity_beans life cycle is persistent state managed by entity manager?
Managed and removed
pessimistic locking
requires long read locks to avoid lost updates
optimistic locking
Does do not guarantee consistent reads, inconsistencies may arises if entities are not protected by a version attribute.
Application Server
Name 2 approaches to achieve scalability in terms of processes
- scaling up a server system (caching
and resource pooling) - scaling out by adding more machines
application server: Give two examples of pooling
stateless bean pooling, DB connection pooling
Name and explain an approach that helps scaling stateful session beans
Passivation, the bean state is saved on disk so the bean in the memory can be reused by another client
Web Service Coordination: What component services are offered by a coordination service?
activation service, registration service, and coordination protocols.