0% found this document useful (0 votes)
25 views

ADBMS - Chapter 01

This document provides an introduction to advanced database management systems and client/server databases using Oracle 10g as an example. It outlines key objectives such as understanding the purpose of database systems and normalization. Database systems aim to centrally store and maintain large amounts of organizational data that must be accessed by many users simultaneously. A database management system provides common functions for managing the database, while a database administrator is responsible for installation, administration and maintenance. The overview describes relational databases as consisting of tables with columns and rows to store data about different entities and relationships between records.

Uploaded by

ddddd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

ADBMS - Chapter 01

This document provides an introduction to advanced database management systems and client/server databases using Oracle 10g as an example. It outlines key objectives such as understanding the purpose of database systems and normalization. Database systems aim to centrally store and maintain large amounts of organizational data that must be accessed by many users simultaneously. A database management system provides common functions for managing the database, while a database administrator is responsible for installation, administration and maintenance. The overview describes relational databases as consisting of tables with columns and rows to store data about different entities and relationships between records.

Uploaded by

ddddd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Advanced Database Management Systems

(DBMS)
Chapter 1

Client/Server Databases and the Oracle 10g Relational Database


10 ‫ اﻟﺨﺎدم وﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت أوراﻛﻞ‬/ ‫ﻗﻮاﻋﺪ ﺑﯿﺎﻧﺎت اﻟﻌﻤﯿﻞ‬g

Objectives ‫اﻷھﺪاف‬
• Develop an understanding of the purpose of database systems
• Describe the purpose and contents of an entity-relationship model
• Explain the steps in the normalization process
• Describe the differences between personal and client/server databases
• Understand the Northwoods University student registration database and the
Clearwater Traders sales order database
.‫ﺗﻄﻮﯾﺮ ﻓﮭﻢ ﻟﻐﺮض ﻧﻈﻢ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
.‫ﻧﺼﻒ اﻟﻐﺮض وﻣﺤﺘﻮﯾﺎت ﻧﻤﻮذج ﻋﻼﻗﺔ اﻟﻜﯿﺎن‬
.‫اﺷﺮح اﻟﺨﻄﻮات ﻓﻲ ﻋﻤﻠﯿﺔ اﻟﺘﻄﺒﯿﻊ‬
.‫ اﻟﺨﺎدم‬/ ‫وﺻﻒ اﻻﺧﺘﻼﻓﺎت ﺑﯿﻦ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﺸﺨﺼﯿﺔ واﻟﻌﻤﯿﻞ‬
Clearwater Traders ‫ وﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت أواﻣﺮ ﻣﺒﯿﻌﺎت‬Northwoods ‫ﻓﮭﻢ ﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت ﺗﺴﺠﯿﻞ اﻟﻄﻼب ﺑﺠﺎﻣﻌﺔ‬

Introduction
‫اﻟﻤﻘﺪﻣﺔ‬
If an organization needs to store and maintain a large amount of data that must be viewed and
updated by many users at the same time, it often uses a client/server database such as Oracle
10g.
‫إذا اﺣﺘﺎﺟﺖ اﻟﻤﺆﺳﺴﺔ إﻟﻰ ﺗﺨﺰﯾﻦ وﺻﯿﺎﻧﺔ ﻛﻤﯿﺔ ﻛﺒﯿﺮة ﻣﻦ اﻟﺒﯿﺎﻧﺎت اﻟﺘﻲ ﯾﺠﺐ ﻋﺮﺿﮭﺎ وﺗﺤﺪﯾﺜﮭﺎ ﻣﻦ ﻗﺒﻞ اﻟﻌﺪﯾﺪ ﻣﻦ‬
‫ اﻟﺨﺎدم ﻣﺜﻞ‬/ ‫ ﻓﻐﺎﻟﺒًﺎ ﻣﺎ ﺗﺴﺘﺨﺪم ﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت اﻟﻌﻤﯿﻞ‬،‫اﻟﻤﺴﺘﺨﺪﻣﯿﻦ ﻓﻲ ﻧﻔﺲ اﻟﻮﻗﺖ‬Oracle 10g.

