Retele de senzori Curs 2 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.

Slides:



Advertisements
Similar presentations
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Advertisements

Transaction.
CSCI 260 Database Applications Chapter 1 – Getting Started.
Introduction to Structured Query Language (SQL)
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
1 Pertemuan 09 Database Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
Introduction to Structured Query Language (SQL)
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Chapter 9: Creating Database Conventions & Standards MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
Database Design for DNN Developers Sebastian Leupold.
Databases C HAPTER Chapter 10: Databases2 Databases and Structured Fields  A database is a collection of information –Typically stored as computer.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Database Technical Session By: Prof. Adarsh Patel.
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
TM 7-1 Copyright © 1999 Addison Wesley Longman, Inc. Physical Database Design.
Database Management. ICT5 Database Administration (DBA) The DBA’s tasks will include the following: 1. The design of the database. After the initial design,
MIS 301 Information Systems in Organizations Dave Salisbury ( )
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
1 Working with MS SQL Server Textbook Chapter 14.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
1.NET Web Forms Business Forms © 2002 by Jerry Post.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Dimu' Rumpak © 2009 by Prentice Hall 1 Getting Started Didimus Rumpak, M.Si. Database Concepts Chapter 1 1.
G063 - Distributed Databases. Learning Objectives: By the end of this topic you should be able to: explain how databases may be stored in more than one.
Getting Started Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Views Lesson 7.
Database Management COP4540, SCS, FIU Physical Database Design (ch. 16 & ch. 3)
Database collection of related information stored in an organized form Database program software tool for storage & retrieval of that information.
Module 4 Designing and Implementing Views. Module Overview Introduction to Views Creating and Managing Views Performance Considerations for Views.
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,
Lesson 2: Designing a Database and Creating Tables.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Working with SQL Server Database Objects Faculty: Nguyen Ngoc Tu.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Session 1 Module 1: Introduction to Data Integrity
AJAX. Ajax  $.get  $.post  $.getJSON  $.ajax  json and xml  Looping over data results, success and error callbacks.
Creating Indexes on Tables An index provides quick access to data in a table, based on the values in specified columns. A table can have more than one.
Data The fact and figures that can be recorded in system and that have some special meaning assigned to it. Eg- Data of a customer like name, telephone.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Data Resource Management Application Layer TPS A RCHITECTURE Data Layer Sales/MarketingHR Finance/Accounting Operations Spreadsheet Data MS Access Accounts.
SQL Triggers, Functions & Stored Procedures Programming Operations.
Database Planning Database Design Normalization.
SQL Basics Review Reviewing what we’ve learned so far…….
Retele de senzori Curs 1 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.
Views / Session 3/ 1 of 40 Session 3 Module 5: Implementing Views Module 6: Managing Views.
Introduction to Database Programming with Python Gary Stewart
Converting ER/EER to logical schema; physical design issues 1.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
Getting started with Accurately Storing Data
Miscellaneous Excel Combining Excel and Access.
A Guide to SQL, Seventh Edition
Module 11: File Structure
Physical Changes That Don’t Change the Logical Design
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
STRUCTURED QUERY LANGUAGE
Teaching slides Chapter 8.
Physical Database Design
Data Model.
Database Systems Instructor Name: Lecture-3.
Chapter 11 Managing Databases with SQL Server 2000
Presentation transcript:

Retele de senzori Curs 2 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR

Page  2 Virtual Machine – short introduction It’s like installing software applications on a real computer, but in this case that computer doesn’t exist. Anyway it could be executed only on a real computer (a virtual computer inside a real computer). On a real computer could be launched as many virtual machines as needed, and as soon there are resources (computing, memory) available.

Page  3 Virtual Machine – short introduction A virtual machine could be created with an application like VMWare Workstation 7 and executed with VMWare Player. when it is initially created it is required to specify the operating system (OS) which will be installed on it and the path to the OS kit. after the OS is installed it could be installed on the virtual machine any applications the users desires (more applications installed, more space occupied by the virtual machine on the real computer’s hard disk). then it could be easily moved or copied to another real computer and executed properly. A virtual machine is represented on a real computer by a set of files and when it is executed, use, by sharing, the resources of the real computer.

Page  4 Database – role and components The main role of a database it to store properly the information, ensure a fast processing and data integrity. It could store different type of information: strings (e.g. “brasov”); integer numbers (e.g. 117); real numbers (e.g ); date & time (e.g. 27/11/ :55:00); XML. SQL (Structured Query Language) is a language defined for processing the information from a database. The main operation which could be executed with information are: INSERT, UPDATE, DELETE, SELECT. e.g. SELECT * FROM users_table ORDER BY name.

