Человеко-машинное взаимодействие Лекция 5 Мерзлякова Екатерина Юрьевна к.т.н. доцент ПМиК.

Slides:



Advertisements
Similar presentations
Qt basic programming Markus Veijola Lisätietoja: Sähköposti: Puh:
Advertisements

Rapid GUI Programming with Python and Qt
Day 3 - Basics of MySQL What is MySQL What is MySQL How to make basic tables How to make basic tables Simple MySQL commands. Simple MySQL commands.
MySQL-Database Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
Informatiesystemen in de Bouw 7M711 Joran Jessurun en Jos van Leeuwen Week 3.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
Chapter 08 How to Insert, Update, and Delete Data MIT 22033, Database Management Systems By. S. Sabraz Nawaz.
Introduction to Information and Computer Science Databases and SQL Lecture b This material (Comp4_Unit6b) was developed by Oregon Health & Science University,
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
SQLite 1 CS440. What is SQLite?  Open Source Database embedded in Android  SQL syntax  Requires small memory at runtime (250 Kbytes)  Lightweight.
Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial Password: UWPstudent Password is case sensitive.
SQL Server to MySQL Database Migration SQLWays - Migration Software Presentation March 2009 Copyright (c) Ispirer Systems Ltd.
Ling Guo Feb 15, 2010 Database(RDBMS) Software Review Oracle RDBMS (Oracle Cooperation) 4()6 Oracle 10g Express version DB2 (IBM) IBM DB2 Express-C SQL.
PHP Data Object (PDO) Khaled Al-Sham’aa. What is PDO? PDO is a PHP extension to formalise PHP's database connections by creating a uniform interface.
MOODLE and Other Database Integration ผศ. ดร. เด่นพงษ์ สุดภักดี ผู้ช่วยอธิการบดีฝ่ายวิชาการ และ ผู้อำนวยการสำนักนวัตกรรมการเรียนการสอน มหาวิทยาลัยขอนแก่น.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Introduction to SQL Steve Perry
Structured Query Language. Brief History Developed in early 1970 for relational data model: –Structured English Query Language (SEQUEL) –Implemented with.
Web Services Week 8 Aims: –Using web services as front ends to databases Objectives: –Review of relational databases –Connecting to and querying databases.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
Stored Procedures, Triggers, Program Access Dr Lisa Ball 2008.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Lecture 10 – MYSQL and PHP (Part 2)
РНР. Уровень 4. Проектирование и разработка сложных веб-проектов на РНР 5 PHP Data Objects.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
CS 3630 Database Design and Implementation. Assignment 3 Style! Agreement between database designer and the client. UserName1_EasyDrive UserName2_EasyDrive.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
Человеко-машинное взаимодействие Лекция 6 Мерзлякова Екатерина Юрьевна к.т.н. доцент ПМиК.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Visual Programing SQL Overview Section 1.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
PHP Workshop ‹#› PHP Data Object (PDO). PHP Workshop ‹#› What is PDO? PDO is a PHP extension to formalise PHP's database connections by creating a uniform.
CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton.
Mobile Software Development ISCG 7424 Department of Computing UNITEC John Casey and Richard Rabeder SQLite and Permissions.
CF Database I Jeff Peters Why Are You Here? Data and Persistence ODBC Relational vs. Flat SQL CFQUERY, CFOUTPUT, CFLOOP Practicum.
SQL Overview Structured Query Language. Description  When Codd first described the theory of relational databases, he asserted that there should be a.
PHP Workshop ‹#› أطلق إبداعك 2 أطلق إبداعك 2 مدرس معتمد من مركز زووم PHP Data Object (PDO)
1 SY306: Web and Databases for Cyber Operations Slide Set: 11 Databases - Relational Model.
1. Playing with SQLite Database  SQLite : Database specific name for Android Application  For windows there are several kind of database name : Mysql,
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Working with MySQL A290/A590, Fall /07/2014.
Querying Information in a Database. CONTENTS Relational Database Systems Creating Database with SQL Server Reading Data with LINQ Requirements to Get.
Databases and SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
Programming for the Web MySQL Command Line Using PHP with MySQL Dónal Mulligan BSc MA
Introduction to Databases & SQL Ahmet Sacan. What you’ll need Firefox, SQLite plugin Mirdb and Targetscan databases.
Data generators by Jan Kincl. Data Generators - Jan Kincl2 Outline Introduction Introduction Main features Main features MySQL Data Generators MySQL Data.
Lecture 1.21 SQL Introduction Steven Jones, Genome Sciences Centre.
DBM 380 Week 2 Individual Assignment Database Design Paper Write a 350- to 700-word paper in which you do the following: Explain what database systems.
CS 3630 Database Design and Implementation
CS320 Web and Internet Programming SQL and MySQL
CS311 Database Management system
Principles of Software Development
ДЕМО: Создание базы данных в «облаке»
Constraints & Triggers
For student, require values for name and address.
CS3220 Web and Internet Programming SQL and MySQL
Charles Severance Single Table SQL.
CS3220 Web and Internet Programming SQL and MySQL
Updating Databases With Open SQL
ITI 257 Data Analysis with Power BI
Updating Databases With Open SQL
Presentation transcript:

Человеко-машинное взаимодействие Лекция 5 Мерзлякова Екатерина Юрьевна к.т.н. доцент ПМиК

Qt и SQL. Программирование баз данных

Qt и SQL. Создание таблицы QtSql. QSqlQuery CREATE TABLE addressbook ( number INTEGER PRIMARY KEY NOT NULL, name VARCHAR(15), phone VARCHAR(12), VARCHAR(15) );

Qt и SQL. Добавление данных INSERT INTO VALUES INSERT INTO addressbook (number, name, phone, ) VALUES(1, 'Piggy', ' ', INSERT INTO addressbook (number, name, phone, ) VALUES(2, 'Kermit', ' ',

Qt и SQL. Выборка данных SELECT… FROM… WHERE SELECT FROM addressbook WHERE name = 'Piggy';

Qt и SQL. Изменение данных UPDATE... SET WHERE UPDATE addressbook SET = WHERE name = 'Piggy';

Qt и SQL. Удаление данных DELETE... FROM WHERE DELETE FROM addressbook WHERE name = 'Piggy';

Классы модуля QtSql Уровень драйверов: QSqlDriver, QSqlDriverCreator, QSqlDriverCreatorBase, QSqlDriverPlugin и QSqlResult Программный уровень: QSqlDatabase, QSqlQuery, QSqlError, QSqlField, QSqlIndex и QSqlRecord Уровень пользовательского интерфейса: QSqlQueryModel, QSqlTableModel и QSqlRelationalTableModel

Соединение с базой данных QSqlDatabase::addDatabase() имя базы данных — передается в метод QSqlDatabase:: setDatabaseName(); имя пользователя, желающего к ней подключиться, — передается в метод QSqlDatabase::setUserName(); имя компьютера, на котором размещена база данных, — передается в метод QSqlDatabase::setHostName(); пароль — передается в метод QSqlDatabase::setPassword().

Соединение с базой данных

Драйверы базы данных QDB2 -- IBM DB2 версии не ниже 7.1; QIBASE -- Borland InterBase; QMYSQL -- MySQL; QOCI -- Oracle; QODBC -- ODBC (в том числе Microsoft SQL Server); QPSQL -- PostgreSQL; QSQLITE -- SQLite версии не ниже 3; QSQLITE2 -- SQLite версии 2; QTDS -- Sybase Adaptive Server.

Открытие базы данных

Запросы

QSqlQuery SELECT next() previous() first() last() seek() size()

Вставка данных query.prepare("INSERT INTO addressbook (number, name, phone, ) VALUES(:number, :name, :phone, : );"); query.bindValue (" :number", "1"); query.bindValue(":name", "Piggy"); query.bindValue(":phone", " "); query.bindValue(": ",

Вставка данных query.prepare("INSERT INTO addressbook (number, name, phone, ) VALUES(?, ?, ?, ?);"); query.bindValue("1");query.bindValue("Piggy"); query.bindValue(" ");

Вставка данных

SQLiteManager

SQLiteManager

SQLiteManager и QTCreator

QSqlTableModel

setEditStrategy(): onRowChange onFieldChange OnManualSubmit

QSqlQueryModel