Database Systems
‫ﻧﻈﻢ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
• Data files consist of: ‫ﺗﺘﻜﻮن ﻣﻠﻔﺎت اﻟﺒﯿﺎﻧﺎت ﻣﻦ‬
– Fields ‫اﻟﺤﻘﻮل‬
• Describe characteristics ‫وﺻﻒ اﻟﺨﺼﺎﺋﺺ‬
• Also called columns ‫وﺗﺴﻤﻰ أﯾﻀﺎ اﻷﻋﻤﺪة‬
– Records ‫اﻟﺴﺠﻼت‬
• Group of related fields ‫ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻟﺤﻘﻮل ذات اﻟﺼﻠﺔ‬
• Problems with storing data in files:
:‫ﻣﺸﺎﻛﻞ ﻓﻲ ﺗﺨﺰﯾﻦ اﻟﺒﯿﺎﻧﺎت ﻓﻲ اﻟﻤﻠﻔﺎت‬
– Proliferation of data management programs
‫اﻧﺘﺸﺎر ﺑﺮاﻣﺞ إدارة اﻟﺒﯿﺎﻧﺎت‬
– Presence of redundant data ‫وﺟﻮد ﺑﯿﺎﻧﺎت زاﺋﺪة ﻋﻦ اﻟﺤﺎﺟﺔ‬
– Inconsistent data ‫ﺑﯿﺎﻧﺎت ﻏﯿﺮ ﻣﺘﻨﺎﺳﻘﺔ‬
• Database ‫ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
– Stores all organizational data in central location
‫ﯾﺨﺰن ﺟﻤﯿﻊ اﻟﺒﯿﺎﻧﺎت اﻟﺘﻨﻈﯿﻤﯿﺔ ﻓﻲ ﻣﻮﻗﻊ ﻣﺮﻛﺰي‬
– Eliminates redundant data to reduce possibility of inconsistent data
‫ﯾﺰﯾﻞ اﻟﺒﯿﺎﻧﺎت اﻟﻤﺘﻜﺮرة ﻟﻠﺤﺪ ﻣﻦ اﺣﺘﻤﺎل وﺟﻮد ﺑﯿﺎﻧﺎت ﻏﯿﺮ ﻣﺘﺴﻘﺔ‬
• Database management system (DBMS)
‫ﻧﻈﺎم إدارة ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
– Application that performs all routine data-handling operations
‫وھﻮ اﻟﺘﻄﺒﯿﻖ اﻟﺬي ﯾﻨﻔﺬ ﺟﻤﯿﻊ ﻋﻤﻠﯿﺎت ﻣﻌﺎﻟﺠﺔ اﻟﺒﯿﺎﻧﺎت اﻟﺮوﺗﯿﻨﯿﺔ‬
– Provides central set of common functions for managing database
:‫ﯾﻮﻓﺮ ﻣﺠﻤﻮﻋﺔ ﻣﺮﻛﺰﯾﺔ ﻣﻦ اﻟﻮظﺎﺋﻒ اﻟﺸﺎﺋﻌﺔ ﻹدارة ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
• Inserting ‫ادﺧﺎل‬
• Updating ‫ﺗﺤﺪﯾﺚ‬
• Retrieving ‫اﺳﺘﺮﺟﺎع‬
• Deleting data values ‫ﺣﺬف ﻗﯿﻢ اﻟﺒﯿﺎﻧﺎت‬

• Database Administrator ‫ﻣﺴﺆول ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬


– Person responsible for installing, administering, and maintaining the database
‫اﻟﺸﺨﺺ اﻟﻤﺴﺆول ﻋﻦ ﺗﺜﺒﯿﺖ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت وإدارﺗﮭﺎ وﺻﯿﺎﻧﺘﮭﺎ‬
– Often called DBA
‫ﻏﺎﻟﺒﺎ ﻣﺎ ﯾﺴﻤﻰ ﻣﺴﺆول ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬DBA

Database Approach to Data Processing


‫ﻧﮭﺞ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت ﻟﻤﻌﺎﻟﺠﺔ اﻟﺒﯿﺎﻧﺎت‬

Overview of Relational Databases