Page  5 XML XML (eXtensible Markup Language) it was designed for permitting the transfer of information between software applications and have a structured format and easily understandable. the useful information is posted between the tags or as a attribute for a tag. e.g. Tove Jani Reminder Don't forget me this weekend!

Page  6 Database – role and components It permit to define inside it: tables (for a better organization of the information); diagrams (with relationships between tables); views (for a fast processing of the information); stored procedures and triggers (the stored procedures could be called when it is necessary to execute some processing; the triggers are executed on different types of events – insert, update, delete); security rules (who can access the database and which type of functionalities a user could call; there are defined specific users for the database).

Page  7 Database – tables each type of information is stored into a separate table. a table is defied as a set of columns (each column could be of different type). Table definition Table data

Page  8 Laboratory use the SQL Server Management Studio to create a database in MsSQL (the name of the database will be test); into the database a single table will be created (students – id, firstname, lastname, age) id - is used to identify a record and should be set with the property Identity Specification: Yes (this will make him to increment automatically at every record inserted).

Page  9 Laboratory New Query option will be selected from the SQL Server management Studio application for being able to execute SQL commands. using the table just created insert some records into it using the INSERT command: e.g. INSERT into students (firstname, lastname, age) values (‘John’, ‘Smith’, 23); select the records from the table students using the SELECT command e.g. SELECT * FROM students ORDER BY firstname; return the list of all students ordered by the firstname column.

Page  10 Database – tables and diagrams the tables are interconnected with relationships (one-to-one; one-to- many; many-to-one; like in the diagram presented below); e.g. the customer table is linked to invoice table (relation one-to-many), which means that a customer could have multiple invoices and an invoice is only for one customer.

Page  11 Database – views A view is a virtual table composed of multiple information from one or more tables. The advantages of views over tables: can represent a subset of data contained in a table; can join information from multiple table into a single virtual table; simplify the complexity of the data; they require small space to store (only the definition of the view is saved by the database, not all the information which the view retrieves); could provide extra security.

Page  12 Database – stored procedures and triggers Stored procedure example (it retrieves the information stored in column1 and column2 from table table1): CREATE PROCEDURE sp_myStoredProcedure AS Select column1, column2 From Table1 Go Triggers: execute procedures on different types of events (insert, update, delete). E.g. when information about a new user is inserted into the users table, into the table s is generated automatically an address.

Page  13 Database – transactions The transactions are very useful when we have to modify information in multiple tables in the same time. A transaction is represented by at least 2 database operations (if one operations fails all other operations roll back – their modifications to database are not saved; if all operations are successfully the modifications to the database are saved).

Page  14 Database from database theory (we go back to continue with) database optimization (course 1)

Page  15 Database optimization - Normalization It supposes: avoid similar information; avoid update anomalies; ensure the relation between attributes; the verification of the updates should not affect the integrity of the database. The normalization should simplify the work and reduce the possibility to get errors at the update of the information from the database. The normalization method permit to split a table in two or more tables and a set of normal forms (rules) should be followed for accomplish this task.

Page  16 Database optimization - Normalization before after

Page  17 Database optimization - Indexes Is the method with the higher impact on the queries execution. It could contain only one column or multiple columns from the same table (the order matters). The definition of the index depends on the most used queries executed on that table. Rules at creating an index: the column with the fewest unique values should be inserted first; for a table is preferable to have maximum 4-5 index objects. Since each index should be maintained and updated it have a proper cost. is preferable to have columns with integer values than columns with text; the index slows down the operation of insert, delete or update; it is recommended to use a clustered index than a non-clustered one (a clustered index orders the information on the hard disk, for fast reading of information when it is required).

Page  18 Database optimization - Indexes e.g. index after a date & time column (most used at selecting a set of records for a specific period of time). For a table where are modified many of the records the index could become fragmentized (the performances of that table decrease). It is necessary to update the index: first method: delete the index and create it again; second method: defragmentation of the index. the first method is recommended, even it requires more time to be done and block the access to the tables.

Page  19 Database optimization - Statistics The statistics represent metadata (information about data): store information about index and columns from table; it is able to determine if an index improve the processing time or not; together with the indexes are one of the most important components which helps at improving the database performances; the database use statistics when it generates execution plans for accessing the necessary data. if they are wrong the database will have to search a long way until found the necessary data (or never found it); A database should be able: to create automatically the statistics; to update them also automatically.

Page  20 Database optimization - partitioning When a database contains a lot of information it is necessary to partition them according to some rules. Partitioning = decompose a table into more tables. Partitioning horizontal (records from a table are put in separate tables); vertical (columns from a table are put in separate tables – rarely used).

Page  21 Database optimization – horizontal partitioning e.g. information from a table is divided into other tables, according to the month when the information was recorded.