Give an example of enforcement in typing, Database Management System

Assignment Help:

Give an example of enforcement in Typing.

You can understand the idea of enforcement as it makes sure objects of dissimilar classes may not be interchanged as below:

 Example: Fruit f; Vegetable v; Mango m;  

This implies 'v' is variables of class Vegetable, 'm' of class Mango and 'f' of class Fruit. Typing ensures that value of 'f' never be assigned to 'v'.

However, if Mango extends Fruits, then 'f' may be assigned a value of 'm'. The variable of a sub class may be assigned to variable of super class, but not other way around while 'm' cannot be assigned a value of 'f'.

 


Related Discussions:- Give an example of enforcement in typing

What is assertion, What is assertion? Mention the forms available. An a...

What is assertion? Mention the forms available. An assertion is a predicate expressing a condition that we wish the database always to satisfy. Domain integrity constraints.

Why we use delegation to share implementation, Use Delegation to Share Impl...

Use Delegation to Share Implementation The delegation " Delegation comprises of catching an operation on one object and sending it to other object which is part, or related to

Define canonical cover, Define canonical cover? A canonical cover Fc fo...

Define canonical cover? A canonical cover Fc for F is a set of dependencies like F logically implies all dependencies in FC and Fc logically shows all dependencies in F.

What is the meaning of redundant associations, Adding Redundant Association...

Adding Redundant Associations for Efficient Access The expression redundant association means using "duplicate association for proficient access". While analysis, it is not a

What is recursive closure and operation relational algebra, What is recursi...

What is recursive closure? Why is it not possible to describe this operation in relational algebra? Recursive closure is applied to recursive relationship. An instance of rec

Define the boyce-codd normal form, Define the Boyce-Codd Normal Form with i...

Define the Boyce-Codd Normal Form with instance and also Compare BCNF and 3NF.  Ans: BCNF: For each functional dependency X->Y in a set F of functional dependencies over relati

Determine the un-normalized form, Un-Normalized Form (UNF) If a table h...

Un-Normalized Form (UNF) If a table having non-atomic values at every row, it is said to be in UNF. An atomic value is something that cannot be further decomposed. A non-atomic

What is difference between primary index and secondary index, What is diffe...

What is difference between primary index and secondary index? Primary Index a) It is an ordered file whose records are of fixed length along with two fields. b) Only base

What are the concurrency issues, Concurrency issues Data integrity...

Concurrency issues Data integrity: Threads accessing same object need to be synchronized, such as: banking account. Deadlock: One or more threads in system are perman

Compare the nested-loop join and block-nested loop join, Compare the Nested...

Compare the Nested-loop join and block-nested loop join Ans: Nested  loop join - It is costly as worst case cost, no. of block accesses needed is n r * b s + b r   where b

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