TIPI PODATKOV. Načrt Najprej je potrebno dobro premisliti o problemu Katere podatke hranimo, kako podatke razporediti v tabele, kakšne vrste podatkov.

Slides:



Advertisements
Similar presentations
Database Chapters.
Advertisements

Pertemuan ke 2 Tipe data & ERD Kurniawan Eka Permana.
MySQL-Database Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management.
Module 4: Creating Data Types and Tables. Overview Creating Data Types Creating Tables Generating Column Values Generating Scripts.
Representing Data Elements Gayatri Gopalakrishnan.
Fall 2001Arthur Keller – CS 1808–1 Schedule Today Oct. 18 (TH) Schemas, Views. u Read Sections u Project Part 3 extended to Oct. 23 (T). Oct.
Winter 2002Arthur Keller – CS 1808–1 Schedule Today: Jan. 29 (T) u Modifications, Schemas, Views. u Read Sections Assignment 3 due. Jan. 31 (TH)
Basic SQL types String –Char(n): fixed length. Padded –Varchar(n): variable length Number –Integer: 32 bit –Decimal(5,2): –Real, Double: 32 bit,
Creating Database Tables © Abdou Illia MIS Spring /21/2015.
Creating Database Tables CS 320. Review: Levels of data models 1. Conceptual: describes WHAT data the system contains 2. Logical: describes HOW the database.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Copyright ©2014 Pearson Education, Inc. Chapter 6 Physical Design Chapter6.1.
Database Fundamentals
DATABASES AND SQL. Introduction Relation: Relation means table(data is arranged in rows and columns) Domain : A domain is a pool of values appearing in.
Copyright © Curt Hill SQL The Data Definition Language.
Overview Classes of datatypes available in Oracle 10g – Character – Numeric – Long, Raw – Dates/Times – Large Objects (LOBs) – ROWID – Specialized 1.
Working with Data Types February 7, 2015 John Deardurff Website:
Module 2 Working with Data Types. Module Overview Using Data Types Working with Character Data Converting Data Types Working with Specialized Data Types.
Basis Data Terapan Yoannita. SQL Server Data Types Character strings: Data typeDescriptionStorage char(n)Fixed-length character string. Maximum 8,000.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Chapter 8 Part 1 SQL-99 Schema Definition, Constraints, Queries, and Views.
Chapter 7 SQL HUANG XUEHUA. SQL SQL server2005 introduction Install components  management studio.
Winter 2006Keller Ullman Cushing8–1 Turning in Assignments Please turn in hard copy (use only in the direst of circumstances). I am not your secretary.
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
CSC 2720 Building Web Applications Database and SQL.
Sizing Basics  Why Size?  When to size  Sizing issues:  Bits and Bytes  Blocks (aka pages) of Data  Different Data types  Row Size  Table Sizing.
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
Module 3: Creating Data Types and Tables. Overview Working with Data Types Working with Tables Generating Column Values Generating Scripts.
SCUHolliday - coen 1788–1 Schedule Today u Modifications, Schemas, Views. u Read Sections (except and 6.6.6) Next u Constraints. u Read.
Advanced Database CS-426 Week 1 - Introduction. Database Management System DBMS contains information about a particular enterprise Collection of interrelated.
Data Types Lesson 4. Skills Matrix Table A table stores your data. Tables are relational in that they are organized as rows and columns (a matrix). Each.
Advanced Web 2012 Lecture 3 Sean Costain What is a Database? Sean Costain 2012 A database is a structured way of dealing with structured information.
Session 11 Creating Tables and Using Data Types. RDBMS and Data Management/Session 11/2 of 40 Session Objectives Define the data types and list the categories.
Data types  CHAR (size): This data type is used to store character strings values of fixed length. The size in brackets determines the number of characters.
Sql DDL queries CS 260 Database Systems.
IMS 4212: Data Modeling—Attributes and Domains 1 Dr. Lawrence West, Management Dept., University of Central Florida Attributes and Domains.
SQLite DB Storing Data in Android RAVI GAURAV PANDEY 1.
©Silberschatz, Korth and Sudarshan1 Structured Query Language (SQL) Data Definition Language Domains Integrity Constraints.
1 CS 430 Database Theory Winter 2005 Lecture 11: SQL DDL.
Relational Databases and MySQL. Relational Databases Relational databases model data by storing rows and columns in tables. The power of the relational.
Chapter One Lesson Three DATA TYPES ©
Academic Year 2015 Autumn. MODULE CC2006NI: Data Modelling and Database Systems Academic Year 2015 Autumn.
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Basic Data Types อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 4.
What is your Character Data Type? March 5, 2016 John Deardurff Website:
Creating Database Objects
Introduction To Oracle
Module 2: Creating Data Types and Tables
CIS 136 Building Mobile Apps
Lecture 6 Data Model Design (continued)
SQL – Data types.
Lesson 7 Managing Data Creating a database with Web Matrix.
Attributes and Domains
EPSII 59:006 Spring 2004.
14 T-SQL Functions You May Not Know
What is your Character Data Type?
Working with Data Types
Database systems Lecture 2 – Data Types
CIS 136 Building Mobile Apps
Defining a Database Schema
PT2520 Unit 5: Physical Design
Attributes and Domains
Chapter 2: Creating And Modifying Database Tables
Chapter 4 Introduction to MySQL.
Kirkwood Center for Continuing Education
Creating Database Objects
Database Instructor: Bei Kang.
SQL (Structured Query Language)
Presentation transcript:

