SQLite can be considered a relational database?

0

According to Wikipedia , A relational database is a database that models the data in a way that they are perceived by the user as tables, or more formally relationships.

In my understanding SQLite fits this definition (and others I've researched)

However, in the documentation for this implementation I was intrigued by the methods separating SQLite from Banco de dados relacionais :

After all, can SQLite be considered a relational database?

    
asked by anonymous 12.01.2017 / 04:25

2 answers

3

Absolutely. Like any other relational schema, SQLite provides

  • validation, verification, and guarantees of data integrity ,
  • Support for foreign keys, trigger and autoincrement
  • competition control, disaster recovery, security,
  • transaction control , query optimization

The limitations of SQLite are more related to performance, that is, not recommended in a server environment that will be much needed. As it is an embedded system, it is widely used in distributed applications, without the need to install any SGDB, as the drivers go along with the application.

The concept of non-relational database (noSQL) refers to models that do not allow SQL, in situations where data is not modeled in the form of tables. Reasons:

  • It is difficult to reconcile such a model with the demand for scalability that is more frequent.
  • difficulty organizing data into a distributed system working with data partitioning
  

Quote link
  Quote link

    
12.01.2017 / 04:52
2

I just wanted to contribute my two cents.

Yes . SQLite is a relational database management system for the simple fact of using the SQL language, as the name implies. In contrast, there are the NoSQL databases (MongoDB, Cassandra and Redris, e.g.).

See, an example of inserting data in the MongoDB :

db.users.insertMany(
  [
     {
       _id: 5,
       name: "xyz",
       age: 23,
       type: 2,
       status: "D",
       favorites: { artist: "Noguchi", food: "nougat" },
       finished: [ 14, 6 ],
       badges: [ "orange" ],
       points: [
          { points: 71, bonus: 20 }
       ]
     },
     {
       _id: 6,
       name: "abc",
       age: 43,
       type: 1,
       status: "A",
       favorites: { food: "pizza", artist: "Picasso" },
       finished: [ 18, 12 ],
       badges: [ "black", "blue" ],
       points: [
          { points: 78, bonus: 8 },
          { points: 57, bonus: 7 }
       ]
     }
  ]
)

SQL is a structured language for managing data from relational data systems (following the relational model proposed by Codd), mainly database management systems such as Oracle Database 12c, MS SQL Server, MySQL, SQLite, etc. .

Example (with unusual syntax) with SQL:

-- MS SQL Server Query: A tabela do exemplo tem 5 campos, sendo um deles auto incrementável (chave-primária (IDENTITY(1, 1) PRIMARY KEY)
INSERT INTO minha_tabela
VALUES(
    'Valor 1' -- [N]VARCHAR
    ,1 -- TINYINT
    ,'2017-01-12 02:59:12' --DATETIME
    ,(SELECT TOP(1) nome FROM MEU_BD.DBO.tabela_usuarios) -- [N]VARCHAR
);
    
12.01.2017 / 05:35