SQL: Queries, Constraints, Triggers
|
|
- Rosa Wilkins
- 5 years ago
- Views:
Transcription
1 اصول طراحی پایگاه داده ها Principles of Database Design SQL: Queries, Constraints, Triggers مدرس : عاطفه خزاعی 1
2 زبان پرس و جوی SQL شرکت IBM در دهه 1970 در سیستم مدیریت پایگاهداده System R برای اولین بار از این زبان استفاده نمود. زمانی که توسط شرکتهای زیادی استفاده شد نیاز به استاندارد شدن پیدا کرد. SQL-86 SQL-89 SQL-92 SQL-99 SQL-2003 استانداردها: 2
3 زبان پرس و جوی SQL چند جنبه دارد: Data Definition Language (DDL): subset of SQL that supports creation, deletion, and modification of definitions for tables and views. Other aspects: define integrity constraints on tables; specify access rights or privileges to tables or views. (Chapter 3) Data Manipulation Language (DML): subset of SQL that allows users to pose queries and to insert, delete, and modify rows. (Chapter 3) 3
4 زبان پرس و جوی SQL چند جنبه دارد: Triggers and Advanced Integrity Constraints. (Chapter 5) Embedded and Dynamic SQL. (Chapter 6) Client-Server Execution and Remote Database Access. (Chapter 7) Transaction Management. (Chapter 21) Security. (Chapter 21) Advanced features: object-oriented features (Chapter 23), recursive queries (Chapter 24), decision support queries (Chapter 25), and also addresses emerging areas such as data mining (Chapter 26), spatial data (Chapter 28), and text and XML data management (Chapter 27). 4
5 جدول های مثال Sailors (sid: integer, sname: string, rating: integer, age: real) Boats (bid: integer, bname: string, color: string) Reserves (sid: integer, bid: integer, day: date)
6 bid bname color جدول های مثال Sid sname rating age Sid bid day
7 جداول قایقران ها قایق ها و رزرو
8 شکل پایه یک پرس و جوی SQL SELECT FROM WHERE )رابطه( مورد نظر [DISTINCT] target-list relation-list qualification :relation-list اسامی جداول :target-list لیست ستون ها یا صفت های مورد نظر OR یا AND شرایط برای انتخاب سطرهای خاص با انواع ترکیبات :qualification و یا,,,,, :DISTINCT برای حذف تکراریها در رابطه )جدول( خروجی به کار میرود. این کلمه کلیدی الزامی نیست اما در SQL در حالت عادی بر عکس عملگرهای رابطهای تکراریها را حذف نمیکند. 8
9 مثال ساده SQL Find the names and ages of all sailors. SELECT DISTINCT S.sname, S.age sname age sname age With DISTINCT Without DISTINCT 9
10 مثال ساده SQL Find all sailors with a rating above 7. SELECT S.sid, S.sname, S.rating, S.age FROM Sailors AS S WHERE S.rating > 7 10
11 Conceptual Evaluation Strategy استراتژی ارزیابی مفهومی SELECT FROM WHERE [DISTINCT] target-list relation-list qualification مفهوم یک جمله ساده SQL را می توان با یک استراتژی مفهومی به شکل زیر بیان نمود: Compute the cross-product of relation-list. Discard resulting tuples if they fail qualifications. Delete attributes that are not in target-list. If DISTINCT is specified, eliminate duplicate rows. البته این استراتژی برای اجرا بهینه عمل نمیکند. در سیستمهای پایگاهداده برای اجرا از استراتژیهایی برای بهینه نمودن اجرا استفاده میگردد. 11
12 Find the names of sailors who have reserved boat number 103. SELECT S.sname Sailors S, Reserves R FROM WHERE S.sid=R.sid AND R.bid=103 SELECT sname FROM Sailors, Reserves WHERE Sailors.sid=Reserves.sid AND bid=103
13 Find the colors of boats reserved by Lubber. SELECT B.color, Reserves R, Boats B WHERE S.sid = R.sid AND R.bid = B.bid AND S.sname = 'Lubber' 13
14 Find name of sailors who ve reserved at least one boat SELECT S.sname, Reserves R WHERE S.sid=R.sid Would adding DISTINCT to this query make a difference? What is the effect of replacing S.sid by S.sname in the SELECT clause? Would adding DISTINCT to this variant of the query make a difference? 14
15 Compute increments for the ratings of persons who have sailed two different boats on the same day. یک واحد به رتبه ملوانهایی که دو قایق مختلف را در یک روز رزرو کردهاند بیفزایید. SELECT S.sname, S.rating+1 AS rating, Reserves R1, Reserves R2 WHERE S.sid = R1.sid AND S.sid = R2.sid AND R1.date = R2.date AND R1.bid <> R2.bid تمرین: اجرای این پرس و جو واقعا به مقادیر رتبهی ملوانها نمیافزاید. چگونه این کار را انجام دهیم 15
16 Find the ages of sailors whose name begins and ends with B and has at least three characters. این دو امکان میتوان دادههای مورد نظر را دادن با LIKE و :NOT LIKE با یک رشته کاراکتری به عنوان کرد. نشانوند جستجو و بیان شرایط مورد نظر بازیابی SELECT S.age WHERE S.sname LIKE 'B%B' 16
17 عملگرهای مجموعه ای در SQL معادل اشتراک INTERSECT معادل اجتماع UNION معادل تفاضل EXCEPT 17
18 Find sid s of sailors who ve reserved a red or a green boat SELECT S.sid, Boats B, Reserves R WHERE S.sid=R.sid AND R.bid=B.bid AND (B.color= 'red' OR B.color= 'green') SELECT S.sid, Boats B, Reserves R WHERE S.sid=R.sid AND R.bid=B.bid AND B.color= 'red' UNION SELECT S.sid, Boats B, Reserves R WHERE S.sid=R.sid AND R.bid=B.bid AND B.color='green' UNION: Can be used to compute the union of any two union-compatible sets of tuples (which are themselves the result of SQL queries). If we replace OR by AND in the first version, what do we get?
19 Find sid s of sailors who ve reserved a red and a green boat SELECT S.sid, Boats B1, Reserves R1, Boats B2, Reserves R2 WHERE S.sid=R1.sid AND R1.bid=B1.bid AND S.sid=R2.sid AND R2.bid=B2.bid AND B1.color= 'red' AND B2.color='green' SELECT S.sid, Boats B, Reserves R WHERE S.sid=R.sid AND R.bid=B.bid AND B.color= 'red' INTERSECT SELECT S.sid, Boats B, Reserves R WHERE S.sid=R.sid AND R.bid=B.bid AND B.color='green' INTERSECT: Can be used to compute the intersection of any two union-compatible sets of tuples. Included in the SQL/92 standard, but some systems don t support it.
20 Find the sids of all sailor's who have reserved red boats but not green boats. SELECT R.sid FROM Boats B, Reserves R WHERE R.bid = B.bid AND B.color = red EXCEPT SELECT R2.sid FROM Boats B2, Reserves R2 WHERE R2.bid = B2.bid AND B2.color = green در MySQL به جای NOT EXIST EXCEPT را داریم 20
21 Find all sids of sailors who have a rating of 10 or reserved boat 104. SELECT S.sid WHERE S.rating = 10 UNION SELECT R.sid FROM Reserves R WHERE R.bid =
22 پرس و جوی تودرتو Query( )Nested A very powerful feature of SQL: typically a WHERE clause can itself contain an SQL query! (Sometimes appear in the FROM and the HAVING clauses.) Find names of sailors who ve reserved boat #103 SELECT S.sname WHERE S.sid IN (SELECT R.sid FROM Reserves R WHERE R.bid=103) 22
23 پرس و جوی تودرتو Query( )Nested Find names of sailors who ve not reserved boat #103 SELECT S.sname WHERE S.sid NOT IN (SELECT R.sid FROM Reserves R WHERE R.bid=103) To find sailors who ve not reserved #103, use NOT IN. To understand semantics of nested queries, think of a nested loops evaluation: For each Sailors tuple, check the qualification by computing the subquery. 23
24 Find the names of sailors who have reserved a red boat. SELECT S.sname WHERE S.sid IN ( SELECT R.sid FROM Reserves R WHERE R. bid IN (SELECT B.bid FROM Boats B WHERE B.color = 'red' ) ) 24
25 Find the names of sailors who have not reserved a red boat. SELECT S.sname WHERE S.sid NOT IN ( SELECT R.sid FROM Reserves R WHERE R. bid IN (SELECT B.bid FROM Boats B WHERE B.color = 'red' ) ) IN, NOT IN? NOT IN, NOT IN? 25
26 Correlated Nested Queries Find names of sailors who ve reserved boat #103: SELECT S.sname WHERE EXISTS (SELECT * FROM Reserves R WHERE R.bid=103 AND S.sid=R.sid) EXISTS is another set comparison operator, like IN. 26
27 More on Set-Comparison Operators We ve already seen IN and EXISTS. Can also use NOT IN and NOT EXISTS. Also available: op ANY, op ALL, op IN,,,,, Find sailors whose rating is greater than that of some sailor called Horatio: SELECT * WHERE S.rating > ANY (SELECT S2.rating 2 WHERE S2.sname='Horatio') 28
28 More on Set-Comparison Operators Find sailors whose rating is greater than that of every sailor called Horatio: SELECT * WHERE S.rating > ALL (SELECT S2.rating 2 WHERE S2.sname='Horatio') 30
29 More on Set-Comparison Operators Find the sailor's with the highest rating. SELECT S.sid WHERE S.rating >= ALL ( SELECT S2.rating 2 ) 31
30 Rewriting INTERSECT Queries Using IN Find sid s of sailors who ve reserved both a red and a green boat: SELECT S.sid, Boats B, Reserves R WHERE S.sid=R.sid AND R.bid=B.bid AND B.color='red' AND S.sid IN (SELECT S2.sid 2, Boats B2, Reserves R2 WHERE S2.sid=R2.sid AND R2.bid=B2.bid AND B2.color='green') To find names (not sid s) of Sailors who ve reserved both red and green boats, just replace S.sid by S.sname in SELECT clause. (What about INTERSECT query?) Similarly, EXCEPT queries re-written using NOT IN. 32
31 Division in SQL Find sailors who ve reserved all boats. Let s do it without EXCEPT: (1) SELECT S.sname WHERE NOT EXISTS ((SELECT B.bid FROM Boats B) EXCEPT (SELECT R.bid FROM Reserves R WHERE R.sid=S.sid)) (2) SELECT S.sname WHERE NOT EXISTS (SELECT B.bid FROM Boats B WHERE NOT EXISTS (SELECT R.bid FROM Reserves R WHERE R.bid=B.bid AND R.sid=S.sid))
32 عمگرهای تجمیع Aggregate Operators افزایش چشمگیر در قابلیت های جبر رابطه ای COUNT (*) COUNT ( [DISTINCT] A) SUM ( [DISTINCT] A) AVG ( [DISTINCT] A) MAX (A) فقط نام یک ستون (A) MIN AVG ([DISTINCT] A): The average of all (unique) values in the A column. Find the average age of sailors with a rating of 10. SELECT AVG (S.age) WHERE S.rating=10? SELECT AVG ( DISTINCT S.age) WHERE S.rating=10
33 عمگرهای تجمیع Aggregate Operators MAX (A): The maximum value in the A column. COUNT (*) COUNT ( [DISTINCT] A) SUM ( [DISTINCT] A) AVG ( [DISTINCT] A) MAX (A) فقط نام یک ستون (A) MIN Find the name of sailor who have the max rating. SELECT S.sname WHERE S.rating= (SELECT MAX(S2.rating) 2)
34 نام و سن پیرترین قایقران )قایقران ها( Find the name and age of the oldest sailor. پرس و جوی اول اشتباه است! پرس و جوی سوم و دوم معادل هم هستند ولی برخی از سیستم ها پرس و جوی سوم را پشتیبانی نمیکنند. SELECT S.sname, MAX(S.age) SELECT S.sname, S.age WHERE S.age = (SELECT MAX(S2.age) 2) SELECT S.sname, S.age WHERE (SELECT MAX(S2.age) 2) = S.age
35 عمگرهای تجمیع Aggregate Operators COUNT ([DISTINCT] A): MIN (A) The number of (unique) values in the A column. COUNT (*) COUNT ( [DISTINCT] A) SUM ( [DISTINCT] A) AVG ( [DISTINCT] A) MAX (A) فقط نام یک ستون Count the number of sailors. SELECT COUNT(*)? SELECT COUNT(DISTINCT S.rating) WHERE S.sname='Bob' Count the number of different sailor names. SELECT COUNT( DISTINCT S.sname )
36 عمگرهای تجمیع Aggregate Operators COUNT (*) COUNT ( [DISTINCT] A) SUM ( [DISTINCT] A) AVG ( [DISTINCT] A) MAX (A) فقط نام یک ستون (A) MIN SUM ([DISTINCT] A): The sum of all (unique) values in the A column. MIN (A): The minimum value in the A column.
37 Find the names of sailors who are older than the oldest sailor with a rating of 10. SELECT S.sname WHERE S.age > ( SELECT MAX(S2.age ) 2 WHERE S2.rating = 10 ) SELECT S.sname WHERE S.age > ALL ( SELECT S2.age 2 WHERE S2.rating = 10 ) 39
38 Motivation for Grouping در مواردی ممکن است بخواهیم توابع تجمیع را برای گروههای مختلف به صورت مجزا داشته باشیم مثال: میانگین نمرات درس پایگاه داده برای هر ورودی مثال: برای هر سطح امتیاز level( )rating جوانترین قایقران را پیدا کنید. راه حل سریع: به ازای هر سطح امتیاز جوانترین قایقران را مییابیم For i = 1, 2,..., 10: SELECT MIN (S.age) WHERE S.rating = i اما نمی دانیم که چند سطح امتیاز داریم 40
39 پرس وجو با GROUP BY و HAVING SELECT FROM relation-list WHERE qualification GROUP BY grouping-list HAVING group-qualification [DISTINCT] target-list )MIN(S.age) target-list لیست ستونهای مورد نظر عبارت هایی با عملیات )مثال تجمیع لیست ستونها باید یک زیرمجموعه از grouping-list باشد و سطر خروجی )پاسخ( مربوط به یک گروه خاص است. باید دقت کرد که مواردی که در target-list می آید به ازای هر گروه باید یک مقدار داشته باشد. نام ستونی که داخل یک عملیات تجمیع میآید میتواند هر یک از ستونهای جدول باشد الزامی نیست که از grouping-list باشد. یک گروه مجموعهای از سطرهایی است که مقادیری یکسان برای همهی صفات grouping-list دارند. 41
40 Find the age of the youngest sailor for each rating level. SELECT S.rating, MIN(S.age) GROUP BY S.rating لیست ستونهای مورد نظر و عبارتهایی با عملیات تجمیع لیست ستونها باید در grouping-list بیاید و به ازای هر گروه باید یک مقدار داشته باشد 42
41 سن جوانترین قایقران از میان قایقران های باالی 18 سال برای هر رده امتیاز که حداقل 2 ملوان در آن گروه باشند. SELECT S.rating, MIN(S.age) AS minage WHERE S.age >= 18 GROUP BY S.rating HAVING COUNT(*) > 1 Answer relation: rating minage Sailors instance: sid sname rating age 22 dustin brutus lubber andy rusty horatio zorba horatio art bob frodo
42 اجرای پرس و جوی قبل Find age of the youngest sailor with age>=18, for each rating with at least 2 such sailors. rating age rating age rating minage
43 Find age of the youngest sailor for each rating with at least 2 sailors between 18 and 60. SELECT S.rating, MIN(S.age) AS minage WHERE S.age >= 18 AND S.age <= 60 GROUP BY S.rating HAVING COUNT(*) > 1 Answer relation: rating minage Sailors instance: sid sname rating age 22 dustin brutus lubber andy rusty horatio zorba horatio art bob frodo
Database Management Systems. Chapter 5
Database Management Systems Chapter 5 SQL Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for the Reserves relation contained only the attributes
More informationIntroduction to Data Management. Lecture 14 (SQL: the Saga Continues...)
Introduction to Data Management Lecture 14 (SQL: the Saga Continues...) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v HW and
More informationBasic form of SQL Queries
SQL - 1 Week 6 Basic form of SQL Queries SELECT FROM WHERE target-list relation-list qualification target-list A list of attributes of output relations in relation-list relation-list A list of relation
More informationSQL: Queries, Constraints, Triggers
SQL: Queries, Constraints, Triggers [R&G] Chapter 5 CS4320 1 Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for the Reserves relation contained
More informationSQL: Queries, Programming, Triggers
SQL: Queries, Programming, Triggers CSC343 Introduction to Databases - A. Vaisman 1 Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for the
More informationLecture 3 More SQL. Instructor: Sudeepa Roy. CompSci 516: Database Systems
CompSci 516 Database Systems Lecture 3 More SQL Instructor: Sudeepa Roy Duke CS, Fall 2018 CompSci 516: Database Systems 1 Announcements HW1 is published on Sakai: Resources -> HW -> HW1 folder Due on
More informationSQL. Chapter 5 FROM WHERE
SQL Chapter 5 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh 1 Basic SQL Query SELECT FROM WHERE [DISTINCT] target-list
More informationDatabase Applications (15-415)
Database Applications (15-415) SQL-Part II Lecture 8, February 2, 2016 Mohammad Hammoud Today Last Session: Standard Query Language (SQL)- Part I Today s Session: Standard Query Language (SQL)- Part II
More informationCIS 330: Applied Database Systems
1 CIS 330: Applied Database Systems Lecture 7: SQL Johannes Gehrke johannes@cs.cornell.edu http://www.cs.cornell.edu/johannes Logistics Office hours role call: Mondays, 3-4pm Tuesdays, 4:30-5:30 Wednesdays,
More informationSQL: Queries, Programming, Triggers. Basic SQL Query. Conceptual Evaluation Strategy. Example of Conceptual Evaluation. A Note on Range Variables
SQL: Queries, Programming, Triggers Chapter 5 Database Management Systems, R. Ramakrishnan and J. Gehrke 1 R1 Example Instances We will use these instances of the Sailors and Reserves relations in our
More informationLecture 2 SQL. Instructor: Sudeepa Roy. CompSci 516: Data Intensive Computing Systems
CompSci 516 Data Intensive Computing Systems Lecture 2 SQL Instructor: Sudeepa Roy Duke CS, Spring 2016 CompSci 516: Data Intensive Computing Systems 1 Announcement If you are enrolled to the class, but
More informationDatabase Systems. October 12, 2011 Lecture #5. Possessed Hands (U. of Tokyo)
Database Systems October 12, 2011 Lecture #5 1 Possessed Hands (U. of Tokyo) 2 1 Course Administration Assignment #2 will be out on the course homepage. It is due in two weeks (Oct. 26, 2011). Assignment
More informationLecture 3 SQL - 2. Today s topic. Recap: Lecture 2. Basic SQL Query. Conceptual Evaluation Strategy 9/3/17. Instructor: Sudeepa Roy
CompSci 516 Data Intensive Computing Systems Lecture 3 SQL - 2 Instructor: Sudeepa Roy Announcements HW1 reminder: Due on 09/21 (Thurs), 11:55 pm, no late days Project proposal reminder: Due on 09/20 (Wed),
More informationIntroduction to Data Management. Lecture #14 (Relational Languages IV)
Introduction to Data Management Lecture #14 (Relational Languages IV) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 It s time again for...
More informationDatabase Systems ( 資料庫系統 )
Database Systems ( 資料庫系統 ) October /24, 200 Lecture #5 1 Intimate Computing Can digital technology express intimacy? as something that relates to our innermost selves, something personal, closely felt
More informationSQL Part 2. Kathleen Durant PhD Northeastern University CS3200 Lesson 6
SQL Part 2 Kathleen Durant PhD Northeastern University CS3200 Lesson 6 1 Outline for today More of the SELECT command Review of the SET operations Aggregator functions GROUP BY functionality JOIN construct
More informationSQL - Lecture 3 (Aggregation, etc.)
SQL - Lecture 3 (Aggregation, etc.) INFS 614 INFS614 1 Example Instances S1 S2 R1 sid bid day 22 101 10/10/96 58 103 11/12/96 sid sname rating age 22 dustin 7 45.0 31 lubber 8 55.5 58 rusty 10 35.0 sid
More informationIntroduction to Data Management. Lecture #13 (Relational Calculus, Continued) It s time for another installment of...
Introduction to Data Management Lecture #13 (Relational Calculus, Continued) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 It s time for another
More informationSQL: The Query Language Part 1. Relational Query Languages
SQL: The Query Language Part 1 CS 186, Fall 2002, Lecture 9 R &G - Chapter 5 Life is just a bowl of queries. -Anon (not Forrest Gump) Relational Query Languages A major strength of the relational model:
More informationKeys, SQL, and Views CMPSCI 645
Keys, SQL, and Views CMPSCI 645 SQL Overview SQL Preliminaries Integrity constraints Query capabilities SELECT-FROM- WHERE blocks, Basic features, ordering, duplicates Set ops (union, intersect, except)
More informationمرتب سازی. (sort) : ویرایش احمدرضا غدیرزاده دانشجوی رشته ی مهندسی کامپیوتر
مرتب سازی (sort) : ویرایش احمدرضا غدیرزاده دانشجوی رشته ی مهندسی کامپیوتر تعریف کلید بخشی از هر رکورد که مرتبسازی بر اساس آن انجام میگیرد. به طور کلی الگوریتمهای مرتبسازی را میتوان به دو گروه تقسیم کرد:
More informationدستور خروجی. :cout این شی ء در فایل سرآیند iostream.h قرار دارد نکته: در 2008 این شی ء با افزودن ; std using namespace قابل دسترسی است.
دستور خروجی به برنامه :cout این شی ء در فایل سرآیند iostream.h قرار دارد نکته: در 2008 این شی ء با افزودن ; std using namespace قابل دسترسی است. شکل کلی :cout ;
More informationEnterprise Database Systems
Enterprise Database Systems Technological Educational Institution of Larissa in collaboration with Staffordshire University Larissa 2006 Dr. Georgia Garani garani@teilar.gr Dr. Theodoros Mitakos teo_ms@yahoo.com
More informationThe SQL Query Language. Creating Relations in SQL. Adding and Deleting Tuples. Destroying and Alterating Relations. Conceptual Evaluation Strategy
The SQ Query anguage Developed by IBM (system R) in the 1970s Need for a standard since it is used by many vendors Standards: SQ-86 SQ-89 (minor revision) SQ-92 (major revision, current standard) SQ-99
More informationکامل ترین دوره های آموزش برنامه نویسی پایگاه داده معماری نرم افزار و موبایل به همراه مجموعه مقاالت و فیلم های آموزشی رایگان در:
کامل ترین دوره های آموزش برنامه نویسی پایگاه داده معماری نرم افزار و موبایل به همراه مجموعه مقاالت و فیلم های آموزشی رایگان در: www.tahlildadeh.com استفاده از این مطالب با ذکر منبع بال مانع است. شی SqlCommand
More informationThe Database Language SQL (i)
ICS 321 all 2013 he Database Language SQL (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department niversity of Hawaii at Manoa 9/30/2013 Lipyeow Lim -- niversity of Hawaii at Manoa 1 Example
More informationReview: Where have we been?
SQL Basic Review Query languages provide 2 key advantages: Less work for user asking query More opportunities for optimization Algebra and safe calculus are simple and powerful models for query languages
More informationQUERIES, PROGRAMMING, TRIGGERS
5 SQL: QUERIES, PROGRAMMING, TRIGGERS What men or gods are these? What maidens loth? What mad pursuit? What struggle to escape? What pipes and timbrels? What wild ecstasy? What is the average salary in
More informationDatabase Applications (15-415)
Database Applications (15-415) SQL-Part I Lecture 7, January 31, 2016 Mohammad Hammoud Today Last Session: Relational Calculus & Summary Today s Session: Standard Query Language (SQL)- Part I Announcements:
More informationپایتون جهت دسترسی به دیتابیس از توابع کتابخانه ای DB-API استفاده کرده و interface هایی که برای
MySQL و دسترسی به دیتابیس Python پایتون جهت دسترسی به دیتابیس از توابع کتابخانه ای DB-API استفاده کرده و interface هایی که برای اتصال به پایگاه داده و مدیریت داده های اپلیکیشن بایستی پیاده سازی شود بر
More informationOverview of DB & IR. ICS 624 Spring Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa
ICS 624 Spring 2011 Overview of DB & IR Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/12/2011 Lipyeow Lim -- University of Hawaii at Manoa 1 Example
More informationابتدا نصب بودن بسته VConfig که برای راه اندازی VLAN مورد نیاز است را بررسی کنید:
اعطا ما مدیریت و شبکه به را تری افزون وری بهره و کارایی بیشتر امنیت تر آسان مدیریت VLAN می کند.دلیل و توجیه استفاده از VLAN بنا به نیاز و طراحی شبکه متغییر است VLAN. در تعریف ساده تقسیم شبکه موجود به چندین
More informationاشاره گر به تابع 5/23/2016
/* * advanced programming * Alireza Akhavan Pour * akhavan@alirezaweb.com * date: 1395/03/03 */ int main() { cout
More informationبسم اهلل الرحمن الرحیم
بسم اهلل الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران آموزش نحوه ی از استفاده اندروید List در قسمت ششم مدرس : مهندس افشین رفوآ آموزش نحوه ی استفاده از List در اندروید
More informationThe no service password-recovery Command for Secure ROMMON Configuration
دستور no service password-recovery قابلیتهای امنیتی ROMMON را فعال میکند ولی در هنگام استفاده از این دستور باید نهایت دقت رو انجام بدید و گرنه با دردسرهای زیادی مواجه خواهید شد. این دستور در جایی کاربرد
More informationحقوق مؤلف. انجمن جاواکاپ 2 تولد و مرگ اشیاء
دن یک م م ی نجاواکاپتقد م نج ا جاوا نويسی برنامه دوره اشیاء مرگ و تولد Objects Initialization and Cleanup ری کب یا عل صادق حقوق مؤلف کلیه حقوق این اثر متعلق به است بازنشر یا تدریس آنچه توسط جاواکاپ و به
More informationMODBUS ETHERNET و مفاهیم پایه
MODBUS ETHERNET و مفاهیم پایه IP (network and sharing) 7 Network and Sharing Center. (Change adapter» «. settings). Properties (local adapter) : Internet Protocol Local Area Connection Properties. Properties.
More informationبسم الله الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران قابل جابجایی مدرس : مهندس افشین رفوآ
بسم الله الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران قابل جابجایی مدرس : مهندس افشین رفوآ قابل جابجایی jqueryui متد draggable() را برای ساخت عنصر قابل جابجایی DOM
More informationIntroduction to Data Management. Lecture #10 (Relational Calculus, Continued)
Introduction to Data Management Lecture #10 (Relational Calculus, Continued) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v
More informationweb.config Register.aspx را بصورت زیر بنویسید.
1 طراحی و توسعه عملی وبسایت-پیشرفته)درج اصالح و حذف( 1 -اتصال به پایگاه داده به کمک فایل پیکربندی و از نوع XML با عنوان web.config 2 -عملیات جستجو لیستگیری درج اصالح و حذف با استفاده از پارامتر) Parameter
More informationمستندات کار با وب سرویس سیستم خبری نیوزویت
به خدا مستندات کار با وب سرویس سیستم خبری نیوزویت (Newsvit REST-API Documentation) بخش اخبار لیست اخبار list گرفتن لیست اخبار http://newsvit.ir/api/news/list?limit=8&page=3&order=&sort=asc&count=0 مرتب
More informationحقوق مؤلف. انجمن جاواکاپ اشیاء در جاوا
دن یک م م ی نجاواکاپتقد م نج ا جاوا نويسی برنامه دوره جاوا در اشیاء JAVA OBJECTS ری کب یا عل صادق حقوق مؤلف کلیه حقوق این اثر متعلق به است بازنشر یا تدریس آنچه توسط جاواکاپ و به صورت عمومی منتشر شده است
More informationبسم الله الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران. آموزش Table در HTML مدرس : مهندس افشین رفوآ
بسم الله الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران آموزش Table در HTML مدرس : مهندس افشین رفوآ آموزش Table در HTML جدول های HTML به نویسندگان وب اجازه می دهند تا
More informationشروع کار با Entity Framework Core 2.0 ASP.NET Core 2.0
شروع کار با Entity Framework Core 2.0 ASP.NET Core 2.0 این مقاله نشان می دهد چگونه یک برنامه Entity Framework Core 2.0 MVC Web با استفاده از Visual Studio 2017 و ASP.NET Core ایجاد کنیم و چگونه عملیات
More informationThis lecture. Step 1
This lecture Databases - Relational Algebra II This lecture continues queries in relational algebra. (GF Royle 2006-8, N Spadaccini 2008) Databases - Relational Algebra II 1 / 27 (GF Royle 2006-8, N Spadaccini
More informationبسم اهلل الرحمن الرحیم
بسم اهلل الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران آموزش رشته ها در سی شارپ مدرس : مهندس افشین رفوآ آموزش رشته ها در سی شارپ در #C می توانید از رشته ها به عنوان
More informationاواج یسيون همانرب هرود باتزاب
دن ممیک ی نجاواکاپتقد م نج ا جاوا نويسی برنامه دوره بازتاب Reflection صادقعلیاکبری حقوق مؤلف کلیه حقوق این اثر متعلق به است بازنشر یا تدریس آنچه توسط جاواکاپ و به صورت عمومی منتشر شده است با ذکر مرجع )جاواکاپ(
More informationبسمه تعالی نمونه آزمون برنامهنویسی جاواکاپ 12 شهریور 2931
بسمه تعالی نمونه آزمون برنامهنویسی جاواکاپ 12 شهریور 2931 نکات مهم: همه سؤاالت چند گزينهای هستند. سؤاالت نمره منفی ندارند. هر سؤال بين سه تا ده گزينه دارد. هر سؤال ممکن است بيش از يک گزينه صحيح داشته باشد.
More informationشروع کار با CSS. بخش هشتم: CSS Specificity سید کاوه احمدی
شروع کار با CSS بخش هشتم: CSS Specificity سید کاوه احمدی سوال المان p به چه رنگی نمایش داده خواهد شد #mainnote { color: Blue; } div.note { color: green; }
More informationILUM-SAM7s راهنمای نرم افزار پردازش سبز هونام. راهنمای نرم افزاری ILUM-SAM7s
پردازش سبز هونام ILUM-SAM7s راهنمای نرم افزار و نحوه ی پروگرم کردن میکروکنترلر و نیز کامپایل و اجرای یک کد نمونه در محیط نرم افزاری IAR نحوه پروگرام کردن ILUM-SAM7s برنامه SAM-BAرا از داخل CD نصب و کامپيوتر
More informationحقوق مؤلف. انجمن جاواکاپ 2 چند داستان کوتاه درباره امکانات جاوا
دن یک م م ی نجاواکاپتقد م نج ا جاوا نويسی برنامه دوره جاوا امکانات درباره کوتاه داستان چند Java Short Stories ری کب یا عل صادق حقوق مؤلف کلیه حقوق این اثر متعلق به است بازنشر یا تدریس آنچه توسط جاواکاپ
More informationSQL: Queries, Programming, Triggers
SQL: Queries, Programming, Triggers Chapter 5 1 Introduction We now introduce SQL, the standard query language for relational DBS. Like relational algebra, an SQL query takes one or two input tables and
More informationحقوق مؤلف. انجمن جاواکاپ 2 رشته آرایه و چند داستان دیگر
دن یک م م ی نجاواکاپتقد م نج ا جاوا نويسی برنامه دوره دیگر داستان چند و آرایه رشته STRING, ARRAY, AND OTHER STORIES ری کب یا عل صادق حقوق مؤلف کلیه حقوق این اثر متعلق به است بازنشر یا تدریس آنچه توسط جاواکاپ
More informationآشنایی با دستورNetStat
آشنایی با دستورNetStat این دستور وضعیت پروتکلها و پورتهای ارتباطی TCP/IP را نمایش می دهد. در صورتی که این دستور بدون هیچ سوئیچی استفاده شود این دستور کلیه پورتها و ارتباطات خروجی فعال را نمایش می دهد.
More informationExperimenting with bags (tables and query answers with duplicate rows):
January 16, 2013 Activities CS 386/586 Experimenting with bags (tables and query answers with duplicate rows): Write an SQL query (and run it against the sailors database) that does the following: 1. List
More informationبر روی هر یک از تجهیزاتی که از پروتکل IP/TCP پشتیبانی می کنند به ۲ طریق می توان Address IP تنظیم کرد.
بر روی هر یک از تجهیزاتی که از پروتکل IP/TCP پشتیبانی می کنند به ۲ طریق می توان Address IP تنظیم کرد. Static Dynamic - - حتما تمامی خوانندگان با روش static آشنایی دارند. همان روش وارد کردن آدرس ها بصورت
More informationMidterm Exam #2 (Version A) CS 122A Winter 2017
NAME: SEAT NO.: STUDENT ID: Midterm Exam #2 (Version A) CS 122A Winter 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 50 minutes; be sure
More informationنظریه صف Queuing Theory سید صابر ناصرعلوی بخش مهندسی عمران دانشگاه شهید باهنر کرمان
نظریه صف Queuing Theory سید صابر ناصرعلوی بخش مهندسی عمران دانشگاه شهید باهنر کرمان نظریه صف 4. نظریه صفبندی شاخهای به که از ریاضی مطالعه صف ها ویژگی های و آنها می پردازد. ارزیابی وسیله ای برای محاسبه
More informationCSIT5300: Advanced Database Systems
CSIT5300: Advanced Database Systems L10: Query Processing Other Operations, Pipelining and Materialization Dr. Kenneth LEUNG Department of Computer Science and Engineering The Hong Kong University of Science
More informationRelational Calculus. Chapter Comp 521 Files and Databases Fall
Relational Calculus Chapter 4.3-4.5 Comp 521 Files and Databases Fall 2010 1 Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus has
More informationCompSci 516 Data Intensive Computing Systems
CompSci 516 Data Intensive Computing Systems Lecture 9 Join Algorithms and Query Optimizations Instructor: Sudeepa Roy CompSci 516: Data Intensive Computing Systems 1 Announcements Takeaway from Homework
More informationآزمایشگاه شبکههای کامپیوتری
آزمایشگاه شبکههای کامپیوتری دانشگاه سمنان دانشکده برق و کامپیوتر. دستورالعمل شماره 9: آشنایی با مسیریابی پویا محمدرضا رازیان ویرایش 3.0 به نام خدا در شد. این دستورالعمل با لیسته یا کنترل دسترسی آشنا خواهیم
More informationعنوان مقاله : نحوه ایجاد تصویر captcha در ASP.net تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان
در این مقاله قصد داریم نشان دهیم که چگونه می توان تصویر Captcha را در برنامه های ASP.netخود قرار دهیم captcha.برای تشخیص ربات ها از انسان ها ایجاد شده اند که با استفاده از آن ربات ها نتوانند به سایت وارد
More informationDatabase Applications (15-415)
Database Applications (15-415) Relational Algebra Lecture 5, January 24, 2016 Mohammad Hammoud Today Last Session: The relational model Today s Session: Relational algebra Relational query languages (in
More informationعنوان مقاله : خواندن و نوشتن محتوای فایل های Excel بدون استفاده ازAutomation Excel تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان
در این مقاله با دو روش از روشهای خواندن اطالعات از فایل های اکسل و نوشتن آنها در DataGridView بدون استفاده از ( Automation Excelبا استفاده از NPOI و( ADO.Net آشنا میشوید. راه اول : با استفاده از (xls)
More informationاواج یسيون همانرب هرود طساو
دن یک م م ی نجاواکاپتقد م نج ا جاوا نويسی برنامه دوره واسط Interface ری کب یا عل صادق حقوق مؤلف کلیه حقوق این اثر متعلق به است بازنشر یا تدریس آنچه توسط جاواکاپ و به صورت عمومی منتشر شده است با ذکر مرجع
More information<h2>nonmonotonic Reasoning: Context- Dependent Reasoning</h2> <i>by <b>v. Marek</b> and <b>m. Truszczynski</b></i><br> Springer 1993<br> ISBN
nonmonotonic Reasoning: Context- Dependent Reasoning by v. Marek and m. Truszczynski Springer 1993 ISBN 0387976892 nonmonotonic Reasoning: Context-Dependent
More informationaccess-list access-list-number {permit deny} {host source source-wildcard any}
Cisco Access List در ترجمه لغوی به معنای لیست دسترسی سیسکو می باشد که زیاد هم از معنای واقعی خود دور نیست. همانطور که از اسم آن بر می آید به وسیله این ابزار میتوانیم بر روی سخت افزارهای سیسکو فایروال ایجاد
More informationDatabases - Relational Algebra. (GF Royle, N Spadaccini ) Databases - Relational Algebra 1 / 24
Databases - Relational Algebra (GF Royle, N Spadaccini 2006-2010) Databases - Relational Algebra 1 / 24 This lecture This lecture covers relational algebra which is the formal language underlying the manipulation
More informationThis lecture. Projection. Relational Algebra. Suppose we have a relation
This lecture Databases - Relational Algebra This lecture covers relational algebra which is the formal language underlying the manipulation of relations. We follow the notation from Chapter 4 of Ramakrishnan
More informationاصول ميکروکامپيوترها استاد درس: دکتر http://eeiustacir/rahmati/indexhtm rahmati@iustacir ا درس Email و Website برای تکاليف و : http://eeliustacir/rahmati/ ١ /١۴ هفدهم فصل ا شنايی با دستورالعمل ها وMode
More informationپرﺎﺷ ﯽﺳ شزﻮﻣآ C#.NET ﺎﻫ ﻪﺘﺷر ﺎﺑ رﺎﮐ
آموزش سی شارپ C#.NET کار با رشته ها طریقه ایجاد کردن رشته ها: راه معمول تعریف رشته در سی شارپ استفاده از دو علامت نقل قول است. ("abcdef") که رشته مورد نظر ما در بین این دو علامت تایپ می شود. string newstring
More informationRewrite INTERSECT using IN
Rewrite INTERSECT using IN SELECT S.sid FROM Sailors S WHERE S.rating > 2 INTERSECT SELECT R.sid FROM Reserves R SELECT S.sid FROM Sailors S WHERE S.rating > 2 AND S.sid IN ( ) SELECT R.sid FROM Reserves
More information3. User Interfaces and SQL Language*
User interface of DBMS 3. User Interfaces and SQL Language* A DBMS must offer some interfaces to support user to access database, including: Query Languages Interface and maintaining tools (GUI) APIs Class
More informationHW2 out! Administrative Notes
HW2 out! Administrative Notes Conceptual Evaluation sid bid day 1 102 9/12 2 102 9/13 4 109 9/20 GROUP BY bid HAVING count(*) > 1 sid bid day 1 102 9/12 2 102 9/13 sid bid day 4 109 9/20 sid bid day 1
More informationRelational Calculus. Chapter Comp 521 Files and Databases Fall
Relational Calculus Chapter 4.3-4.5 Comp 521 Files and Databases Fall 2016 1 Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus has
More informationDatabase Management Systems. Chapter 5
Database Management Systems Chapter 5 SQL Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for the Reserves relation contained only the attributes
More informationData Science 100. Databases Part 2 (The SQL) Slides by: Joseph E. Gonzalez & Joseph Hellerstein,
Data Science 100 Databases Part 2 (The SQL) Slides by: Joseph E. Gonzalez & Joseph Hellerstein, jegonzal@berkeley.edu jhellerstein@berkeley.edu? Previously Database Management Systems A database management
More informationCS 186, Fall 2002, Lecture 8 R&G, Chapter 4. Ronald Graham Elements of Ramsey Theory
Relational Calculus CS 186, Fall 2002, Lecture 8 R&G, Chapter 4 We will occasionally use this arrow notation unless there is danger of no confusion. Ronald Graham Elements of Ramsey heory Relational Calculus
More informationسیستم جامع مانیتورینگ شبکه و دیتا سنتر بینا معرفی زیر سیستم مانیتورینگ الگ بینا
معرفی زیر سیستم مانیتورینگ الگ بینا Syslog چیست روشی استاندارد برای ارسال پیغام الگ در شبکه می باشد. Syslog پروتکل تقریبا همه تجهیزات شبکه از این پروتکل پشتیبانی می کنند. روشی ایده ال برای جمع آوری الگ
More informationLecture 2 SQL. Announcements. Recap: Lecture 1. Today s topic. Semi-structured Data and XML. XML: an overview 8/30/17. Instructor: Sudeepa Roy
Announcements CompSci 516 Data Intensive Computing Systems Lecture 2 SQL Instructor: Sudeepa Roy If you are enrolled to the class, but have not received the email from Piazza, please send me an email All
More informationبسم اهلل الرحمن الرحیم
بسم اهلل الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران آموزش نحوه ی از استفاده اندروید action bar قسمت سوم مدرس : مهندس افشین رفوآ آموزش نحوه ی استفاده از action bar
More information12. تست activity برنامه
بسم اهلل الرحمن الرحيم آموزشگاه تحليل داده تخصصی ترين مرکز برنامه نويسی و ديتابيس در ايران آزمايش برنامه های کاربردی اندرويد با بهره گيری از چهارچوب نرم افزاریframework / Android test مدرس : مهندس افشين
More informationلیست پیوندی. امیر جهانگرد
لیست پیوندی امیر جهانگرد jahangard@yazd.ac.ir مقدمه 2 در بسیاری از کاربردها خوب است که سازماندهی شوند. آرایهها نمونهای از پیادهسازی سیستها مزایا: دسترسی آسان به عناور آرایه ایجاد آسان حلقه تکرار برروی
More informationپردازش لوله ای و برداری
پردازش لوله ای و برداری )فصل 9 از کتاب )Mano 1 پردازش موازی Throughput: the amount of processing that can be accomplished during a given interval of time 2 3 : طبقه بندی کامپیوترها از نظر Flynn SISD: Single
More informationMore on SQL Nested Queries Aggregate operators and Nulls
Today s Lecture More on SQL Nested Queries Aggregate operators and Nulls Winter 2003 R ecom m en ded R eadi n g s Chapter 5 Section 5.4-5.6 http://philip.greenspun.com/sql/ Simple queries, more complex
More informationدکتر محمد کاظم اکبری مرتضی سرگلزایی جوان
به نام خدا مدل برنامه نویسی نگاشت-کاهش دکتر محمد کاظم اکبری مرتضی سرگلزایی جوان http://crc.aut.ac.ir 1 Memory مروری بر روشهای موازی سازی Programming models Shared memory (pthreads) Message passing (MPI)
More informationSQL: The Query Language (Part 1)
SQL: The Query Language (Part 1) Fall 2017 Life is just a bowl of queries. -Anon 1 Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Query
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #3: SQL and Rela2onal Algebra- - - Part 1
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #3: SQL and Rela2onal Algebra- - - Part 1 Reminder: Rela0onal Algebra Rela2onal algebra is a nota2on for specifying queries
More informationCompSci 516: Database Systems
CompSci 516 Database Systems Lecture 4 Relational Algebra and Relational Calculus Instructor: Sudeepa Roy Duke CS, Fall 2018 CompSci 516: Database Systems 1 Reminder: HW1 Announcements Sakai : Resources
More informationDatabase Systems. Announcement. December 13/14, 2006 Lecture #10. Assignment #4 is due next week.
Database Systems ( 料 ) December 13/14, 2006 Lecture #10 1 Announcement Assignment #4 is due next week. 2 1 Overview of Query Evaluation Chapter 12 3 Outline Query evaluation (Overview) Relational Operator
More informationبسم الله الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران. آموزش ایجاد کنترل های سفارشی / controls ASP.
و< بسم الله الرحمن الرحیم آموزشگاه تحلیل داده تخصصی ترین مرکز برنامه نویسی و دیتابیس در ایران آموزش ایجاد کنترل های سفارشی / controls ASP.NET Custom مدرس : مهندس افشین رفوآ آموزش ایجاد کنترل های سفارشی
More informationDatabase Management Systems. Chapter 5
Database Management Systems Chapter 5 SQL Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for the Reserves relation contained only the attributes
More informationAnnouncements If you are enrolled to the class, but have not received the from Piazza, please send me an . Recap: Lecture 1.
CompSci 516 Database Systems Lecture 2 SQL (Incomplete Notes) Instructor: Sudeepa Roy Announcements If you are enrolled to the class, but have not received the email from Piazza, please send me an email
More informationOverview of Query Processing
ICS 321 Fall 2013 Overview of Query Processing Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 11/20/2013 Lipyeow Lim -- University of Hawaii at Manoa 1
More informationآزمون برنامهنویسی جاوا
هب انم خا ل ق یکتا انجمن جاواکاپ آزمون برنامهنویسی جاوا نمونه آزمون جاوا: بخش پایه و حرفهای تعداد سواالت مدت زمان پاسخگویی نام و نام خانوادگی: شماره داوطلبی: سواالت بخش پایه String text = "Ali#and#Taghi#are#friends";
More informationData Science 100 Databases Part 2 (The SQL) Previously. How do you interact with a database? 2/22/18. Database Management Systems
Data Science 100 Databases Part 2 (The SQL) Slides by: Joseph E. Gonzalez & Joseph Hellerstein, jegonzal@berkeley.edu jhellerstein@berkeley.edu? Previously Database Management Systems A database management
More informationCS330. Query Processing
CS330 Query Processing 1 Overview of Query Evaluation Plan: Tree of R.A. ops, with choice of alg for each op. Each operator typically implemented using a `pull interface: when an operator is `pulled for
More information!-%/ -%& "-!&"!!!*0**
! It is not every question that deserves an answer. Publius Syrus. 42 B. C. "#$!"!%&"&! '%()** "!%+!!"#,%" "-+)**%! %!.!&,*!-%/ -%& "-!&"!!!*0**!"# $%&'()(*" #+,-'. /0$1-' #23)30 4. -'5.$ 1 6 SELECT (column_list)
More informationDatabase Management System. Relational Algebra and operations
Database Management System Relational Algebra and operations Basic operations: Selection ( ) Selects a subset of rows from relation. Projection ( ) Deletes unwanted columns from relation. Cross-product
More information