Git Version Control and Projects - Michigan State University

Git Version Control and Projects - Michigan State University

SQL DATA TYPES IN SQLITE, IS 1 THE SAME AS 1.0? 1. Yes! 2. Yes? 3. No? 4. No! HUH? From "As an internal optimization, small floating point values with no

fractional component and stored in columns with REAL affinity are written to disk as integers in order to take up less space and are automatically converted back into floating point as the value is read out. This optimization is completely invisible at the SQL level and can only be detected by examining the raw bits of the database file." Cool! NULL NULL is a legal value in any column. It is outside the domain of any data type. It normally represents an absence of information or inapplicable value. Other uses (bad practice):

Nothing (Empty) False 0 Example: CREATE TABLE states (name TEXT, admissionToUnion INTEGER); INSERT INTO states ('Puerto Rico', NULL); INTEGER Signed integer up to 8 bytes long (64 bits)

From 170,141,183,460,469,231,731,687,303,715,884,105,728 to 170,141,183,460,469,231,731,687,303,715,884,105,727 Example: 1

REAL Signed 64 bit floating point From VERY BIG to VERY SMALL Can be specified as a decimal or exponential notation (using capital E) Examples:

1.0, 4.5, -6.0, .8 5.6E12.4, -0.05E-67 TEXT Text can be of any length, but it must be enclosed in single quotes Single quotes must be escaped with a single quote Example:

'', 'I''m a string' Many other databases give you access to fixed length TEXT or variable length TEXT below a certain character limit, be happy we are working with the best DBMS. WHAT IS THE BEST DATABASE MANAGEMENT SOFTWARE? 1. SQLite

2. SQLite! 3. SQLite!! 4. MySQL... Just Kidding, SQLite!!! 5. How much am I paying for this class again? DATE AND TIME TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS"). REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar.

INTEGER as Unix Time, the number of seconds since 197001-01 00:00:00 UTC. More info BLOB Used to hold arbitrary binary data. Often images, video, or other non-text data. No storage limit. Example: XMenEvolution?from=Characters.X-MenEvolution X'012e2b041cc23f4a0549' Rarely used in text INSERT statements, more often used in parameterized queries using programming language APIs (like python's sqlite3 module) We'll be avoiding them in this class for simplicity NUMERIC Techically SQLite has another type, NUMERIC

"A column with NUMERIC affinity may contain values using all five storage classes. When text data is inserted into a NUMERIC column, the storage class of the text is converted to INTEGER or REAL (in order of preference) if such conversion is lossless and reversible. For conversions between TEXT and REAL storage classes, SQLite considers the conversion to be lossless and reversible if the first 15 significant decimal digits of the number are preserved. If the lossless conversion of TEXT to INTEGER or REAL is not possible then the value is stored using the TEXT storage class. No attempt is made to convert NULL or BLOB values." TL;DR NUMERIC can hold any number to any precision needed. But we won't be using it.

NON SQLITE DATA TYPES Memo holds 65,536 characters Currency 15 whole digits and 4 decimal places in base 10 Yes/No Microsoft Access doesn't like scareing people with the word boolean Enum Restricted text strings You an imitate any of these types with SQLite's default types (or extend your own with wrapper functions).

Recently Viewed Presentations

  • Tools for Automated Data-Persistence and Quality Control

    Tools for Automated Data-Persistence and Quality Control

    Tools for Automated Data-Persistence and Quality Control. Terry Lynch, KxCon2016. May 20th 2016. My name is Terry, I work for Schonfeld I'm going to talk a bit about some tools we've been building to make life easier for us (the...
  • kkkkkkk - University of the West of England, Bristol

    kkkkkkk - University of the West of England, Bristol

    UWE Bristol Sepsis in the Intensive Care Name Diane Standring Title Senior lecturer critical care * Bacterial infection evokes a host response by triggering the immune system. Normally, the endothelium plays a key role in maintaining homeostasis. Systemic microvascular endothelial...
  • WELCOME TO STATISTICS The required textbook for this

    WELCOME TO STATISTICS The required textbook for this

    Enter your school data Select the state where your institution is located Select your institution Select your course/instructor When purchasing StatsPortal online: Purchasing StatsPortal online continued… 3. Enter in: Your first name and last name Your email address (which will...
  • Global Ocean Monitoring: Recent Evolution, Current Status, and

    Global Ocean Monitoring: Recent Evolution, Current Status, and

    CFS Tropical North Atlantic (TNA) SST predictions from the latest 9 initial months. Displayed are 40 forecast members (brown) made four times per day initialized from the last 10 days of the initial month (labelled as IC=MonthYear) as well as...
  • It Software, Data, and Contingency Planning

    It Software, Data, and Contingency Planning

    Contingency Planning. Cost-Benefit Analysis. Cost of backups and redundant systems vs. Value of lost data and sales. i.e. cost of backup power supply vs cost of lost sales/minute. Fault tolerant systems—redundant array of independent drives (RAID)
  • Totem Poles - Lancaster High School

    Totem Poles - Lancaster High School

    Research Totem Poles. You will make one segment of a totem pole that helps represents your clan as one part of a whole artwork/totem pole. Your clan can be the class of 2013 or could be your group of art...
  • Infection Prevention and Control - Mccc

    Infection Prevention and Control - Mccc

    Arial Franklin Gothic Book Wingdings 2 Calibri Wingdings Technic 1_Technic 2_Technic 3_Technic 4_Technic 5_Technic INFECTION PREVENTION AND CONTROL SCIENTIFIC KNOWLEDGE BASE CHAIN OF INFECTION Infectious Agent/Pathogen Reservior Portal of Exit/Entry Modes of Transmission Susceptible Host The Infectious Process DEFENSES AGAINST...


    Polar Bonds. When 2 different atoms are joined by a covalent bond, and the bonding electrons are shared unequally, the bond is a polar covalent bond, or . POLAR BOND. The atom with the stronger electron attraction (the more electronegative...