‫ﻧﻈﺮة ﻋﺎﻣﺔ ﻋﻠﻰ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﻌﻼﺋﻘﯿﺔ‬
• Table ‫ﺟﺪول‬
– Matrix with columns and rows‫ﻣﺼﻔﻮﻓﺔ ﻣﻊ اﻷﻋﻤﺪة واﻟﺼﻔﻮف‬
• Columns ‫اﻻﻋﻤﺪة‬
– Represent different data fields
‫ﺗﻤﺜﻞ ﺣﻘﻮل اﻟﺒﯿﺎﻧﺎت اﻟﻤﺨﺘﻠﻔﺔ‬
– Characteristics or attributes about entity
‫ﺧﺼﺎﺋﺺ أو ﺳﻤﺎت ﺣﻮل اﻟﻜﯿﺎن‬
• Rows ‫اﻟﺼﻔﻮف‬
– Contain individual records ‫ﺗﺤﺘﻮي ﻋﻠﻰ ﺳﺠﻼت ﻓﺮدﯾﺔ‬
– Attributes about a specific instance of entity
‫ﺳﻤﺎت ﺣﻮل ﻧﺴﺨﺔ ﻣﺤﺪدة أو )ﻣﺜﯿﻞ ﻣﻌﯿﻦ( ﻣﻦ اﻟﻜﯿﺎن‬
• Entity ‫ﻛﯿﺎن‬
– Object about which you want to store data
‫ھﻮ ﻛﺎﺋﻦ ﻧﺮﯾﺪ ﺗﺨﺰﯾﻦ اﻟﺒﯿﺎﻧﺎت ﻋﻨﮫ‬
– Different tables store data about each different entity ‫اﻟﺠﺪاول اﻟﻤﺨﺘﻠﻔﺔ ﺗﺨﺰن اﻟﺒﯿﺎﻧﺎت‬
‫ﻋﻦ ﻛﻞ ﻛﯿﺎن ﻣﺨﺘﻠﻒ‬
• Relationships ‫اﻟﻌﻼﻗﺎت‬
– Links that show how different records are related
‫اﻟﺮواﺑﻂ اﻟﺘﻲ ﺗﺒﯿﻦ ﻣﺪى ارﺗﺒﺎط اﻟﺴﺠﻼت اﻟﻤﺨﺘﻠﻔﺔ‬
• Key fields ‫اﻟﺤﻘﻮل اﻟﺮﺋﯿﺴﯿﺔ‬
– Establish relationships among records in different tables ‫ﺗﺄﺳﯿﺲ ﻋﻼﻗﺎت ﺑﯿﻦ‬
‫اﻟﺴﺠﻼت ﻓﻲ ﺟﺪاول ﻣﺨﺘﻠﻔﺔ‬
– Main types of key fields:
‫اﻷﻧﻮاع اﻟﺮﺋﯿﺴﯿﺔ ﻣﻦ اﻟﺤﻘﻮل اﻟﺮﺋﯿﺴﯿﺔ‬
• Primary ‫اﻷﺳﺎﺳﻲ‬
• Candidate ‫ﻣﺮﺷﺢ‬
• Surrogate ‫ﺑﺪﯾﻞ‬
• Foreign ‫أﺟﻨﺒﻲ‬
• Composite ‫ﻣﺮﻛﺐ‬

Primary Keys
‫اﻟﻤﻔﺎﺗﯿﺢ اﻷﺳﺎﺳﯿﺔ‬
• Column in relational database table whose value must be unique for each row
‫ھﻮ ﻋﻤﻮد ﻓﻲ ﺟﺪول ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت اﻟﻌﻼﺋﻘﯿﺔ اﻟﺬي ﯾﺠﺐ أن ﺗﻜﻮن ﻗﯿﻤﺘﮫ ﻓﺮﯾﺪة ﻟﻜﻞ ﺻﻒ‬
• Serves to identify individual occurrence of entity
‫ﯾﺨﺪم ﻟﺘﺤﺪﯾﺪ اﻟﺘﻮاﺟﺪ اﻟﻔﺮدي ﻟﻠﻜﯿﺎن‬
• Every row must have a primary key ‫ﯾﺠﺐ أن ﯾﻜﻮن ﻟﻜﻞ ﺻﻒ ﻣﻔﺘﺎح أﺳﺎﺳﻲ‬
• Cannot be NULL ‫ﻻ ﯾﻤﻜﻦ أن ﺗﻜﻮن ﻻﻏﯿﺔ أو ﻋﺪﻣﺎ او ﻓﺎرﻏﺎ‬
• NULL ‫ﻻ ﺷﻲء‬
– Value is absent or unknown ‫اﻟﻘﯿﻤﺔ ﻏﺎﺋﺒﺔ أو ﻏﯿﺮ ﻣﻌﺮوﻓﺔ‬
– No entry is made for that data element‫ﻻ ﯾﻮﺟﺪ إدﺧﺎل ﻟﻌﻨﺼﺮ اﻟﺒﯿﺎﻧﺎت ھﺬا‬

Candidate Keys
‫اﻟﻤﻔﺎﺗﯿﺢ اﻟﻤﺮﺷﺤﺔ‬
• Any column that could be used as the primary key
‫أي ﻋﻤﻮد ﯾﻤﻜﻦ اﺳﺘﺨﺪاﻣﮫ ﻛﻤﻔﺘﺎح أﺳﺎﺳﻲ‬
• Should be a column that is unique for each record and does not change
‫ﯾﺠﺐ أن ﯾﻜﻮن ﻋﻤﻮدًا ﻓﺮﯾﺪًا ﻟﻜﻞ ﺳﺠﻞ وﻻ ﯾﺘﻐﯿﺮ‬

Surrogate Keys
‫ﻣﻔﺎﺗﯿﺢ ﺑﺪﯾﻠﺔ‬
• Column created to be record’s primary key identifier
‫ﺗﻢ إﻧﺸﺎء اﻟﻌﻤﻮد ﻟﯿﻜﻮن ﻣﻌﺮف اﻟﻤﻔﺘﺎح اﻷﺳﺎﺳﻲ ﻟﻠﺴﺠﻞ‬
• Has no real relationship to row to which it is assigned other than to identify it
uniquely
‫ﻟﯿﺲ ﻟﮫ ﻋﻼﻗﺔ ﺣﻘﯿﻘﯿﺔ ﺑﺎﻟﺼﻒ اﻟﺬي ﺗﻢ ﺗﻌﯿﯿﻨﮫ ﻟﮫ ﺑﺨﻼف ﺗﺤﺪﯾﺪه ﺑﺸﻜﻞ ﻓﺮﯾﺪ‬
• Surrogate key values automatically generated using a sequence
‫ﻗﯿﻢ ﻣﻔﺎﺗﯿﺢ اﻟﺒﺪﯾﻞ اﻟﺮﺋﯿﺴﯿﺔ ﯾﺘﻢ إﻧﺸﺎؤھﺎ ﺗﻠﻘﺎﺋﯿﺎ ﺑﺎﺳﺘﺨﺪام ﺗﺴﻠﺴﻞ‬
Foreign Keys
‫ﻣﻔﺎﺗﯿﺢ ﺧﺎرﺟﯿﺔ او اﺟﻨﺒﯿﺔ‬
• Column in table that is a primary key in another table
‫اﻟﻌﻤﻮد ﻓﻲ اﻟﺠﺪول ھﻮ ﻣﻔﺘﺎح أﺳﺎﺳﻲ ﻓﻲ ﺟﺪول آﺧﺮ‬
• Creates relationship between two tables ‫ﯾﻮﺟﺪ اﻟﻌﻼﻗﺔ ﺑﯿﻦ ﺟﺪوﻟﯿﻦ‬
• Value must exist in table where it is the primary key
‫ﯾﺠﺐ أن ﺗﻜﻮن اﻟﻘﯿﻤﺔ ﻣﻮﺟﻮدة ﻓﻲ اﻟﺠﺪول ﺣﯿﺚ ﯾﻜﻮن اﻟﻤﻔﺘﺎح اﻷﺳﺎﺳﻲ‬

Composite Keys ‫اﻟﻤﻔﺎﺗﯿﺢ اﻟﻤﺮﻛﺒﺔ‬


• Unique key that is created by combining two or more columns
‫اﻟﻤﻔﺘﺎح اﻟﻔﺮﯾﺪ اﻟﺬي ﺗﻢ إﻧﺸﺎؤه ﻋﻦ طﺮﯾﻖ اﻟﺠﻤﻊ ﺑﯿﻦ ﻋﻤﻮدﯾﻦ أو أﻛﺜﺮ‬
• Usually comprises fields that are primary keys in other tables
‫ﯾﺸﺘﻤﻞ ﻋﺎدة ً ﻋﻠﻰ اﻟﺤﻘﻮل اﻟﺘﻲ ﺗﻤﺜﻞ اﻟﻤﻔﺎﺗﯿﺢ اﻷﺳﺎﺳﯿﺔ ﻓﻲ اﻟﺠﺪاول اﻷﺧﺮى‬

Database Design
‫ﺗﺼﻤﯿﻢ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
Main tasks involved with design of database: ‫اﻟﻤﮭﺎم اﻟﺮﺋﯿﺴﯿﺔ اﻟﺘﻲ ﺗﺸﺎرك ﻣﻊ ﺗﺼﻤﯿﻢ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
– Developing entity-relationship (ER) model ‫ﺗﻄﻮﯾﺮ ﻧﻤﻮذج اﻟﻌﻼﻗﺔ ﺑﯿﻦ اﻟﻜﯿﺎن‬
– Normalizing database tables ‫ﺗﺴﻮﯾﺔ ﺟﺪاول ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت وﺟﻌﻠﮭﺎ طﺒﯿﻌﯿﺔ‬

Entity-Relationship Model
‫ﻧﻤﻮذج اﻟﻌﻼﻗﺔ ﺑﯿﻦ اﻟﻜﯿﺎن‬
• Designed to help you identify which entities need to be included in database
.‫ﻣﺼﻤﻤﺔ ﻟﻤﺴﺎﻋﺪﺗﻚ ﻓﻲ ﺗﺤﺪﯾﺪ أي اﻟﻜﯿﺎﻧﺎت ﺗﺤﺘﺎج إﻟﻰ أن ﺗﺪرج ﻓﻲ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
• Composed of :‫ﺗﺘﻜﻮن ﻣﻦ‬
– Squares representing entities ‫اﻟﻤﺮﺑﻌﺎت اﻟﺘﻲ ﺗﻤﺜﻞ اﻟﻜﯿﺎﻧﺎت‬
– Lines representing relationships‫ﺧﻄﻮط ﺗﻤﺜﻞ اﻟﻌﻼﻗﺎت‬
• Types of relationships: :‫أﻧﻮاع اﻟﻌﻼﻗﺎت‬
– One to one (1:1)
– One to many (1:M)
– Many to many (N:M)
• One to one (1:1)
– Each occurrence of a specific entity is found only once in each set of data
‫ﺗﻢ اﻟﻌﺜﻮر ﻋﻠﻰ ﻛﻞ ﺗﻮاﺟﺪ ﻟﻜﯿﺎن ﻣﻌﯿﻦ ﻣﺮة واﺣﺪة ﻓﻘﻂ ﻓﻲ ﻛﻞ ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻟﺒﯿﺎﻧﺎت‬
– Rare in relational databases‫ﯾﻜﻮن ﻧﺎدر ﻓﻲ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﻌﻼﺋﻘﯿﺔ‬
• One to many (1:M)
– Instance can only appear once in one entity, but one or more times in the other entity
‫ وﻟﻜﻦ ﻣﺮة واﺣﺪة أو أﻛﺜﺮ ﻓﻲ اﻟﻜﯿﺎن اﻵﺧﺮ‬،‫ﯾﻤﻜﻦ أن ﯾﻈﮭﺮ اﻟﻤﺜﯿﻞ ﻣﺮة واﺣﺪة ﻓﻘﻂ ﻓﻲ ﻛﯿﺎن واﺣﺪ‬
• Many to many (N:M)
– Instance can occur multiple times in each entity ‫ﯾﻤﻜﻦ أن ﯾﺤﺪث ﻣﺜﯿﻞ ﻋﺪة ﻣﺮات ﻓﻲ ﻛﻞ ﻛﯿﺎن‬
– Cannot be represented in physical database ‫ﻻ ﯾﻤﻜﻦ ﺗﻤﺜﯿﻠﮫ ﻓﻲ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت اﻟﻔﻌﻠﯿﺔ‬
– Broken down into series of two or more 1:M relationships through use of linking table
in process of normalization
(‫ ﻣﻦ ﺧﻼل اﺳﺘﺨﺪام ﺟﺪول اﻟﺮﺑﻂ ﻓﻲ ﻋﻤﻠﯿﺔ اﻟﺘﻄﺒﯿﻊ )ﺗﻜﻮﯾﻦ ﺟﺪول ﺛﺎﻟﺚ‬M:1 ‫ﻣﻘﺴﻤﺔ إﻟﻰ ﺳﻠﺴﻠﺔ ﻣﻦ ﻋﻼﻗﺘﯿﻦ أو أﻛﺜﺮ‬

Normalization ‫ﺗﻄﺒﯿﻊ‬
• Step-by-step process used to determine which data elements should be stored in which
tables ‫ﻋﻤﻠﯿﺔ ﺧﻄﻮة ﺑﺨﻄﻮة ﺗ ُﺴﺘﺨﺪم ﻟﺘﺤﺪﯾﺪ ﻋﻨﺎﺻﺮ اﻟﺒﯿﺎﻧﺎت اﻟﺘﻲ ﯾﻨﺒﻐﻲ ﺗﺨﺰﯾﻨﮭﺎ ﻓﻲ اﻟﺠﺪاول‬
• Purpose ‫اﻟﮭﺪف‬
– Eliminate data redundancy ‫اﻟﻘﻀﺎء ﻋﻠﻰ اﻟﺘﻜﺮار اﻟﺒﯿﺎﻧﺎت‬
• Several levels of normalization ‫ﯾﻮﺟﺪ ﻋﺪة ﻣﺴﺘﻮﯾﺎت ﻣﻦ اﻟﺘﻄﺒﯿﻊ‬
– Forms ‫ﻧﻤﺎذج‬
• Unnormalized data ‫ﺑﯿﺎﻧﺎت ﻏﯿﺮ طﺒﯿﻌﯿﺔ‬
– Does not have a primary key identified ‫ﻟﻢ ﯾﺘﻢ ﺗﺤﺪﯾﺪ ﻣﻔﺘﺎح أﺳﺎﺳﻲ‬
– Contains repeating groups ‫ﯾﺤﺘﻮي ﻋﻠﻰ ﻣﺠﻤﻮﻋﺎت ﻣﺘﻜﺮرة‬
• First normal form (1NF) ‫أول ﻧﻤﻮذج ﻋﺎدي‬
– Repeating groups removed ‫ﻣﺠﻤﻮﻋﺎت ﻣﺘﻜﺮرة ﯾﺘﻢ إزاﻟﺘﮭﺎ‬
– Primary key field identified ‫ﺗﻢ ﺗﺤﺪﯾﺪ ﺣﻘﻞ اﻟﻤﻔﺘﺎح اﻟﺮﺋﯿﺴﻲ‬
• Second normal form (2NF) ‫اﻟﻨﻤﻮذج اﻟﻌﺎدي اﻟﺜﺎﻧﻲ‬
– In 1NF ‫ﻧﻜﻮن ﻓﻲ‬
– No partial dependencies ‫ﻻ ﯾﻮﺟﺪ اﻟﺘﺒﻌﯿﺎت اﻟﺠﺰﺋﯿﺔ‬
• Partial dependency :‫اﻟﺘﺒﻌﯿﺔ اﻟﺠﺰﺋﯿﺔ ھﻲ‬
– Fields within the table are dependent only on part of the primary key
‫ﺗﻌﺘﻤﺪ اﻟﺤﻘﻮل اﻟﻤﻮﺟﻮدة ﻓﻲ اﻟﺠﺪول ﻓﻘﻂ ﻋﻠﻰ ﺟﺰء ﻣﻦ اﻟﻤﻔﺘﺎح اﻷﺳﺎﺳﻲ‬
• Basic procedure for identifying partial dependency: ‫اﻹﺟﺮاء اﻷﺳﺎﺳﻲ ﻟﺘﺤﺪﯾﺪ اﻟﺘﺒﻌﯿﺔ اﻟﺠﺰﺋﯿﺔ‬
– Look at each field that is not part of the composite primary key
‫اﻧﻈﺮ إﻟﻰ ﻛﻞ ﺣﻘﻞ ﻟﯿﺲ ﺟﺰًءا ﻣﻦ اﻟﻤﻔﺘﺎح اﻷﺳﺎﺳﻲ اﻟﻤﺮﻛﺐ‬
– Make certain you are required to have both parts of the composite field to
determine the value of the data element ‫ﺗﺄﻛﺪ أﻧﻚ ﻣﻄﺎﻟﺐ ﺑﺎﻣﺘﻼك ﺟﺰأﯾﻦ ﻣﻦ اﻟﺤﻘﻞ‬
‫اﻟﻤﺮﻛﺐ ﻟﺘﺤﺪﯾﺪ ﻗﯿﻤﺔ ﻋﻨﺼﺮ اﻟﺒﯿﺎﻧﺎت‬
• Third normal form (3NF)
– In 2NF ‫ﻧﻜﻮن ﻓﻲ‬
– No transitive dependencies ‫ﻻ ﺗﺒﻌﯿﺎت ﻣﺘﻌﺪﯾﺔ‬
• Transitive dependency ‫اﻟﺘﺒﻌﯿﺔ ﻣﺘﻌﺪﯾﺔ‬
– Field is dependent on another field within the table that is not the primary key
field ‫ﯾﻌﺘﻤﺪ اﻟﺤﻘﻞ ﻋﻠﻰ ﺣﻘﻞ آﺧﺮ ﻓﻲ اﻟﺠﺪول ﻟﯿﺲ ﺣﻘﻞ اﻟﻤﻔﺘﺎح اﻷﺳﺎﺳﻲ‬
Database Systems ‫ﻧﻈﻢ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
• Consists of ‫ﯾﺘﻜﻮن ﻣﻦ‬
– DBMS ‫ﻧﻈﺎم ادارة ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
• Manages physical storage and data retrieval
‫ﯾﺪﯾﺮ اﻟﺘﺨﺰﯾﻦ اﻟﻔﻌﻠﻲ واﺳﺘﺮﺟﺎع اﻟﺒﯿﺎﻧﺎت‬
– Database applications ‫ﺗﻄﺒﯿﻘﺎت ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
• Provide interface that allows users to interact with database
‫ﺗﻮﻓﯿﺮ واﺟﮭﺔ ﺗﺴﻤﺢ ﻟﻠﻤﺴﺘﺨﺪﻣﯿﻦ ﺑﺎﻟﺘﻔﺎﻋﻞ ﻣﻊ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
• Server ‫اﻟﺨﺎدم‬
– Computer that shares resources with other computers
‫وھﻮ اﻟﻜﻤﺒﯿﻮﺗﺮ اﻟﺬي ﯾﺸﺎرك اﻟﻤﻮارد ﻣﻊ أﺟﮭﺰة اﻟﻜﻤﺒﯿﻮﺗﺮ اﻷﺧﺮى‬
• Server process ‫ﻋﻤﻠﯿﺔ اﻟﺨﺎدم‬
– Program that listens for requests for resources from clients ‫اﻟﺒﺮﻧﺎﻣﺞ اﻟﺬي ﯾﺴﺘﻤﻊ‬
‫ﻟﻄﻠﺒﺎت اﻟﻤﻮارد ﻣﻦ اﻟﻌﻤﻼء‬
– Responds to requests ‫ﯾﺴﺘﺠﯿﺐ ﻟﻠﻄﻠﺒﺎت‬
• Client ‫زﺑﻮن‬
– Program that requests and uses server resources
‫اﻟﺒﺮﻧﺎﻣﺞ اﻟﺬي ﯾﻄﻠﺐ وﯾﺴﺘﺨﺪم ﻣﻮارد اﻟﺨﺎدم‬

Personal Database Management Systems


‫ﻧﻈﻢ إدارة ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﺸﺨﺼﯿﺔ‬
• DBMS and database applications run on same workstation
‫ﺗﻌﻤﻞ ﺗﻄﺒﯿﻘﺎت ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت وﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت ﻋﻠﻰ ﻧﻔﺲ ﻣﺤﻄﺔ اﻟﻌﻤﻞ‬
• Appear to user as a single integrated application
‫ﺗﻈﮭﺮ ﻟﻠﻤﺴﺘﺨﺪم ﻛﺘﻄﺒﯿﻖ ﻣﺘﻜﺎﻣﻞ واﺣﺪ‬
• Used primarily for creating single-user database applications ‫ﯾﺴﺘﺨﺪم ﺑﺸﻜﻞ أﺳﺎﺳﻲ ﻹﻧﺸﺎء‬
‫ﺗﻄﺒﯿﻘﺎت ﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت اﻟﻤﺴﺘﺨﺪم اﻟﻔﺮدي‬
• Can also be used for some multiuser applications
‫ﯾﻤﻜﻦ أن ﺗﺴﺘﺨﺪم أﯾﻀﺎ ﻟﺒﻌﺾ اﻟﺘﻄﺒﯿﻘﺎت ﻣﺘﻌﺪدة اﻟﻤﺴﺘﺨﺪﻣﯿﻦ‬
• Should be used only for applications that are not mission critical
‫ﯾﺠﺐ أن ﺗﺴﺘﺨﺪم ﻓﻘﻂ ﻟﻠﺘﻄﺒﯿﻘﺎت اﻟﺘﻲ ﻟﯿﺴﺖ ﻣﮭﻤﺔ ﺣﺮﺟﺔ‬
• Microsoft Access ‫ﻣﺪﺧﻞ اﻟﺒﺮﻣﺠﯿﺎت اﻟﻤﺮﻧﺔ‬
– Stores all data for database in a single file with an .mdb extension
. ‫ﯾﺨﺰن ﺟﻤﯿﻊ اﻟﺒﯿﺎﻧﺎت ﻟﻘﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت ﻓﻲ ﻣﻠﻒ واﺣﺪ ﺑﻤﻠﺤﻖ‬mdb
– Database administrator stores .mdb file on a central file server
. ‫ﻣﺴﺆول ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت ﺑﺘﺨﺰﯾﻦ ﻣﻠﻒ‬mdb ‫ﻋﻠﻰ ﺧﺎدم ﻣﻠﻔﺎت ﻣﺮﻛﺰي‬
• Transaction processing ‫ﻣﻌﺎﻟﺠﺔ اﻟﻤﻌﺎﻣﻼت‬
– Grouping related database changes into units of work that must either all
succeed or all fail
‫ﺗﺠﻤﯿﻊ ﺗﻐﯿﯿﺮات ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت ذات اﻟﺼﻠﺔ ﻓﻲ وﺣﺪات اﻟﻌﻤﻞ اﻟﺘﻲ ﯾﺠﺐ أن ﺗﻨﺠﺢ ﺟﻤﯿﻌﮭﺎ أو ﺗﻔﺸﻞ ﺟﻤﯿﻌﮭﺎ‬
– DBMS can use the transaction log to reverse—or roll back—the changes
‫ أو اﻟﺘﺮاﺟﻊ ﻋﻨﮭﺎ‬- ‫اﺳﺘﺨﺪام ﺳﺠﻞ اﻟﻤﻌﺎﻣﻼت ﻟﻌﻜﺲ اﻟﺘﻐﯿﯿﺮات‬DBMS ‫ﯾﻤﻜﻦ ﻟـ‬
Using a Personal Database for a Multiuser Application
‫اﺳﺘﺨﺪام ﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت ﺷﺨﺼﯿﺔ ﻟﺘﻄﺒﯿﻖ ﻣﺘﻌﺪد اﻟﻤﺴﺘﺨﺪﻣﯿﻦ‬

Client/Server Database Management Systems


‫ اﻟﺨﺎدم‬/ ‫أﻧﻈﻤﺔ إدارة ﻗﻮاﻋﺪ ﺑﯿﺎﻧﺎت اﻟﻌﻤﯿﻞ‬
• DBMS server process runs on one workstation
‫ﺗﻌﻤﻞ ﻋﻤﻠﯿﺔ ﺧﺎدم‬DBMS ‫ﻋﻠﻰ ﻣﺤﻄﺔ ﻋﻤﻞ واﺣﺪة‬
• Database applications run on separate client workstations across network
‫ﺗﻌﻤﻞ ﺗﻄﺒﯿﻘﺎت ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت ﻋﻠﻰ ﻣﺤﻄﺎت ﻋﻤﻞ اﻟﻌﻤﯿﻞ اﻟﻤﻨﻔﺼﻠﺔ ﻋﺒﺮ اﻟﺸﺒﻜﺔ‬
• Server sends only requested data back to client rather than entire database
‫ﯾﺮﺳﻞ اﻟﺨﺎدم اﻟﺒﯿﺎﻧﺎت اﻟﻤﻄﻠﻮﺑﺔ ﻣﺮة أﺧﺮى إﻟﻰ اﻟﻌﻤﯿﻞ ﺑﺪﻻً ﻣﻦ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت ﺑﺄﻛﻤﻠﮭﺎ‬
• Generate less network traffic than personal databases
‫ﺗﻮﻟﯿﺪ ﺣﺮﻛﺔ ﻣﺮور ﺷﺒﻜﺔ أﻗﻞ ﻣﻦ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﺸﺨﺼﯿﺔ‬
• Extra features to minimize chance of failure
‫ﻣﯿﺰات إﺿﺎﻓﯿﺔ ﻟﺘﻘﻠﯿﻞ ﻓﺮﺻﺔ اﻟﻔﺸﻞ‬
• Powerful recovery mechanisms that often operate automatically
‫آﻟﯿﺎت اﻻﺳﺘﺮداد ﻗﻮﯾﺔ اﻟﺘﻲ ﺗﻌﻤﻞ ﻓﻲ ﻛﺜﯿﺮ ﻣﻦ اﻷﺣﯿﺎن ﺗﻠﻘﺎﺋﯿﺎ‬
• Maintain file-based transaction log on database server
‫اﻻﺣﺘﻔﺎظ ﺑﺴﺠﻞ اﻟﻤﻌﺎﻣﻠﺔ اﻟﻤﺴﺘﻨﺪ إﻟﻰ اﻟﻤﻠﻔﺎت ﻋﻠﻰ ﺧﺎدم ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت‬
• Preferred for ‫ﻣﻔﻀﻞ ل‬
– Database applications that retrieve and manipulate small amounts of data from
databases containing large numbers of records
‫ﺗﻄﺒﯿﻘﺎت ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﺘﻲ ﺗﻘﻮم ﺑﺎﺳﺘﺮداد وﻣﻌﺎﻟﺠﺔ ﻛﻤﯿﺎت ﺻﻐﯿﺮة ﻣﻦ اﻟﺒﯿﺎﻧﺎت ﻣﻦ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﺘﻲ ﺗﺤﺘﻮي ﻋﻠﻰ أﻋﺪاد‬
‫ﻛﺒﯿﺮة ﻣﻦ اﻟﺴﺠﻼت‬
– Mission-critical applications ‫ﺗﻄﺒﯿﻘﺎت ﻣﮭﻤﺔ ﺣﺮﺟﺔ‬
– Web-based database applications that require increased security and fault
tolerance
‫ﺗﻄﺒﯿﻘﺎت ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت اﻟﻤﺴﺘﻨﺪة إﻟﻰ اﻟﻮﯾﺐ واﻟﺘﻲ ﺗﺘﻄﻠﺐ زﯾﺎدة اﻷﻣﺎن واﻟﺘﺴﺎﻣﺢ ﻣﻊ اﻟﺨﻄﺄ‬

Client/Server Database Architecture


‫ اﻟﺨﺎدم‬/ ‫اﻟﺒﻨﯿﺔ اﻟﮭﯿﻜﻠﯿﺔ او اﻟﻌﻤﺎرة ﻟﻘﺎﻋﺪة ﺑﯿﺎﻧﺎت اﻟﻌﻤﯿﻞ‬
The Oracle 10g Client/Server Database
‫ ﺧﺎدم‬/ ‫ﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت ﻋﻤﯿﻞ‬Oracle 10g
• Oracle 10g
– Latest release of Oracle Corporation’s relational database
‫أﺣﺪث إﺻﺪار ﻣﻦ ﻗﺎﻋﺪة اﻟﺒﯿﺎﻧﺎت اﻟﺘﺮاﺑﻄﯿﺔ ﻟﺸﺮﻛﺔ‬Oracle Corporation
– Client/server database ‫ اﻟﺨﺎدم‬/ ‫ﻗﺎﻋﺪة ﺑﯿﺎﻧﺎت اﻟﻌﻤﯿﻞ‬
• Server side ‫ﺟﺎﻧﺐ اﻟﺨﺎدم‬
– DBMS server process
‫ﯾﻀﻢ ﻋﻤﻠﯿﺔ ﺧﺎدم‬DBMS‫ادارة ﻧﻈﻢ ﻗﻮاﻋﺪ اﻟﺒﯿﺎﻧﺎت‬
• Oracle Net ‫أوراﻛﻞ ﻧﺖ‬
– Utility that enables network communication between client and server
‫اﻷداة اﻟﻤﺴﺎﻋﺪة اﻟﺘﻲ ﺗﺘﯿﺢ اﺗﺼﺎل اﻟﺸﺒﻜﺔ ﺑﯿﻦ اﻟﻌﻤﯿﻞ واﻟﺨﺎدم‬
• Oracle Application Server ‫ﺧﺎدم ﺗﻄﺒﯿﻘﺎت أوراﻛﻞ‬
– Used to create World Wide Web pages that allow users to access Oracle
databases
‫ﯾﺴﺘﺨﺪم ﻹﻧﺸﺎء ﺻﻔﺤﺎت اﻟﻮﯾﺐ اﻟﻌﺎﻟﻤﯿﺔ اﻟﺘﻲ ﺗﺘﯿﺢ ﻟﻠﻤﺴﺘﺨﺪﻣﯿﻦ اﻟﻮﺻﻮل إﻟﻰ ﻗﻮاﻋﺪ ﺑﯿﺎﻧﺎت أوراﻛﻞ‬
• Oracle client products: :‫ﻣﻨﺘﺠﺎت ﻋﻤﯿﻞ أوراﻛﻞ‬
– SQL*Plus
– Oracle 10g Developer Suite
– Enterprise Manager

Client/Server Architecture for Oracle 10g DBMS


Oracle 10g DBMS‫ ﺧﺎدم ل‬/ ‫اﻟﮭﻨﺪﺳﺔ اﻟﻤﻌﻤﺎرﯾﺔ اﻟﻌﻤﯿﻞ‬

The Database Cases


• Fictional organizations:
– Clearwater Traders
– Northwoods University
• Design principles:
– Convert all tables to third normal form
– Include primary key as foreign key in table on “many” side of relationship
– Specify data type for each column

The Clearwater Traders Sales Order Database


• Clothing and sporting goods through mail-order catalogs
• Wants to begin accepting orders using Web site
• Required data consists of information for:
– Customers
– Orders
– Items
– Shipments
• Tables:
– CUSTOMER
– ORDER_SOURCE
– ORDERS
– CATEGORY
– ITEM
• Tables (continued):
– ORDER_LINE
– SHIPMENT
– INVENTORY
– SHIPMENT_LINE
– COLOR

The Northwoods University


Student Registration Database
• Student registration system
• Data items consist of information about:
– Students
– Courses
– Instructors
– Student Enrollment
• Tables:
– LOCATION
– FACULTY
– STUDENT
– TERM
– COURSE
– COURSE_SECTION
– ENROLLMENT

Summary
• Relational databases
– Store data in tabular format
– Create relationships that
link related data using key columns
• Primary key
– Column that uniquely identifies specific record
• Foreign key
– Creates relationship between two tables
• Entity-relationship (ER) model
– Used to describe types of relationships between entities
• Normalization process
– Used to determine which fields belong in which tables
• Database system consists of
– DBMS
– Database applications
• Client/server databases divide database into
– Server process that runs on network server
– User application processes that run on individual client workstations
• Oracle 10g is a client/server database

You might also like