Chapterبەش 2 · Lectureوانە 2.3
Database Management Systemsسیستەمەکانی بەڕێوەبردنی بنکەدراوە
What a DBMS is and does, well-known DBMS products, the kinds of database (relational, object-oriented, hierarchical, network and NoSQL) and the distributed architecture, the words tuple, relation and attribute, and the six parts of a database system, the degree and cardinality of a relation, and a short history of databases.
چییە و چی دەکات، ناسراوترین بەرهەمەکانی، جۆرەکانی (پەیوەندیدار، تەنخواز، هەرەمی، ڕایەڵەیی و ) و ، وشەکانی tuple، relation و attribute و شەش بەشەکەی ، و و مێژوویەکی کورتی .
What you will learnچی فێر دەبیت
- Define a and explain how it sits between the users and the data.
- Name well-known DBMS products.
- Tell data models (relational, object-oriented, hierarchical, network, NoSQL) apart from the distributed architecture.
- Use the words table and relation, row and tuple, column and attribute.
- Explain how a and a keep their data, and what means.
- Name the six parts of a .
- Give the degree and cardinality of a table and check the three properties of a relation.
- Tell the history of databases from punched cards to the cloud, and say why the relational model replaced navigational databases.
- پێناسەی بکەیت و ڕوونی بکەیتەوە چۆن دەکەوێتە نێوان و .
- ناوی ناسراوترین بەرهەمەکانی بهێنیت.
- (پەیوەندیدار، تەنخواز، هەرەمی، ڕایەڵەیی، ) لە پێکهاتەی دابەشکراو جیا بکەیتەوە.
- وشەکانی و relation، و tuple، و attribute بەکاربهێنیت.
- ڕوونی بکەیتەوە و چۆن هەڵدەگرن و واتای چییە.
- شەش بەشەکەی بژمێریت.
- بۆ و بدۆزەوە و سێ تایبەتمەندییەکەی relation بپشکنە.
- مێژووی لە کارتی کونکراوەوە تا هەور بگێڕەوە و بڵێ بۆچی مۆدێلی پەیوەندیدار جێگەی گرتەوە.
What a DBMS isسیستەمی بەڕێوەبردنی بنکەدراوە چییە
The software that creates and manages and runs on them. , and are examples.
ئەو نەرمەکاڵایەیە کە دروست دەکات و بەڕێوەیان دەبات و لەسەریان جێبەجێ دەکات. ، و نموونەن.
The course defines it like this: a Database Management System (DBMS) is software used to store, retrieve and run queries on data. A is a question or a command sent to the database, such as show all the students of class 5A.
کۆرسەکە بەم شێوەیە پێناسەی دەکات: ئەو کە بۆ خەزنکردن، هێنانەوە و جێبەجێکردنی لەسەر بەکاردێت. پرسیار یان فەرمانێکە کە دەنێردرێت بۆ ، وەک هەموو قوتابیانی پۆلی 5A پیشان بدە.
It sits between you and the data. A DBMS serves as an between the end user and the database. It lets users create, read, update and delete data in the database. These four jobs are called .
دەکەوێتە نێوان تۆ و . وەک لە نێوان کۆتایی و کار دەکات. ڕێگە بە دەدات لە دروست بکەن، بخوێننەوە، نوێ بکەنەوە و بسڕنەوە. بەم چوار کارە دەگوترێت .
What a DBMS is (software that stores, finds and changes data for its users), and the difference between data and information.
چییە ( کە بۆ خەزن دەکات، دەیدۆزێتەوە و دەیگۆڕێت) و جیاوازیی نێوان و .
Watch 0:15-5:28: the definition of a DBMS and the basic points about it.
لە 0:15 تا 5:28 سەیر بکە: پێناسەی و خاڵە بنەڕەتییەکانی.
What a DBMS isسیستەمی بەڕێوەبردنی بنکەدراوە چییە
What every DBMS must doئەوەی هەموو سیستەمێکی بەڕێوەبردنی بنکەدراوە دەبێت بیکات
CRUD is only the start. Database textbooks list nine services that every DBMS must give, often called Codd's nine rules:
تەنها سەرەتایە. کتێبەکانی نۆ خزمەتگوزاری دەژمێرن کە هەموو دەبێت بیدات و زۆرجار پێیان دەوترێت نۆ ڕێساکەی Codd:
- Integration: all the data in one place, each fact stored once.
- Operations: insert, query, update and delete.
- Catalog: the description of the data is kept in a that users and programs can read.
- User views: each group of users can see the data in its own way.
- Integrity: the data must agree with the real world (a mark from 0 to 100).
- Security: nobody reaches data they are not allowed to see.
- Transactions: several changes are done as one unit: all or none.
- Synchronisation: many users at the same time do not spoil each other's work.
- Recovery: after a crash the data is brought back to a correct state.
- یەکخستن: هەموو لە یەک شوێندا، هەر ڕاستییەک یەک جار خەزن دەکرێت.
- کارەکان: زیادکردن، ، نوێکردنەوە و سڕینەوە.
- کاتالۆگ: وەسفی لە هەڵدەگیرێت کە و دەتوانن بیخوێننەوە.
- : هەر گرووپێکی دەتوانێت بە شێوەی خۆی ببینێت.
- : دەبێت لەگەڵ جیهانی ڕاستەقینە بگونجێت (نمرە لە 0 تا 100).
- : کەس ناگاتە ئەو ڕێگەی پێنەدراوە ببینێت.
- : چەند گۆڕانکارییەک وەک یەک یەکە دەکرێن: هەموویان یان هیچیان.
- هاوکاتکردن: چەندین لە هەمان کاتدا کاری یەکتر تێک نادەن ().
- : دوای تێکچوون دەگەڕێندرێتەوە بۆ دۆخێکی دروست.
What a DBMS isسیستەمی بەڕێوەبردنی بنکەدراوە چییە
Well-known DBMSsناسراوترین سیستەمەکانی بەڕێوەبردنی بنکەدراوە
The course names four examples: MySQL, Microsoft Access, SQL Server and Oracle. Here they are with three more that you will meet often:
کۆرسەکە ناوی چوار نموونە دەهێنێت: MySQL، Microsoft Access، SQL Server و Oracle. ئەمانە لەگەڵ سێی تردان کە زۆر تووشیان دەبیت:
| DBMS | Made byدروستکەر | Typical useبەکارهێنانی باو |
|---|---|---|
| Oracle Corporation (free Community edition)کۆمپانیای Oracle (وەشانی Communityی بەخۆڕایی) | websites, often with PHPماڵپەڕ، زۆرجار لەگەڵ PHP | |
| the MariaDB community (an open-source copy of MySQL)کۆمەڵگەی MariaDB (کۆپییەکی سەرچاوەکراوەی MySQL) | websites; it is the database inside XAMPPماڵپەڕ؛ ئەو کە لەناو XAMPPـدایە | |
| Microsoft Access | Microsoft | small desktop databases with forms and reports بچووکی سەر مێز بە فۆرم و ڕاپۆرتەوە |
| SQL Server | Microsoft | company servers (Windows and Linux) کۆمپانیاکان (Windows و Linux) |
| Oracle Database | Oracle Corporationکۆمپانیای Oracle | large organisationsدامەزراوە گەورەکان |
| PostgreSQL | an open-source communityکۆمەڵگەیەکی سەرچاوەکراوە | websites and companiesماڵپەڕ و کۆمپانیاکان |
| free, in the public domainبەخۆڕایی، | inside phones, browsers and apps: a whole database in one fileلەناو مۆبایل، و : تەواو لە یەک |
In the Web Programming course you use MySQL/MariaDB through XAMPP (Databases and SQL) and SQLite (SQLite basics). There you are the programmer; here you learn what the DBMS does behind the scenes.
لە کۆرسی بەرنامەسازیی وێبدا MySQL/MariaDB لە ڕێگەی XAMPPـەوە بەکاردەهێنیت (بنکەدراوەکان و SQL) و SQLiteیش (بنەماکانی SQLite). لەوێ تۆ بەرنامەسازیت؛ لێرە فێر دەبیت لە پشت پەردەوە چی دەکات.
What a DBMS costs. Some are free and open source (MySQL Community, MariaDB, PostgreSQL, SQLite). Commercial ones (Oracle Database, SQL Server) are sold per processor core or per user, and also have free editions with limits, such as SQL Server Express. In the cloud you pay for what you use: see Cloud databases.
چەندی تێدەچێت. هەندێکیان بێبەرانبەر و (MySQL Community، MariaDB، PostgreSQL، SQLite). بازرگانییەکان (Oracle Database، SQL Server) بەپێی ژمارەی یان ژمارەی دەفرۆشرێن و وەشانی بێبەرانبەری سنووردارییان هەیە، وەک SQL Server Express. لە هەوردا پارەی ئەوە دەدەیت کە بەکاری دەهێنیت: بڕوانە بنکەدراوە هەورییەکان.
Types of DBMSجۆرەکانی سیستەمی بەڕێوەبردنی بنکەدراوە
The course lists four types, by the way the data is arranged inside:
کۆرسەکە چوار جۆر دەژمێرێت، بەپێی ئەوەی لە ناوەوە چۆن ڕێک خراوە:
- : data kept in tables of rows and columns, with the tables linked to each other.
- : data kept as , in the same way a keeps them.
- : data arranged in a tree, where each record has one parent.
- : one database, stored across several computers in different places.
- : لە و هەڵدەگیرێت و خشتەکان بە یەکترەوە بەستراون.
- : وەک هەڵدەگیرێت، هەر وەک چۆن هەڵیاندەگرێت.
- : وەک دارێک ڕێک دەخرێت و هەر یەک باوانی هەیە.
- : یەک کە لەسەر چەند لە شوێنی جیاواز هەڵگیراوە.
Relational databasesبنکەدراوە پەیوەندیدارەکان
A stores data points that are related to one another, in tables that are linked together. It is based on the relational model, which Edgar F. Codd described in 1970. The model is mathematical: a table is a relation in the sense of set theory, and queries rest on logic (A table is a mathematical relation).
ئەو خاڵانەی هەڵدەگرێت کە پەیوەندییان بە یەکترەوە هەیە، لە بەیەکەوە بەستراودا. لەسەر بنەمای مۆدێلی پەیوەندیدار دامەزراوە کە Edgar F. Codd لە ساڵی 1970دا وەسفی کرد. مۆدێلەکە بیرکارییە: relationـێکە بە واتای تیۆریی کۆمەڵەکان و لەسەر لۆجیک دامەزراون (خشتە پەیوەندییەکی بیرکارییە).
The building blocks of a database: within a database, related data are grouped into tables. Each table consists of rows (also called tuples) and columns.
بەردە بناغەکانی : لەناو ، پەیوەندیدار لە کۆ دەکرێنەوە. هەر لە (کە پێیان دەگوترێت tuple) و پێکدێت.
purchase_number | date_of_purchase | customer_id | item_code |
|---|---|---|---|
1 | 03/09/2016 | 1 | A_1 |
2 | 02/12/2016 | 2 | C_1 |
3 | 15/04/2017 | 3 | D_1 |
4 | 24/05/2017 | 1 | B_2 |
5 | 25/05/2017 | 4 | B_2 |
6 | 06/06/2017 | 2 | B_1 |
7 | 10/06/2017 | 4 | A_2 |
8 | 13/06/2017 | 3 | C_1 |
9 | 20/07/2017 | 1 | A_1 |
10 | 11/08/2017 | 2 | B_1 |
How a relational database stores data in tables of rows and columns, how indexes help, and why companies use databases.
چۆن لە بە و هەڵدەگرێت، چۆن یارمەتی دەدەن و بۆچی کۆمپانیاکان بەکاردەهێنن.
Watch 0:00-3:48: tables, rows, columns and the keys that link them.
لە 0:00 تا 3:48 سەیر بکە: ، ، و ، کە پێکەوە دەبەستنەوە.
Relational databasesبنکەدراوە پەیوەندیدارەکان
Three names for the same thingsسێ ناو بۆ هەمان شتەکان
You will meet three sets of words for the same three things: the everyday database words, the words of the relational model (used in exams and in relational algebra), and the old file words.
سێ کۆمەڵە وشە بۆ هەمان سێ شت دەبینیت: وشە ڕۆژانەکانی ، وشەکانی مۆدێلی پەیوەندیدار (لە تاقیکردنەوەکان و لە جەبری پەیوەندیداردا بەکاردێن) و وشە کۆنەکانی .
| Database wordوشەی | Relational modelمۆدێلی پەیوەندیدار | File wordوشەی | In the SALES tableلە SALES |
|---|---|---|---|
| (table) | relation | (file) | the whole SALES tableهەموو SALES |
| row (row) | tuple | (record) | 4 24/05/2017 1 B_2 |
| column (column) | attribute | (field) | customer_id |
| the allowed values of a columnئەو ڕێگەی پێدراوە | domain | (the data type)(واتە ) | customer_id: whole numbers from 1 upcustomer_id: لە 1 بەرەو سەرەوە |
Look at customer_id in SALES: customer 1 appears in purchases 1, 4 and 9. The number points to one row of a customers table. A column that links two tables like this is a ; you will meet it in Database keys. Tables, rows and columns are compared with a spreadsheet in Databases and SQL.
سەیری customer_id لە SALES بکە: کڕیاری 1 لە کڕینەکانی 1، 4 و 9دا دەردەکەوێت. ئەم ژمارەیە ئاماژە بە کڕیاران دەکات. کە بەم شێوەیە دوو بە یەکەوە دەبەستێتەوە ـە؛ لە کلیلەکانی بنکەدراوە دەیناسیت. ، و لە بنکەدراوەکان و SQL لەگەڵ بەراورد کراون.
(a) Which customers bought most often? (b) Which item codes were bought more than once? (c) Which attribute tells you when a purchase happened?
(أ) کام کڕیاران زیاتر لە هەمووان کڕینیان کردووە؟ (ب) کام کۆدی کاڵا زیاتر لە جارێک کڕدراوە؟ (ج) کام attribute دەڵێت کڕینەکە کەی ڕوویداوە؟
Show answerوەڵامەکە پیشان بدە
- (a) Customers 1 and 2, three purchases each (customer 1: purchases 1, 4, 9; customer 2: purchases 2, 6, 10). Customers 3 and 4 bought twice each.
- (b)
A_1(purchases 1, 9),C_1(2, 8),B_2(4, 5) andB_1(6, 10).D_1andA_2were bought once. - (c)
date_of_purchase.
- (أ) کڕیاری 1 و 2، هەریەکەیان سێ کڕین (کڕیاری 1: کڕینی 1، 4، 9؛ کڕیاری 2: کڕینی 2، 6، 10). کڕیاری 3 و 4 هەریەکەیان دوو جار کڕیویانە.
- (ب)
A_1(کڕینی 1، 9)،C_1(2، 8)،B_2(4، 5) وB_1(6، 10).D_1وA_2تەنها جارێک کڕدراون. - (ج) ئەو ناوی
date_of_purchaseـە.
Relational databasesبنکەدراوە پەیوەندیدارەکان
Degree and cardinality of a tableپلەی خشتە و ژمارەی تۆمارەکانی خشتە
Two numbers describe the size of a relation. Its degree is the number of attributes (columns). Its cardinality is the number of tuples (rows) it holds now. The degree changes only when the design changes; the cardinality changes with every insert and delete. The rows at one moment are called the relation instance.
دوو ژمارە قەبارەی relationـێک وەسف دەکەن. واتە چەند ()ی هەیە. واتە ئێستا چەند ()ی تێدایە. پلەکە تەنها کاتێک دەگۆڕێت کە دیزاینەکە بگۆڕێت؛ ژمارەی تۆمارەکان لەگەڵ هەموو زیادکردن و سڕینەوەیەک دەگۆڕێت. لە ساتێکدا پێیان دەوترێت relation.
By degree, a relation is unary (1 attribute), binary (2), ternary (3) or n-ary.
بەپێی پلە، relation یەکانی (unary، 1 )، دووانی (binary، 2)، سێیانی (ternary، 3) یان n-ی (n-ary) دەبێت.
Relational databasesبنکەدراوە پەیوەندیدارەکان
Three properties of a relationسێ تایبەتمەندیی relation
Not every table is a true relation. It must keep three rules:
هەموو relationـی ڕاستەقینە نییە. دەبێت سێ ڕێسا ڕەچاو بکات:
- Attributes: each attribute name is unique in the table, and the order of the columns does not matter.
- Tuples: no two rows are the same, and the order of the rows does not matter.
- Values: each cell holds one atomic value from the column's domain (one phone number, not two), or NULL when the value is unknown or does not apply.
- : ناوی هەر لە تاکە و ڕیزبەندیی گرنگ نییە.
- : هیچ دوو وەک یەک نین و ڕیزبەندیی گرنگ نییە.
- : هەر یەک لە هەڵدەگرێت (یەک ژمارەی مۆبایل، نەک دوو)، یان NULL کاتێک نەزانراوە یان نایگرێتەوە.
Class A lists its students' favourite sports sorted by roll number, with the columns RollNo, Name, Sport. Class B lists the same students sorted by sport, with the columns Sport, RollNo, Name. Every row of one list is in the other. Are the two the same relation?
پۆلی A وەرزشی دڵخوازی قوتابیانەکەی بە ڕیزی ژمارەی ڕیز لیست دەکات، بە RollNo، Name، Sport. پۆلی B هەمان قوتابیان بە ڕیزی وەرزش لیست دەکات، بە Sport، RollNo، Name. هەموو لیستێک لە لیستەکەی تردا هەیە. ئایا هەردووکیان هەمان relationن؟
Show answerوەڵامەکە پیشان بدە
Yes. A relation is a set of rows with named columns. The order of the rows (rule 2) and of the columns (rule 1) does not matter, so both lists hold exactly the same facts.
بەڵێ. relation کۆمەڵێک بە . ڕیزبەندیی (ڕێسای 2) و (ڕێسای 1) گرنگ نییە، بۆیە هەردوو لیستەکە ڕێک هەمان ڕاستییەکانیان تێدایە.
Hierarchical databasesبنکەدراوە هەرەمییەکان
A is a data model in which the data is organised into a tree-like structure. The data is stored as records that are connected to one another through links. A record is a collection of fields, and each field contains only one value.
کە تێیدا وەک دارێک ڕێک دەخرێت. وەک خەزن دەکرێت و بە بەستەری نێوانیان پێکەوە گرێدراون. هەر کۆمەڵێک و هەر تەنها یەک تێدایە.
Every record has one parent, except the top record, the root, which has none. A parent can have many children. To reach a record, the DBMS starts at the root and follows the links down.
هەموو یەک باوانی هەیە، جگە لە سەرەوە، واتە ڕەگ، کە باوانی نییە. باوانێک دەتوانێت چەندین منداڵی هەبێت. بۆ گەیشتن بە ، لە ڕەگەوە دەست پێدەکات و بەستەرەکان بەرەو خوارەوە دەگرێتەبەر.
Hierarchical databasesبنکەدراوە هەرەمییەکان
Strengths and limits of the treeهێز و سنوورەکانی دار
A tree is natural for data that really is a tree, such as an organisation chart or the parts of a machine, and following its paths is simple and fast.
دار بۆ ئەو بە ڕاستی دارە سروشتییە، وەک هێڵکاریی ڕێکخستنی دامەزراوەیەک یان پارچەکانی ئامێرێک و گرتنەبەری ڕێگاکانی سادە و خێرایە.
- Searching by another field is slow. "All teachers born after 1990" means walking the whole tree, because the links only lead down from the root.
- The shape is fixed. Only "belongs to" links exist, and a new kind of link cannot be added once the tree is built.
- The program does the walking. It moves one record at a time with commands such as IBM IMS's
GET UNIQUE,GET NEXTandGET NEXT WITHIN PARENT, so it is procedural and the DBMS can hardly optimise it.
- گەڕان بە تر خاوە. «هەموو ئەو مامۆستایانەی دوای 1990 لەدایک بوون» واتە گەڕان بە هەموو دارەکەدا، چونکە بەستەرەکان تەنها لە ڕەگەوە بەرەو خوارەوە دەچن.
- شێوەکەی جێگیرە. تەنها بەستەری «سەر بە» هەیە و دوای دروستکردنی دار ناتوانرێت جۆرێکی نوێی بەستەر زیاد بکرێت.
- ڕێگاکە دەبڕێت. بە فەرمانی وەک
GET UNIQUE،GET NEXTوGET NEXT WITHIN PARENTـی IMSـی IBM هەر جارە یەک دەجووڵێت، بۆیە ڕێکارییە و بە زەحمەت دەتوانێت باشتری بکات.
Distributed databasesبنکەدراوە دابەشکراوەکان
A is a database in which the data is stored across different physical locations. In brief, it is one integrated database built on top of a computer network rather than on a single computer.
کە لە چەند شوێنێکی فیزیکیی جیاوازدا هەڵگیراون. بە کورتی، یەک تێکەڵکراوە کە لەسەر بنیات نراوە، نەک لەسەر یەک .
The database is stored on several computers, called sites. A site can be one server or a whole , for example a bank's data centres in Erbil and Sulaymaniyah. The sites communicate with one another over computer networks: a inside a data centre, and a or the internet between data centres.
لەسەر چەند هەڵدەگیرێت کە پێیان دەگوترێت شوێن (sites). شوێنێک دەکرێت یەک بێت یان تەواو، بۆ نموونە بانکێک لە هەولێر و سلێمانی. شوێنەکان بە قسە لەگەڵ یەکتر دەکەن: لەناو و یان لە نێوان .
How a query is answered: when a query is run on a distributed database, a set of sites in different data centres work together to answer it, and the user receives one result.
چۆن وەڵام دەدرێتەوە: کاتێک لەسەر جێبەجێ دەکرێت، کۆمەڵێک شوێن لە جیاوازدا پێکەوە کار دەکەن بۆ وەڵامدانەوەی و یەک ئەنجام وەردەگرێت.
Distributed databasesبنکەدراوە دابەشکراوەکان
Location transparencyشەفافیەتی شوێن
In a , programs and users do not need to know on which computer or site the data is stored; the finds it for them.
لە ، بەرنامەکان و پێویست ناکات بزانن دراوەکە لەسەر کام کۆمپیوتەر یان شوێن هەڵگیراوە؛ بۆیان دەیدۆزێتەوە.
Distributed databases provide : applications do not need to know the exact site where the data is stored. The DBMS finds it for them.
دابین دەکەن: پێویست ناکات بزانن ڕێک لە کام شوێن هەڵگیراوە. بۆیان دەیدۆزێتەوە.
Your bank card works at the bank's cash machines in any city. You do not know, and do not need to know, which data centre holds your account. You ask for money; the system finds your account.
کارتی بانکەکەت لە ئامێرەکانی ATMی بانکەکە لە هەر شارێک کار دەکات. نازانیت و پێویستیش ناکات بزانیت هەژمارەکەت لە کام . تۆ داوای پارە دەکەیت؛ سیستەمەکە هەژمارەکەت دەدۆزێتەوە.
Where the analogy stops workingسنووری ئەم نموونەیە
Location is hidden, but it still matters for speed: data that is far away takes longer to arrive, and if the network between two sites breaks, some data may be out of reach for a while.
شوێن شاردراوەیە، بەڵام هێشتا بۆ خێرایی گرنگە: دوور کاتی زیاتری دەوێت تا دەگات و ئەگەر نێوان دوو شوێن بپچڕێت، لەوانەیە بۆ ماوەیەک هەندێک بەردەست نەبێت.
Distributed databasesبنکەدراوە دابەشکراوەکان
Other ways to sort DBMSsڕێگای تر بۆ پۆلێنکردنی سیستەمەکانی بەڕێوەبردنی بنکەدراوە
Besides the data model, textbooks sort DBMSs in four more ways:
جگە لە ، کتێبەکان بە چوار ڕێگای تریش پۆلێن دەکەن:
| Sorted byبەپێی | Kindsجۆرەکان |
|---|---|
| number of usersژمارەی | single-user, e.g. SQLite inside one phone app · multi-user, e.g. MySQL serving a websiteتاکبەکارهێنەر، وەک SQLite لەناو یەک مۆبایلدا · فرەبەکارهێنەر، وەک MySQL کە خزمەت بە دەکات |
| number of sitesژمارەی شوێنەکان | centralised (one site) · distributed: homogeneous (the same DBMS at every site), heterogeneous (different DBMSs) or federated (independent databases joined by a shared layer)ناوەندی (یەک شوێن) · دابەشکراو: هاوجۆر (homogeneous، هەمان لە هەموو شوێنێک)، ناهاوجۆر (heterogeneous، جیاواز) یان فیدراڵ (federated، سەربەخۆ کە چینێکی هاوبەش بەیەکیان دەبەستێت) |
| purposeمەبەست | general-purpose · special-purpose, e.g. an airline booking systemگشتی · تایبەت، وەک سیستەمی حیجزکردنی فڕۆکەخانەیەک |
| licence | (PostgreSQL) · proprietary (Oracle Database)، وەک PostgreSQL · ، وەک Oracle Database |
The six parts of a database systemشەش بەشەکەی سیستەمی بنکەدراوە
The course lists six parts that make a database system work:
کۆرسەکە شەش بەش دەژمێرێت کە دەخەنە کار:
- : the DBMS program itself, plus the and the network software it needs.
- : the computers, servers and disks the database runs on.
- : the facts themselves, the reason the system exists.
- Procedures: the written rules that say how the system should be used and maintained, for example how to take the nightly backup or what to do after a power cut.
- (database access language): the language used to talk to the database, such as . Its command families (DDL, DML, DCL and TCL) are in Database users and languages.
- : everybody who uses the system, from the DBA to the person filling in a form.
- : خودی ، لەگەڵ ئەو و پێویستیەتی.
- : ئەو ، و دیسکانەی لەسەریان کار دەکات.
- : خودی ڕاستییەکان، هۆی بوونی سیستەمەکە.
- ڕێکارەکان: ئەو ڕێسا نووسراوانەی دەڵێن سیستەمەکە چۆن بەکاربهێنرێت و چاودێری بکرێت، بۆ نموونە شەوانە چۆن بگیرێت یان دوای بڕانی کارەبا چی بکرێت.
- (زمانی گەیشتن بە ): ئەو زمانەی بۆ قسەکردن لەگەڵ بەکاردێت، وەک . خێزانەکانی فەرمانەکانی (، ، و ) لە بەکارهێنەران و زمانەکانی بنکەدراوەدان.
- : هەموو ئەو کەسانەی سیستەمەکە بەکاردەهێنن، لە DBAـەوە تا ئەو کەسەی فۆرمێک پڕ دەکاتەوە.
A short history: from punched cards to navigational databasesمێژوویەکی کورت: لە کارتی کونکراوەوە بۆ بنکەدراوە ڕێگادۆزەکان
Records were kept on clay tablets and paper for thousands of years. Then came machines:
هەزاران ساڵ لەسەر تەختەی قوڕ و کاغەز ڕاگیران. پاشان ئامێرەکان هاتن:
- 1890: the US census is counted from punched cards on Herman Hollerith's machines. The 1880 census, counted by hand, had taken until 1887.
- 1950s: computers such as UNIVAC I (1951) keep files on magnetic tape, which is read only in order: batch processing.
- From the late 1950s: magnetic disks allow direct access: one record can be read and changed in place. Indexed files (ISAM) appear, but each program still has its own files.
- 1960s, the first DBMSs: Charles Bachman's IDS at General Electric (1964), whose network model became the CODASYL standard in 1971; and IBM's hierarchical IMS, built with North American Aviation for the Apollo moon programme, first used in 1968 and still used by big banks.
- 1890: سەرژمێریی ئەمریکا بە ئامێرەکانی Herman Hollerith لە کارتی کونکراوەوە دەژمێردرێت. سەرژمێریی 1880 کە بە دەست ژمێردرابوو، تا 1887ی خایاند.
- ساڵانی 1950: وەک UNIVAC I (1951) لەسەر هەڵدەگرن، کە تەنها بە ڕیز دەخوێنرێتەوە: چارەسەرکردنی کۆمەڵەیی.
- لە کۆتایی ساڵانی 1950ـەوە: دیسکی موگناتیسی دەستڕاگەیشتنی ڕاستەوخۆ دەدات: دەکرێت یەک لە شوێنی خۆیدا بخوێنرێتەوە و بگۆڕدرێت. پێڕستکراو (ISAM) دەردەکەون، بەڵام هێشتا هەر خۆی هەیە.
- ساڵانی 1960، یەکەم : IDSـی Charles Bachman لە General Electric (1964)، کە مۆدێلە ڕایەڵەییەکەی لە 1971دا بوو بە ستانداردی CODASYL؛ و IMSـی هەرەمیی IBM، کە لەگەڵ North American Aviation بۆ پرۆگرامی Apolloی مانگ دروست کرا، یەکەم جار لە 1968دا بەکارهات و هێشتا لە بانکە گەورەکاندا بەکاردێت.
A short history: from punched cards to navigational databasesمێژوویەکی کورت: لە کارتی کونکراوەوە بۆ بنکەدراوە ڕێگادۆزەکان
From Codd to the cloudلە Coddـەوە بۆ هەور
- 1970: Edgar F. Codd at IBM publishes A Relational Model of Data for Large Shared Data Banks: data in tables, and a query says what it wants while the DBMS finds how.
- 1970s: two research systems test the idea: IBM's System R (from 1974), with the language SEQUEL that became SQL, and Ingres at the University of California, Berkeley, the ancestor of PostgreSQL.
- 1979: Oracle V2, the first SQL database on sale. IBM's DB2 follows in 1983.
- 1986: the first SQL standard (ANSI; ISO in 1987), revised many times up to SQL:2023.
- 1980s–1990s: databases on PCs: dBASE, Paradox, FoxPro, then Microsoft Access (1992). Free servers arrive: MySQL (1995) and PostgreSQL (1996). Object and object-relational databases handle maps, drawings and media; SQL:1999 adds object features.
- 2000s–today: NoSQL and big data, cloud databases, and in-memory databases such as SAP HANA.
- 1970: Edgar F. Codd لە IBM وتاری A Relational Model of Data for Large Shared Data Banks بڵاو دەکاتەوە: لە و دەڵێت چی دەوێت، دەدۆزێتەوە چۆن.
- ساڵانی 1970: دوو سیستەمی توێژینەوە بیرۆکەکە تاقی دەکەنەوە: System Rـی IBM (لە 1974ـەوە) بە زمانی SEQUEL کە بوو بە SQL؛ هەروەها Ingres لە زانکۆی کالیفۆرنیا، بێرکلی، کە باپیرەی PostgreSQLـە.
- 1979: Oracle V2، یەکەم SQL بۆ فرۆشتن. DB2ـی IBM لە 1983دا بەدوایدا دێت.
- 1986: یەکەم ستانداردی SQL (ANSI؛ ISO لە 1987)، کە چەندین جار تا SQL:2023 نوێ کراوەتەوە.
- ساڵانی 1980–1990: لەسەر کەسی: dBASE، Paradox، FoxPro، پاشان Microsoft Access (1992). بێبەرانبەر دێن: MySQL (1995) و PostgreSQL (1996). تەنخواز و تەنخوازی پەیوەندیدار نەخشە، وێنەکێشان و میدیا هەڵدەگرن؛ SQL:1999 تایبەتمەندیی زیاد دەکات.
- ساڵانی 2000 تا ئەمڕۆ: NoSQL و دراوەی گەورە، بنکەدراوە هەورییەکان و ناو بیرگە وەک SAP HANA.
Quick checkپرسیاری خێرا
What is a DBMS? Give two examples.سیستەمی بەڕێوەبردنی بنکەدراوە چییە؟ دوو نموونە بهێنەوە.
Software that stores, retrieves and runs queries on data, and sits between the users and the database. Examples: MySQL, Microsoft Access, SQL Server, Oracle, PostgreSQL, SQLite.
کە خەزن دەکات، دەیهێنێتەوە و لەسەر جێبەجێ دەکات و لە نێوان و . نموونە: MySQL، Microsoft Access، SQL Server، Oracle، PostgreSQL، SQLite.
Which item of the course's “types of DBMS” is an architecture, not a data model?کام بڕگەی «جۆرەکانی DBMS»ی کۆرسەکە پێکهاتەیە، نەک مۆدێلی دراوە؟
The distributed database. It says where the data is stored; the data model inside can still be relational or NoSQL.
. دەڵێت لە کوێ هەڵگیراوە؛ ناوەوەی هێشتا دەتوانێت پەیوەندیدار یان بێت.
What is a tuple? What is a relation?tuple چییە؟ relation چییە؟
A tuple is one row of a table (a record). A relation is a table.
tuple یەک (). relation .
What is location transparency?شەفافیەتی شوێن چییە؟
In a distributed database, applications do not need to know at which site the data is stored; the DBMS finds it.
لە ، پێویست ناکات بزانن لە کام شوێن هەڵگیراوە؛ دەیدۆزێتەوە.
Name the six parts of a database system.شەش بەشەکەی سیستەمی بنکەدراوە ناو ببە.
Software, hardware, data, procedures, database access language and users.
، ، ، ڕێکارەکان، و .
Name the kind of database in each case: (a) A company keeps employees and departments in tables linked by the department number. (b) A bank keeps its customer data in data centres in Erbil, Sulaymaniyah and Duhok, and its app sees one database. (c) A program stores whole Student objects, with their data and methods, exactly as the programming language holds them. (d) An old system where every employee record sits under exactly one department record.
جۆری لە هەر حاڵەتێکدا ناو ببە: (أ) کۆمپانیایەک فەرمانبەران و بەشەکان لە هەڵدەگرێت کە بە ژمارەی بەش بەیەکەوە بەستراون. (ب) بانکێک کڕیارانی لە هەولێر، سلێمانی و دهۆکدا هەڵدەگرێت و یەک دەبینێت. (ج) Student بە تەواوی، بە و ، هەڵدەگرێت ڕێک وەک چۆن هەڵیاندەگرێت. (د) سیستەمێکی کۆن کە تێیدا هەموو فەرمانبەرێک ڕێک لە ژێر یەک بەشدایە.
Show answerوەڵامەکە پیشان بدە
- (a) relational (linked tables)
- (b) distributed (and the data model inside is probably relational)
- (c) object-oriented
- (d) hierarchical (one parent per record)
- (أ) پەیوەندیدار ( بەستراو)
- (ب) دابەشکراو (و ناوەوەی بە ئەگەری زۆر پەیوەندیدارە)
- (ج) تەنخواز
- (د) هەرەمی (یەک باوان بۆ هەر )
Summaryپوختە
- A DBMS is the software that stores, retrieves and queries data. It sits between the users and the database and gives them CRUD.
- Every DBMS must give nine services: integration, operations, a catalog, user views, integrity, security, transactions, synchronisation and recovery.
- Data models: relational (the most common), object-oriented, hierarchical, network and NoSQL. Distributed is an architecture, not a model.
- Table = relation, row = tuple = record, column = attribute = field.
- Degree = number of attributes, cardinality = number of tuples. A relation has unique column names, no duplicate rows, no meaning in row or column order, and one atomic value per cell.
- A hierarchical database is a tree: every record has one parent. A distributed database spreads one database over many sites and hides where the data is (location transparency).
- A database system has six parts: software, hardware, data, procedures, database access language and users.
- History: punched cards (1890) → tape → disks and navigational DBMSs (IDS, IMS, 1960s) → Codd's relational model (1970) → SQL products and the SQL standard (1979–1986) → PC and open-source databases → NoSQL, big data and the cloud.
- ئەو کە خەزن دەکات، دەیهێنێتەوە و لەسەر دەکات. لە نێوان و و پێ دەبەخشێت.
- هەموو دەبێت نۆ خزمەتگوزاری بدات: یەکخستن، کارەکان، کاتالۆگ، ، ، ، ، هاوکاتکردن و .
- : پەیوەندیدار (باوترین)، تەنخواز، هەرەمی، ڕایەڵەیی و . دابەشکراو پێکهاتەیە، نەک مۆدێل.
- = relation، = tuple = ، (column) = attribute = field.
- = ژمارەی ، = ژمارەی . relation ناوی تاکی ، هیچ دووبارە، هیچ واتایەک لە ڕیزبەندیی و و یەک لە هەر هەیە.
- دارێکە: هەر یەک باوانی هەیە. یەک بەسەر چەندین شوێندا بڵاو دەکاتەوە و شوێنی دەشارێتەوە ().
- شەش بەشی هەیە: ، ، ، ڕێکارەکان، و .
- مێژوو: کارتی کونکراو (1890) ← ← دیسک و ڕێگادۆز (IDS، IMS، ساڵانی 1960) ← مۆدێلی پەیوەندیداری Codd (1970) ← بەرهەمەکانی SQL و ستانداردی SQL (1979–1986) ← کەسی و ← ، و هەور.
Next: the people who use a database, and the languages they speak to it. Database users and languages.
دواتر: ئەو کەسانەی بەکاردەهێنن و ئەو زمانانەی پێی قسەی لەگەڵ دەکەن. بەکارهێنەران و زمانەکانی بنکەدراوە.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Database Users and Database Languagesبەکارهێنەرەکانی بنکەدراوە و زمانەکانی بنکەدراوە
Related lecturesوانە پەیوەندیدارەکان
- Database Users and Database Languagesبەکارهێنەرەکانی بنکەدراوە و زمانەکانی بنکەدراوە
- Database Systems, Abstraction and Data Modelsسیستەمەکانی بنکەدراوە، ڕووتکردنەوەی دراوە و مۆدێلەکانی دراوە
- NoSQL and Big DataNoSQL و دراوەی گەورە
- Databases and SQL basicsبنکەدراوەکان و بنەماکانی SQL
- SQLite Basicsبنەماکانی SQLite
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
- Silberschatz, Korth and Sudarshan: Database System Concepts, 7th ed., Chapter 1 slides (data models, database architecture, history)
- Microsoft Learn: Windows registry for advanced users
- Google Cloud documentation: Spanner replication
- U.S. Census Bureau: Tabulation and processing (Hollerith and the 1890 census)
- IBM: Information Management System (IMS) history
- Wikipedia: Database (history section)
- Wikipedia: IBM System R
- Wikipedia: SQL (standardization history)
- PostgreSQL documentation: A brief history of PostgreSQL
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.