Databases - בסיסי נתונים

Slides:



Advertisements
Similar presentations
 2003 Prentice Hall, Inc. All rights reserved. Chapter 22 – Database: SQL, MySQL, DBI and ADO.NET Outline 22.1 Introduction 22.2 Relational Database Model.
Advertisements

2 Copyright © 2004, Oracle. All rights reserved. Restricting and Sorting Data.
1 Introduction to Web Application Introduction to Data Base.
CSCI 3328 Object Oriented Programming in C# Chapter 12: Databases and LINQ 1 Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
Exercise SELECT authorID, lastName FROM authors AuthorID FirstName
Ceng 356-Lab2. Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort the.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 25 – Database: SQL, ADO and RDS Outline 25.1Introduction 25.2Relational Database Model 25.3Relational.
Jaeki Song JAVA Lecture 11 Java Database Connectivity.
Intro to JDBC To effectively use Java Data Base Connectivity we must understand: 1.Relational Database Management Systems (RDBMS) 2.JDBC Drivers 3.SQL.
LOGO 1 Lab_02: Basic SQL. 2 Outline  Database Tables  SQL Statements  Semicolon after SQL Statements?  SQL DML and DDL  SQL SELECT Statement  SQL.
15 Structured Query Language (SQL). 2 Objectives After completing this section, you should be able to: Understand Structured Query Language (SQL) and.
CHAPTER 7 Database: SQL, MySQL. Topics  Introduction  Relational Database Model  Relational Database Overview: Books.mdb Database  SQL (Structured.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
 2003 Prentice Hall, Inc. All rights reserved. 1 Java Database Connectivity with JDBC TM.
Database A collection of related data. Database Applications Banking: all transactions Airlines: reservations, schedules Universities: registration, grades.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
CHAPTER 8 Database: SQL, MySQL. Topics  Introduction  Relational Database Model  Relational Database Overview: Books.mdb Database  SQL (Structured.
Database: SQL and MySQL
SQL 101 for Web Developers 14 November What is a database and why have one? Tables, relationships, normalization SQL – What SQL is and isn’t – CRUD:
2 Copyright © Oracle Corporation, All rights reserved. Restricting and Sorting Data.
2 Copyright © 2004, Oracle. All rights reserved. Restricting and Sorting Data.
4 Copyright © 2006, Oracle. All rights reserved. Restricting and Sorting Data.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
1 Databases November 15, 2005 Slides modified from Internet & World Wide Web: How to Program (3rd) edition. By Deitel, Deitel, and Goldberg. Published.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
BY SATHISH SQL Basic. Introduction The language Structured English Query Language (SEQUEL) was developed by IBM Corporation, Inc., to use Codd's model.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Topic 1: Introduction to SQL. SQL stands for Structured Query Language. SQL is a standard computer language for accessing and manipulating databases SQL.
5. Simple SQL using Oracle1 Simple SQL using Oracle 5. Working with Tables: Data management and Retrieval 6. Working with Tables: Functions and Grouping.
SQL. คำสั่ง SQL SQL stands for Structured Query Language is a standard language for accessing and manipulating databases.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
2 Copyright © 2004, Oracle. All rights reserved. Restricting and Sorting Data.
5. Simple SQL using Oracle1 Simple SQL using Oracle 5. Working with Tables: Data management and Retrieval 6. Working with Tables: Functions and Grouping.
2 Copyright © 2009, Oracle. All rights reserved. Restricting and Sorting Data.
Selecting Data Database Administration Fundamentals LESSON 3.1a.
Database: SQL, MySQL, LINQ and Java DB © by Pearson Education, Inc. All Rights Reserved.
ITS232 Introduction To Database Management Systems Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi MARA (UiTM), Kedah.
Simple Queries DBS301 – Week 1. Objectives Basic SELECT statement Computed columns Aliases Concatenation operator Use of DISTINCT to eliminate duplicates.
SQL: Structured Query Language It enables to create and operate on relational databases, which are sets of related information stored in tables. It is.
COM621: Advanced Interactive Web Development Lecture 11 MySQL – Data Manipulation Language.
1 ORACLE I 3 – SQL 1 Salim Phone: YM: talim_bansal.
 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.
SQL SQL Ayshah I. Almugahwi Maryam J. Alkhalifa
ORDER BY Clause The result of a query can be sorted in ascending or descending order using the optional ORDER BY clause. The simplest form of.
Web Systems & Technologies
CHAPTER 7 DATABASE ACCESS THROUGH WEB
Cosc 5/4730 Sqlite primer.
Writing Basic SQL SELECT Statements
 2012 Pearson Education, Inc. All rights reserved.
Introduction to Structured Query Language(SQL)
LESSON 3.1a Database Administration Fundamentals Selecting Data.
Server-Side Application and Data Management IT IS 3105 (FALL 2009)
JDBC.
Databases Intro (from Deitel)
Chapter 22 - SQL, MySQL, DBI and ADO
Introduction To Structured Query Language (SQL)
Database Design and Development
Introduction To Structured Query Language (SQL)
MySQL Database System Installation Overview SQL summary
Lecture 11 Database Connection
MySQL Database System Installation Overview SQL summary
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
Java Chapter 6 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Databases - בסיסי נתונים מרצה: אבי רוזנפלד rosenfa@gmail.com rosenfa@gmail.com

מידע- קבצים שדות רשומות מידע בצורה חופשי (קובץ text) נתון אחד בעל משמעות לוגית (ת.ז. שם וכו') רשומות אוסף של שדות בעלי קשר לוגי לדוגמא רשומה על לקוח (שם, כתובת, ת.ז. וכו') rosenfa@gmail.com

דוגמא- number name department salary location עמודה עמודה שדה שדה Kerwin 413 2000 New Jersey 34589 Larson 642 1800 Los Angeles 35761 Myers 611 1400 Orlando 47132 Neumann 9000 78321 Stephens 8500 רשומה (שורה) number name department salary location 23603 Jones 413 1100 New Jersey 24568 עמודה שדה עמודה שדה rosenfa@gmail.com

מפתחות- שדה עם ערך חד-ערכי. הדרך לזהות רשומה מסוימת. דרך חשובה לחפש מידע. איזה שדה (או שדות) יכולים להיות מפתח בטבלה הקודמת? תשובה – number, name, salary rosenfa@gmail.com

מה עושים עם מסדי הנתונים? אחזור רשומות (חיפוש אחרי מידע)- הוצאת דוחות. עדכון מידע- מחיקת נתונים, שינוי, הוספה. rosenfa@gmail.com

תוכנה ושפות למסדי נתונים- יש הרבה מתחרים ליצירת תוכנה למוסדי נתונים Access, Oracle, Sybase, SAP ועוד. הבדלים ב- GUI, במהירות הטיפול במידע, וכו'... יש שפות לעדכון המידע / לשאילתות. SQL = Structured Query Language חלק חשוב מהקורס מסדי נתונים. rosenfa@gmail.com

מה עוד אפשר לעשות עם המידע? בינה מלאכותית. ניתוח אוטומטי של המידע. Data Mining(כרית מידע) – הפעלת תוכניות לגילוי מידע טמון בבסיסי נתונים. מציאת תלויות מתוך המידע. סיווג מידע – מאיזה קטגוריה המידע? סיכום אוטומטי. מידול של המידע (Visualization Tools). rosenfa@gmail.com

ארכיטקטורה של מערכות מידע מערכות מידע (Information Systems) הינן מערכות מבוססות מחשב המעבדות נתונים (קלט) ומפיקות את מידע כתוצר העיבוד (פלט). מורכב מהמחשבים עצמם, תקשורת, והיישומים. בעבר היו מחשבי-על (supercomputers, mainframes)– היום כמעט כל המחשבים הם PC רגילים. rosenfa@gmail.com

שרת לקוח- יש מחשב אחד עם המידע (השרת). יש הרבה מחשבים שצריכים את המידע (הלקוח). מן הסתם גם הלקוח יכול לשנות מידע על השרת. שרתי WEB. שרתי מסדי נתונים. שרתי קבצים (קבצי Word, Excel וכו'). rosenfa@gmail.com

רשתות קצה לקצה (P2P)- כל מחשב מסוגל לספק מידע. יותר שיווני. כל מחשב צריך פחות או יותר אותן יכולות חישוב ותקשורת. רוב החברות משתמשות במודל זה. קשה לנהל ולעקוב אחרי מי מעביר את המידע. בשימוש לגניבה (piracy) של תוכנה. יש הרבה יישומים חוקיים במודל זה! rosenfa@gmail.com

SQL (Structured Query Language) rosenfa@gmail.com

טבלה לדוגמא- rosenfa@gmail.com

Basic SELECT Query- בצורה כללית, על מנת לראות את כל הטבלה: SELECT * FROM tableName לדוגמא, כך נראה את טבלת הסופרים: SELECT * FROM Authors הצגת תעודת הזהות ושם המשפחה של הסופרים בטבלה: SELECT authorID, lastName FROM Authors rosenfa@gmail.com

הפקודה - WHERE SELECT * FROM Authors WHERE lastName='Deitel' SELECT authorID, lastName FROM Authors rosenfa@gmail.com

דוגמאות- SELECT * FROM Authors WHERE lastName='Deitel' SELECT * FROM Authors WHERE authorID > 9 rosenfa@gmail.com

Boolean Logic Operator Description = Equal <> Not equal > Greater than < Less than >= Greater than or equal <= Less than or equal LIKE Search for a pattern rosenfa@gmail.com

הפקודה ORDER BY מיון התוצאות בסדר עולה או יורד: ASC = Ascending (סדר עולה) DESC = Descending (סדר יורד) בצורה כללית, על מנת למיין את התוצאות נכתוב כך: SELECT columnName1, columnName2 FROM tableName ORDER BY column ASC rosenfa@gmail.com

דוגמאות- SELECT * FROM Authors ORDER BY lastName ASC SELECT * FROM Authors ORDER BY lastName DESC rosenfa@gmail.com

הפקודה - INSERT Inserts new row in table הפקודה בצורה כללית: דוגמא: INSERT INTO tableName ( columnName1, columnName2, …, columnNameN ) VALUES ( value1 , value2, …, valueN ) דוגמא: INSERT INTO Authors VALUES (14, 'Shwartz') rosenfa@gmail.com

הפקודה - DELETE הפקודה בצורה כללית: דוגמא: DELETE * FROM table_name Deletes rows הפקודה בצורה כללית: DELETE * FROM table_name דוגמא: DELETE * FROM Authors DELETE * FROM Authors WHERE LastName = 'Deitel' rosenfa@gmail.com

הפקודה - LIKE הפקודה Like תבוא עם הפקודה Select. מוצאת תוצאות דומות ל... דוגמא 1- מציאת תוצאות המתחילות ב- S: SELECT * FROM table_name WHERE supplier_name like 'S%' מציאת תוצאות המכילות S: SELECT * FROM table_name WHERE supplier_name like ‘%S%' Finds s anywhere in string rosenfa@gmail.com 21