CS3402 JSON

JSON

JavaScript Object Notation (JSON)

  • Serializing data objects 
  • Human-readable
  • Data Interchange
  • Representing and storing semistructured data 

 

Base Values:
  • Number, String, Boolean, etc
Objects ():
  • Sets of label-value pairs (key-value pairs) 
Arrays []:
  • List of values
{
"book": [
{
         "id":"01",
         "language": "Java",
         "edition": "third",
         "author": "Herbert Schildt"
}, {
      "id":"07",
      "language": "C++",
      "edition": "second",
      "author": "E.Balagurusamy"
}
]
}

Relational VS JSON

Relational JSON

  • Collection of Tables

  • Fixed Schema

  • Simple expressive language

  • Mature native systems 

JSON

  • Collection of Nested Sets and Arrays 
  • Schema not required in advance
  • Not as simple
  • Coupled with programming languages
    • Used in NOSQL systems anddoc-oriented DBMS 

 

JSON and PostgreSQL

 

 

Selecting

 

Filtering

 

 

Aggregation

 

 

 

 

 

 

 

 

 

 

posted @ 2018-02-04 20:50  Charonnnnn  阅读(125)  评论(0编辑  收藏  举报