First, you have to "verify" that the database itself is sufficiently normalized 
and that it is anomoly free.  This is a purely algebraic / mathematical 
operation and is a pre-requisite to any further verification.  If the database 
is not properly normalized, or has other anomolous behaviour, then it may be 
quite impossible to proceed further.

Second, you mathematically / algabraically verify that the query you have 
"asked" is in fact the question you were supposed to be asking (for example, as 
in your example, "select * from table where surname='Smith'" is an obviously 
incorrect phrasing of the problem "select the records where the surname is 
smith and the forename is fred" and cannot return the required result except by 
divine intervention) and that when it is applied as a transformation against 
the database model (verification 1) it has "no choice" but to return the 
desired result.

Third, you can execute the query to test that the database implementation is 
working as it should and that the results returned are those that are expected 
given the data contained in the database and the query.  This is the only step 
that requires anything more than pencil and paper.


---
Theory is when you know everything but nothing works.  Practice is when 
everything works but no one knows why.  Sometimes theory and practice are 
combined:  nothing works and no one knows why.

>-----Original Message-----
>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
>boun...@sqlite.org] On Behalf Of Dwight Harvey
>Sent: Sunday, 7 December, 2014 19:25
>To: sqlite-users@sqlite.org
>Subject: [sqlite] How to Verify (know that they are correct) Queries in
>SQLite GUI Manager Firefox add-on?
>
>I am a student with no Tech or IT background what so ever.
>
>I am new to Databases and IT in general.
>
>I am taking an accelerated class in database basics and within the last
>three weeks I just learned what databases were.
>
>I know very little and Databases are complex and intimidating.
>
>I figured out how to run queries but I don't know if they are
>correct/accurate, as in what I requested from the 'RUN' results?
>
>How do you 'VERIFY' your query results?
>
>
>My instructor wants me to explain how do I KNOW that the records are
>accurate. Here is an example of what is expected in the assignment...
>
> *VERIFICATION:  *What is verification?  Each time you retrieve data, you
>should ask yourself, "How do I know I selected the correct data?".   For
>example, if you were asked to pull all records written by an author named
>Fred Smith, your query might be based on last name equal to Smith.
>However, if you might get records for someone with the first name of
>Fred,
>Mary and Ginger.   What would you do to insure you are pulling only Fred?
>The person who has requested the data will always want assurance from you
>that you are 100% positive you pulled the correct records.  Look at the
>records returned and always as yourself, did I pull the correct records?
>How would I verify it?
>
>"Capture each query, number of records returned and *explain your
>validation of the query.*" Example:
>
>/** First query 1. List all employees **/
>SELECT dbo.Firstname, dbo.Lastname
>FROM dbo.employees
>--records returned: 24
>*--Validation:  I did a quick listing of top 200 records and 4 were
>returned*.
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to