Advantages and disadvantages of SQLite [closed]

-2
  

SQLite is a powerful API for working with structured data, but it requires a lot of effort from the programmer to use it. According to Developer (2018), the programmer faces the famous "boilerplate code", that is, the programmer must implement many codes to achieve certain functionality. Taking as reference the main problems faced by the programmed with the use of SQLite. Judge the following statements in (V) True or (F) False.

     

() There is no SQL language checking at compile time. If the programmer gives the name of any column that does not exist, the application will not be interrupted when it is running in the user application.

     

() If the database structure is modified, you will need to update all SQL commands manually.

     

() The programmer must implement the code responsible for converting the SQL language and objects in Java.

     

Check the alternative that shows the sequence CORRECT:

     

Choose one:

     

a. V-F-V.

     

b. V - V - V.

     

c. V-V-F.

     

d. F-F-V.

     

e. F-V-F.

I have doubts between the 1st and 2nd alternatives, but the last one I know is true.

    
asked by anonymous 14.10.2018 / 04:11

1 answer

4

The original question is a little bad and ambiguous.

Although SQLite has an API, it is not itself an API. Boilerplate is only needed to give flexibility, and it is simple for the programmer to create mechanism that avoids this according to his needs, and only he can do it because only he understands these needs, but unfortunately today most of programmers no longer understand what it is to develop software, they just keep reproducing ready codes and think they are doing something good without understanding what is going on there.

The statements are poorly thought and written by those who do not understand exactly what is happening. So it's interpretation, and so it may be that my answer does not hit what the person thought. Because of this the three statements are false. But probably the intent of whoever did this was another, and only she knows.

  • Of course, if a SQL code tries to access a nonexistent column it will give an error and this should be handled by your code. It will not interrupt execution, of course, but nothing will be accomplished, the API was not meant to cause this kind of thing. But it does not make sense to speak in compilation there. The assertion starts from wrong premises. In a sense it is true, because there will be no interruption, but not for the reasons given, so I prefer to put it as false.

  • You do not necessarily need to update all SQL commands in your code when the database structure is updated. It is possible and even probable that yes, in some or even most of the cases, but all would be an exaggeration. So I'd rather say it's fake, anyway if part is false, I think it turns out to be fake.

  • There is no conversion of SQL language and objects. What is there is the insertion of results received in the objects, or the reading of the data of the object to send to the database. It is possible to use some library or to develop something that does this automatically, this is called ORM. But it is not mandatory. The statement uses a mistaken premise, so it is false.

If you want to interpret what the person tried to do, maybe, and only maybe, all three are true, but a lot of speculation has to be made for this, it has to come into the mind of the person who wrote this. But it could be any combination that the person thought.

The statements would thus make all of them true:

  • The SQL code is a text entered inside Java code, so it is not checked at compile time. If in the code there is a nonexistent column name in the table the SQL command will not bring a useful result and there will be an error that the Java code should treat it.

  • If the database structure is modified, you may need to update some of the SQL commands used in Java code manually.

  • Without using an extra library, the transfer between object data and what is sent or obtained through the basic API provided by SQLite is the responsibility of the programmer.

14.10.2018 / 13:04