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 meant by normalization of data, What is meant by normalization of d...

What is meant by normalization of data? It is a process of examining the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the prop

What is the use of a slotted-page structure, What is the use of a slotted-p...

What is the use of a slotted-page structure and what is the information are there in the header? The slotted-page structure is used for organizing records within a one block.

Column constraints-on delete cascade, CREATE TABLE prodtrans ( pno ...

CREATE TABLE prodtrans ( pno number (4) ptype char (1) CHECK (ptype in ('I','R','S')), qty number (5) FOREIGN KEY pno REFERENCES product (pno) ON DELETE CASCADE);

Can you delete data element, Can we delete data element, which is being use...

Can we delete data element, which is being used by table fields. No we cant delete data element.

Trigger , Flights(FlightNo, DeptDateTime, Origin, ArrivalDateTime, Destinat...

Flights(FlightNo, DeptDateTime, Origin, ArrivalDateTime, Destination, Capacity, SoldSeats) Tickets(FlightNo, Seat, CustID) Where - flightNo is the PK of the flights table - DeptDa

Define the five basic operators of relational algebra, Define the five basi...

Define the five basic operators of relational algebra? Five basic operators of relational algebra are: 1. Union (∪∪∪∪) - Selects tuples which are in either P or Q or in both

What is called remapping of bad sectors, What is called remapping of bad se...

What is called remapping of bad sectors? If the controller detects that a sector is injured when the disk is initially formatted, or when an attempt is made to write the secto

Describe embedded query language, Describe Embedded Query Language? Emb...

Describe Embedded Query Language? Embedded Query Language - A query language (e.g., SQL) can be implemented in two ways. It can be used interactively or embedded within a host

What is normalization, What is normalization? It is a method of analysi...

What is normalization? It is a method of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to attain the properties (1).Minim

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