[go: up one dir, main page]

0% found this document useful (0 votes)
67 views5 pages

Tabla Predictiva

The document describes the grammar for representing SQL databases in JSON format. It defines tags for the database name (<JSON>), tables (<TABLAS>), columns (<COLUMNAS>), data types (<TIPO_DATO>), and individual data values (<VALOR>). It also specifies the possible elements that can follow each tag in the structure.

Uploaded by

Aaron Jimenez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views5 pages

Tabla Predictiva

The document describes the grammar for representing SQL databases in JSON format. It defines tags for the database name (<JSON>), tables (<TABLAS>), columns (<COLUMNAS>), data types (<TIPO_DATO>), and individual data values (<VALOR>). It also specifies the possible elements that can follow each tag in the structure.

Uploaded by

Aaron Jimenez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

JSON a SQL 

 
1. <JSON> => { “bd_name“ : “​<ID>​”, “tables” : [ ​<TABLAS>​ ] } 
2. <ID> => a...z <RESTOID>  
3. <RESTOID> => a...z <RESTOID> | 0...9 <RESTOID> | ɛ 
4. <TABLAS> => { “​<ID>​” : “​<ID>​” , “columns” : [ ​<COLUMNAS>​ , “data” : [ ​<DATA>​ ] } <​ RESTOTA>  
5. <RESTOTA> => , { “​<ID>​” : “​<ID>​” , “columns” : [ ​<COLUMNAS>​ , “data” : [ ​<DATA>​ ] } <​ RESTOTA>​ | ɛ 
6. <COLUMNAS> => { “​<ID>​” : “​<ID>​” , “type” : “​<TIPO_DATO>​” } <​ RESTOCOL> 
7. <RESTOCOL> => , { “​<ID>​” : “​<ID>​” , “type” : “​<TIPO_DATO>​” }​<RESTOCOL>​ | ɛ 
8. <TIPO_DATO> => VARCHAR(​<ENTERO>​) | INT | BOOLEAN 
9. <ENTERO> => 0...9 <​ RESTOE>  
10. <RESTOE> => 0...9 <​ RESTOE> | ​ɛ 
11. <DATA> => { <​ DATOS>​ } <​ RESTOD> 
12. <RESTOD> => ,{ <​ DATOS>​ } ​<RESTOD>​ | ɛ 
13. <DATOS> => “​<ID>​” : “​<VALOR>​” <​ RESTODA> 
14. <RESTODA> => ,“​<ID>​” : “​<VALOR>​” <​ RESTODA>​ | ɛ 
15. <VALOR> => 0...9 ​<RESTOV>​ | a… Z <​ RESTOV>  
16. <RESTOV> => 0...9 ​<RESTOV>​ | a… Z <​ RESTOV>​ | _ <​ RESTOV>​ | - <​ RESTOV>​ | ɛ 
  
 
 
 
 
 
CONJUNTOS PRIMEROS  
 
P<JSON> => {  
P<ID> => a..Z 
P<RESTOID> =>a..Z | 0...9 | ɛ 
P<TABLAS> => { 
P<RESTOTA> => , | ɛ 
P<COLUMNAS> => { 
P<RESTOCOL> => , | ɛ 
P<TIPO_DATO> => VARCHAR | INT | BOOLEAN 
P<ENTERO> => 0...9 
P<RESTOE> => 0...9 | ɛ 
P<DATA> => { 
P<RESTOD> => , | ɛ 
P<DATOS> => “  
P<RESTODA> => , | ɛ 
P<VALOR> => 0...9 | a… Z  
P<RESTOV> => 0...9 | a...Z | _ | - | ɛ 
 
 
 
CONJUNTOS SIGUIENTES 
 
S<JSON> => $ 
S<ID> => “ 
S<RESTOID> => S<ID> => “ 
S<TABLAS> => ] 
S<RESTOTA> => S<TABLAS> => ] 
S<COLUMNAS> => , 
S<RESTOCOL> => S<COLUMNAS> => , 
S<TIPO_DATO> => “ 
S<ENTERO> => ) 
S<RESTOE> => S<ENTERO> => ) 
S<DATA> => ] 
S<RESTOD> => S<DATA> => ] 
S<DATOS> => } 
S<RESTODA> => S<DATOS> => } 
S<VALOR> => “ 
S<RESTOV> => S<VALOR> => “ 
 
 
 
 
  {  “  db_name  :  ,  tables  [  ]  a..z  0...9  data  columns  type  varchar  int  float  -  _  } 

<JSON>  1                                     

<ID>                  2                     

<RESTOID>                  3  4                   

<TABLAS>  5                                     

<RESTOTA>          6                             

<COLUMNAS>  8                                     

<RESTOCOL>          9                             

<TIPO_DATO>                            10  11  12       

<ENTERO>                    13                   

<RESTOE>                    14                   

<DATA>  15                                     

<RESTOD>          16                             

<DATOS>    17                                   
<RESTODA>          18                             

<VALOR>                  19  20                   

<RESTOV>                  21  22              22  23   

You might also like