Use inheritance as an implementation technique, Database Management System

Assignment Help:

Use inheritance as an implementation technique

when you are going to use inheritance as an implementation technique, you can achieve same goal in a safer way by making one class an attribute or associate of other class. In this way, one object could selectively invoke desired functions of another class, by using delegation rather which applying inheritance. 

A safer implementation of Stack will delegate to List class as shown in Figure. Every instance of Stack includes a private instance of List. Stack: push operation delegates to list by calling its last and add operations to add the element at the end of list, and the pop operation has a same implementation using last and remove operations. The ability to corrupt stack by adding or removing arbitrary elements is hidden from client of the Stack class.

 

1992_Alternative implementations of a Stack using inheritance.png


Related Discussions:- Use inheritance as an implementation technique

Synonyms, Synonyms It allows short names or alternative names for objects....

Synonyms It allows short names or alternative names for objects. Example :               CREATE SYNONYM D30               FOR EMPD30;   Now if we give command:

Alter table command, ALTER TABLE Command : This command is used for variati...

ALTER TABLE Command : This command is used for variation of existing structure of the table in the given situation: When a new column is to be added to the table structure.

Advantages to copying records from one table to another, What kind of advan...

What kind of advantages to copying records from one table to another? -) When an algorithm that modifies a table is used after that it's safer to work with the copy -) When

Unrepeatable reads-problems of concurrent transactions, Unrepeatable reads ...

Unrepeatable reads : Assume T7 reads X twice during its implementation. If it did not update X itself it could be very disturbing to see a dissimilar value of X in its next read. B

Determine Which is not a consequence of concurrent operation, Determine Whi...

Determine Which is not a consequence of concurrent operations? Ans: Update anomaly.

Define the basic operations of the relational algebra, Define the basic ope...

Define the basic operations of the relational algebra?     Ans: Basic operators of relational algebra are: 1. Union (∪) - Selects tuples which are in either P or Q or in bot

The conceptual level or global level in dbms, The Conceptual Level or Globa...

The Conceptual Level or Global level The conceptual level presents a logical view of the complete database as a unified whole. It permits the user to bring all the data in th

What is meant by heuristic optimisation, What is meant by heuristic optimis...

What is meant by heuristic optimisation?Discuss the major heuristics that are applied during query optimisation.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd