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

Data dictionary, how to prepare a data dictionary for online examination sy...

how to prepare a data dictionary for online examination system for certified courses?

Create database and define relationships between tables, Instructions: ...

Instructions: Follow the instructions below for completing this project: 1. Creating the Database: · Use the physical table descriptions given below to define and create each t

Define two-phase locking protocol, Define two-phase locking protocol. A...

Define two-phase locking protocol. Ans: Two-phase locking is significance in the context of ensuring that schedules are serializable. The two-phase locking protocol defines a p

What is relational model feature, What is relational model feature? A r...

What is relational model feature? A relational model feature is much more data independence than some other database models.

Determine the operation that do not participate to be union, 1. Which relat...

1. Which relational algebra operations do not need the participating tables to be union-compatible? Ans: Join is the relational algebra operations that do not need the particip

Create student db and execute insert query, Create Student DB and execute I...

Create Student DB and execute Insert query? STUDENT (name, student#, class, major) COURSE (course name, course#, credit hours, department) SECTION (section identifier, course

Why is database redesign necessary, Why is database redesign necessary? ...

Why is database redesign necessary? Database redesign is essential for two reasons. First, redesign is essential both to fix mistakes made during the initial database design. S

Describe specialsation and generalization, Describe Specialsation and gener...

Describe Specialsation and generalization? Specialisation /generalization: This is a top down and bottom up approach to the design of database. It displays the IS_A relation

How to rearrange classes and operations, Rearrange Classes and Operations ...

Rearrange Classes and Operations Sometimes, the similar operation is defined across different classes and can easily be inherited from a familiar ancestor, but more often oper

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