The questions you have to ask is Are the rows I'm returning identifiable by a unique id -- typically the row id, but also unique identifiers, like ISBN for books, Employee ID for employees, etc. If you find duplicates of what should be a unique id in a table then its probably a sign the data is bad. (Two books with the same ISBN, two employees with the same Employee ID.) Of course, the other possibility is that the database wasn't normalized and the standard operations (Create, Read, Update, Delete) weren't used in a logical fashion (for instance leaving out a way to update or delete employees and thus making it impossible to rename an employee who's changed their name.)
When I search for this author are the books returned normalized against the author's table? That is, is there an identifier shared between the tables that allows one table to be searched in relation to the other? (The relational part of databases.) The other thing is finding external sources to verify against, or performing tests as mentioned by other members of this list. Create a test author. create test books by the test author. do you get only the books you entered for that author? If not, why not? If so, then can you repeat the results? Another thing to look at are your queries. Select [fields] from [table] where [condition] Insert into [table] ([columns]) values ([value for each column]) Delete from [table] where [condition] Update [table] set [field]=[value], [field2]=[value2] ... where [condition] Select [fields] from [table] where [condition] limit [rows to skip],[rows to return] If you have doubts about the accuracy of the tool you're using there are free SQLite Managers out there. And then there's always the last option which is reading the file manually. This last requires a bit more understanding of the database engine itself as you need to be able to identify what type is supposed to be where by the bytes of the file, and would probably have to write a program to do this programmatically instead of trying to do it manually. -----Original Message----- From: Dwight Harvey <dharv...@students.northweststate.edu> To: sqlite-users <sqlite-users@sqlite.org> Sent: Sun, Dec 7, 2014 9:24 pm 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