Advantages and disadvantages of Sqlite

Asked

Viewed 1,071 times

-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", IE, 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 check at compile time. If the programmer provides the name of a column that does not exist, still the application will not be interrupted when running in the user’s 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 the objects into Java.

Tick the alternative that displays the CORRECT sequence:

Choose a:

a. V - F - V.

b. V - V - V.

c. V - V - F.

d. F - F - V.

e. F - V - F.

I’m having doubts between the 1st and 2nd alternative, but the last one I know is true.

1 answer

4

The original question is a little bad and ambiguous.

Although Sqlite has an API, it itself is not an API. Boilerplate it is only necessary 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 programmers no longer understand what it is to develop software, just keep playing code ready and think they are doing something good, without understanding what is happening there.

The statements are poorly thought out and written by those who do not understand exactly what is happening. So interpretation is appropriate, and therefore it may be that my answer does not match what the person thought. Because of this the three statements are false. But it was probably someone else’s intention, and only she knows.

  • Of course, if an SQL code tries to access a non-existent column it will give an error and this should be handled by your code. It will not stop the execution, of course, but nothing will be accomplished, the API is not meant to cause this kind of thing. But it makes no sense to talk about compilation there. The statement starts from wrong premises. In a sense it is true, because there will be no interruption, but not for the reasons presented, so I prefer to put as false.

  • You don’t necessarily need to update all SQL commands in your code when the database structure is updated. It is possible and even likely that yes, in some or even most cases, but all would be an exaggeration. That’s why I prefer to say it’s false, after all if part is false, I think it turns out to be false.

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

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

Statements like that would make them all true:

  • The SQL code is a text inserted within the Java code, so it is not checked at build time. If in the code 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, it may be necessary to update some of the SQL commands used in Java code manually.

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

  • 3

    The question from college is a little bad? You’re extra gentle today. :)

  • It is for these and others that it is possible to say without fear that IT diploma alone is not worth anything. The few who graduate are the ones who learned on their own (unfortunately in Brazil this does not apply only to IT, of course).;

  • yes but I just answered thanking you , is not right.

  • @And what you wanted then?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.