Internet & Web development (2)/Course materials/Web Site Issues/Integrity
|Internet & Web development (2)|
|Web Site Issues||Security ( Managing ) | Legal ( Privacy | Confidentiality | Integrity | Copyright and Fair Dealing | Contracts) | Accessibility ( Managing ) | Culture and Netiquette|
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
- Intregity (2014). In Merriam-Webster. Retrieved from http://www.merriam-webster.com/dictionary/integrity
- Taylor, A.G. (2006) SQL for Dummies, 6th Ed. Wiley. Retrieved July 19, 2009 from http://books.google.co.nz/books?id=aB3DhgoB9UIC&pg=PA104&lpg=PA104&dq=mysql+entity+integrity&source=bl&ots=giMUL2IkcI&sig=T9eqa_-JVfdbWGo0lNqBEJ7MCOg&hl=en&ei=UABjSuuwK4LAsgO44Mhm&sa=X&oi=book_result&ct=result&resnum=2