VirtualMV/Web Development/Web Site Issues/Integrity/Content
According to the Merriam-Webster (Intregity, 2014)there are two branches of integrity and both meanings are used in Web development
- For humans (developer, client, user)
- the quality of being honest and fair
- For data/databases
- the state of being complete or whole
- For Developers and IT Professionals this is often governed by a voluntary professional code of conduct
- In New Zealand the Institute of IT Professionals has a code of conduct and code of practice. These can be found at http://www.iitp.org.nz/about/ethics
- For Clients and Users this can have many interpretations and may be affected by cultural factors. Things that fall into this category include:
- Downloading movies, sounds and images
- Copying look and feel, web sites, multimedia etc.
Most online systems have at their core a database, and the database is valuable only if the data in it is correct. Taylor (2006, pp. 104-) identifies three kinds of database integrity.
- Entity integrity
- Domain integrity
- Referential integrity
An entity corresponds to something in the real world. As such you must be able to connect the entry in the database with the correct one in the real world. This is commonly achieved by specifying a primary key in the table that allows each record to be unique. In the Person table an entity integrity error could occur if we try to add a person with an ID (PerID) which is already in the table.
Many data items can only take specific values, for example, gender in tblPerson can only be Male (M) or Female (F). MySQL provides the ENUM data type.
So if you tried to add or update a Persons record containing "X" for gender this would fail domain integrity
An example of Referential integrity is when an Item is added to the database it MUST belong to a Person. So before a Item can be entered the Person MUST be created. Referential Integrity will fail if the Item is added before the Person is created.
Here the PerID 999 must be created first in the Person table
<ref> tags exist, but no
<references/> tag was found