TIPI PODATKOV

Načrt Najprej je potrebno dobro premisliti o problemu Katere podatke hranimo, kako podatke razporediti v tabele, kakšne vrste podatkov so,

Tipi podatkov Žal vsak RDBMS počne to po svoje Razlog: koliko prostora porabiti za podatek Približno "standardni" tipi: – char oz. varchar za znake – integer – float (ali double) Pri delu s programi: – Preslikava med tipi v bazi in tipi v programskem jeziku

char, varchar in varchar2 char – Fiksna velikost prostora – Kadar se podatki ne bodo spreminjali glede dolžine – Učinkovita izraba prostora (če so nizi res dolgi, kot je deklarirano), hitrost, ampak teževe, če bi imeli daljši podatek varchar – Porabljeni prostor se prilagaja dejanski dolžini – Načeloma počasneje, a bolj fleksibilno kar se prostora tiče varchar2 – Vpelje Oracle – V tem trenutku ni bistvene razlike, v prihodnosti verjetno da – Načeloma priporočajo uporabo varchar2

Tipi Data TypeSyntaxExplanation (if applicable) integer smallint numericnumeric(p,s) Where p is a precision value; s is a scale value. For example, numeric(6,2) is a number that has 4 digits before the decimal and 2 digits after the decimal. decimaldecimal(p,s)Where p is a precision value; s is a scale value. real Single-precision floating point number double precision Double-precision floating point number floatfloat(p)Where p is a precision value. characterchar(x) Where x is the number of characters to store. This data type is space padded to fill the number of characters specified. character varyingvarchar2(x) Where x is the number of characters to store. This data type does NOT space pad. bitbit(x)Where x is the number of bits to store. bit varyingbit varying(x) Where x is the number of bits to store. The length can vary up to x.

Tipi nad. Data TypeSyntaxExplanation (if applicable) date Stores year, month, and day values. time Stores the hour, minute, and second values. datetime Stores year, month, day, hour, minute, and second values. timestamp Stores unique year, month, day, hour, minute, and second values. time with time zone Exactly the same as time, but also stores an offset from UTC of the time specified. timestamp with time zone Exactly the same as timestamp, but also stores an offset from UTC of the time specified. year-month interval Contains a year value, a month value, or both. day-time interval Contains a day value, an hour value, a minute value, and/or a second value.

MS SQL Ime jezika: Transact-SQL Točno računanje – int, bigint, numeric, money … Premična vejica – float, real Binarni nizi – binary, image Znakovni nizi – char, varchar, text Znakovni nizi v Unicode – nchar, nvarchar, text Datum in čas – date, time, datetime … Ostali – xml, timestamp … Glej:

SQLite 3 NULL. The value is a NULL value. INTEGER. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value. REAL. The value is a floating point value, stored as an 8-byte IEEE floating point number. TEXT. The value is a text string, stored using the database encoding (UTF-8, UTF-16BE or UTF- 16LE). BLOB. The value is a blob of data, stored exactly as it was input.

Druge baze PostgreSQL: – tml tml SQLLIte (Python): – MySQL: – types.html types.html Pogosto RDBMS omogoča tvorbo vzdevkov (ALIAS) za druga imena