IS Week 7/8
During weeks 7 and 8 we focused on SQLite and R usage for data storage and retrieval. SQLite creates and stores relational databases. In SQL, fields can be referred to as columns, whereas rows are records. A table is a set of records. In SQL, we are generally concerned with creating records. Tables store records that are described by the columns that their rows contain. In order to manipulate information in tables we use either DDL or DML, aka data definition language and data manipulation language. DDL is used to establish the fields and rows for tables, so as to structure and initialize the data. Meanwhile, DML is used to alter what is in those fields. DML is largely what we call "querying", wherein we make queries of a table looking for different data responses. Common examples of these queries include SHOW_DATABASES and SHOW_TABLES, which, respectively, return the databases and tables in a SQL file. If you wish to see the columns from a given table or database, SHOW COLUMNS FROM information_schema.SCHEMATA will return that for you. In SQL there are variety of datatypes that are related to datatypes in other languages. VarChars and Chars represent Strings, with varChars having a variable number of characters, and Chars having a set number. DECIMAL or INTEGER can be used to store numbers, with DECIMAL representing the double datatype, and INTEGER representing ints. In order to create a table in SQL, the Create Table function can be used. The simplest form of this function takes in a table name, a column and index input, and Table Level Options input. The SELECT function can be used to query a table for a specific field. The FROM function can be used to supplement this by specifying tables, while the WHERE function can be used for conditional queries. R is a database handling program that is particularly suited to large dataset storage and retrieval.
https://www.statmethods.net/r-tutorial/index.html
https://www.statmethods.net/r-tutorial/index.html
Comments
Post a Comment