Presentation is loading. Please wait.

Presentation is loading. Please wait.

بسم الله الرحمن الرحيم Chapter 5

Similar presentations


Presentation on theme: "بسم الله الرحمن الرحيم Chapter 5"— Presentation transcript:

1 بسم الله الرحمن الرحيم Chapter 5
بسم الله الرحمن الرحيم Chapter 5 الفصل الخامس Data Modeling and Database Design تشكيل (صياغة) البيانات وتصميم قاعدة بيانات ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

2 From Chapter: (4) الحقل Field محمد مها 12/01/03 1107 عماد 225 25/12/02
المفتاح الرئيسي Primary Key Non-Key محمد مها 12/01/03 1107 عماد 225 25/12/02 سهير 112 1101 380 590 رجب خالد 200 25/06/04 1106 1105 1104 1103 1102 511 98 21/5/03 2/12/04 16/6/04 اسم العميل تاريخ التعامل رقم العميل رصيد العميل السجل Record Tuple ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

3 From Chapter: (4) Database Systems: Schemas نظم قواعد البيانات: الرسوم التخطيطية
A schema describes the logical structure of a database. الرسوم التخطيطية تصف الهيكل المنطقي لقاعدة البيانات. There are three levels of schemas: هناك ثلاثة مستويات لهذه الرسوم التخطيطية Conceptual-level schema: is an organization-wide view of the entire database. It list all data elements and the relationships between them. الرسم التخطيطي للمستوى المفاهيمي: وهو عبارة عن وجهة نظر المنشأة الواسعة عن قاعدة البيانات. وهي قائمة بكل عناصر البيانات والعلاقات بينها. External-level schema: consists of a set of individual user views of portions of the database, also referred to as a subschema. الرسم التخطيطي للمستوى الخارجي: ويتألف من مجموعة من وجهات نظر المستخدمين لأجزاء من قاعدة البيانات، وكل منها ينسب إلى رسم تخطيطي فرعي. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

4 From Chapter: (4) Database Systems: Schemas نظم قواعد البيانات: الرسوم التخطيطية
Internal-level schema: provides a low-level view of the database. It descries how the data are actually stored and accessed, including information about pointers, indexes, record lengths, and so forth. الرسم التخطيطي للمستوى الداخلي: وهو عبارة عن رسم تخطيطي يعطي وجهة نظر قليلة عن قاعدة البيانات. أي يصف كيف يتم تخزين البيانات فعلياً، وكيف يتم الوصول إليها، ويشمل على معلومات عن المؤشرات والفهارس وطول السجلات. Accountants are frequently involved in developing the conceptual- and external-level schemas. عادة ما يكون المحاسبين معنيين بتطوير الرسوم التخطيطية للمستوى المفاهيمي وللمستوى الخارجي. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

5 From Chapter: (4) Database Systems: Schemas نظم قواعد البيانات: الرسوم التخطيطية
Subschema A Subschema B Subschema C Jackson Houston r r External Level xxxxxxx Mapping external level views to conceptual level schema Mapping conceptual level facts to internal level descriptions Inventory Sales Customer Cash receipt Conceptual Level Inventory Record: Item number: integer (5), non-null, index = itemx Description: character (15) Cost: currency Internal Level ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

6 Designing and Implementing a Database System تصميم وتطبيق (تنفيذ) نظام قاعدة بيانات
Six basic steps in designing and implementing a database system: الخطوات الستة الرئيسة لتصميم وتطبيق نظام قاعدة بيانات: Planning Stage: Initial planning to determine the need for and feasibility of developing a new system. مرحلة التخطيط: التخطيط المبدئي لتحديد الحاجة والفائد من تطوير نظام جديد. Requirements Analysis Stage: Identifying user needs. مرحلة تحليل الاحتياجات: تحديد حاجات المستخدمين. Design Stage: Developing the contextual-, external-and internal- level schemas. مرحلة التصميم: تطوير المخططات المتعلقة بالمستويات الداخلية والخارجية والمفاهيمية. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

7 Designing and Implementing a Database System تصميم وتطبيق (تنفيذ) نظام قاعدة بيانات
Six basic steps in designing and implementing a database system: (cont.) الخطوات الستة الرئيسة لتصميم وتطبيق نظام قاعدة بيانات: (يتبع) Coding Stage: Translating the internal-level schema into the actual database structures that will be implemented in the new system. مرحلة الترميز: ترجمت مخطط المستوى الداخلي إلى هيكل قاعدة بيانات فعلي سوف يتم تنفيذها في النظام الجديد. Implementation Stage: Transferring all data from the existing system to the new database. المرحلة التنفيذية: نقل البيانات من النظام القائم إلى قاعدة البيانات الجديدة. Operation and Maintenance Stage: Using and maintaining the new system. مرحلة التشغيل والصيانة: استخدام وصيانة النظام الجديد. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

8 Data modeling occurs here هنا يتم صياغة البيانات
The Six basic steps in designing and implementing a database system الخطوات الستة الرئيسة لتصميم وتطبيق نظام قاعدة بيانات Planning التخطيط Data modeling occurs here هنا يتم صياغة البيانات Requirements analysis تحليل الاحتياجات Design التصميم Coding الترميز Implementation التنفيذ Operation and maintenance التشغيل والصيانة ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

9 Designing and Implementing a Database System تصميم وتطبيق (تنفيذ) نظام قاعدة بيانات
Accountants can and should participate in all stages of the database design process, although the level of their participation in each stage is likely to vary: المحاسبين يمكن، بل من المفترض، أن يشاركوا في جميع مراحل تصميم قاعدة البيانات، على الرغم من أن مستوى مشاركتهم من الممكن أن تختلف من مرحة إلى أخرى: In planing stage: they provide some of the information used to evaluate the feasibility of the proposed project and participate in making that decision. في مرحلة التخطيط: يزودون ببعض المعلومات اللازمة لتقييم الجدوى الاقتصادية للمشروع المقترح والمشاركة في اتخاذ القرارات. In requirements analysis & design stages: they identify user information needs, develop the logical schemas, design the data directory, and specify controls. في مرحلتي تحليل الاحتياجات والتصميم: يحددوا حاجات المستخدمين من المعلومات، ويطوروا المخططات المنطقية، ويصمموا قاموس البيانات، ويحددوا النظام الرقابي. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

10 Designing and Implementing a Database System تصميم وتطبيق (تنفيذ) نظام قاعدة بيانات
In coding stage: accountants with good AIS skills may participate in it. في مرحلة الترميز: المحاسبون ذوي المهارات العالية في AIS من الممكن أن يشاركوا في تلك المرحلة. In implementation stage: they can help test the accuracy of the new database and application programs that will use that data. في مرحلة التنفيذ: يمكن أن يساعدوا في في اختبار وتجريب دقة قاعدة البيانات الجديدة والبرامج التطبيقية التي سوف يستخدمونها. In operation & maintenance stage: they use the database system to process transactions, and sometimes they even help manage it. في مرحلة التشغيل والصيانة: يستخدموا نظام قاعدة البيانات لمعالجة المعاملات وأحياناً يساعدوا في إدارتها. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

11 Designing and Implementing a Database System تصميم وتطبيق (تنفيذ) نظام قاعدة بيانات
Accountants may provide the greatest value to their organizations by taking responsibility for data modeling. إن الإضافة العالية لقيمة المنشآت والتي من الممكن أن يزودها المحاسبين تكون في صياغة البيانات. Data Modeling is the process of defining a database so that it faithfully represents all aspects of the organization, including its interactions with the external environment. And it occurs during both the requirements analysis and design stages of database design. إن صياغة البيانات هي عبارة عن عملية تعريف لقاعدة البيانات بحيث تحدد كل عمليات المنشأة، بما فيها عمليات التفاعل البيئة الخارجية. وتحدث خلال مرحلتي تحليل المتطلبات وتصميم قاعدة بيانات. Two important tools that can be used to facilitate participation in data modeling are: هناك أداتان مهمتان يمكن استخدامهما للمشاركة في صياغة البيانات هما: An Entity-Relationship (E-R) diagrams. الرسومات البيانية للعلاقات الكينونات (الكائنات The REA (Resources, Events, Agents) data model. نموذج بيانات (الموارد، الأحداث، الوكلاء ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

12 An Entity-Relationship (E-R) diagrams
An Entity-Relationship (E-R) diagrams is a graphical technique for portraying a database schema, it shows the various entities being modeled and the important relationships among them. إن الرسومات البيانية لعلاقات الكينونات هو أداة لتمثيل مخطط لقاعدة البيانات، يوضح بأنه هناك عدة كينونات قد صيغت وأن هناك علاقات مهمة بينهما. An entity is any thing about which the organization wants to collect and store information, and it appear in E-R diagram as rectangles. الكينونة (الكائن) هي أي شيء ترغب المنشأة بجمع وتخزين البيانات عنه، وتظهر في الرسم البياني E-R في مستطيلات. An E-R diagrams can be used not only design database, but also to document and understand existing databases and to reengineer business processes. إن رسم البياني الـ E-R يستخدم ليست فقط لرسم قاعدة البيانات، ولكنه أيضاً يستخدم لتوثيق وفهم قاعدة البيانات القائمة، وكذلك يستخدم لإعادة هندسة عمليات المنشأة. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

13 Sample E-R Diagrams عينة للرسومات البيانية للكائنات العلائقية
Managed By Employers Supervisors Part of Manages Departments Customer Orders Cash Receipts Lead To Sales Lead To Lead To Players Teams Part of League ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

14 The REA (Resources, Events, Agents) Data Model نموذج بيانات (الموارد، الأحداث، الوكلاء)
The REA (Resources, Events, Agents) data model is a conceptual modeling tool that focuses on the business semantics underlying an organization’s value chain activities. إن نموذج بيانات الـ REA هو أداة صياغة المفاهيم تركز على النشاطات الأساسية التي تؤثر على سلسلة القيم في المنشأة. The REA data model provides structure in two ways: إن نموذج بيانات الـ REA يزود بدليل لتصميم قاعدة البيانات عن طريق: By identifying what entities should be included in the AIS database تحديد ما هي الكينونات التي يجب تضمينها في قاعدة البيانات لنظام المعلومات المحاسبية By prescribing how to structure relationships among the entities in the AIS database وصف كيفية بناء العلاقات بين كينونات قاعدة البيانات لنظام المعلومات المحاسبية ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

15 Types of Entities أصناف الكينونات
The REA data model classifies entities into three distinct categories: إن نموذج بيانات الـ REA يميز الكينونات في ثلاثة أصناف: Resources acquired and used by an organization and have economic value to the organization (e.g., cash, inventory, equipment). المواد التي تطلبها وتستخدمها المنشأة، والتي لها قيمة اقتصادية للمنشأة (مثلاً: النقدية، البضائع، الأجهزة) Events engaged in by the organization, which are the various business activities about which management wants to collect information for planning or control purposes (e.g., sales events, taking customer orders) الأحداث/الأنشطة التي تمارسها المنشأة، وهي الأنشطة التجارية المختلفة التي ترغب الإدارة بجمع معلومات عنها لأغراض التخطيط أو الرقابة (مثلاً: أنشطة البيع، أخذ طلبات العميل). Agents (the people and organizations) participating in these events, and about whom information is desired (e.g., employees, customers). الوكلاء(الأفراد، المنشآت) الذين يشاركون في صنع تلك الأحداث/الأنشطة والذين من أجلهم صممت تلك المعلومات (الموظفون، العملاء) ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

16 Developing an REA Diagram إعداد الرسم البياني
Developing an REA diagram for a specific transaction cycle consists of four steps: إن إعداد الرسم البياني الـ ERA لدورة حدث تجاري معين يتكون من أربعة خطوات: Identify the pair of events that represent the basic give-to-get economic duality relationship in that cycle. تحديد طرفي تبادل الحدث التجاري الذي يشكل علاقة “أعطي - خذ” كعلاقة مزدوجة بين كينونات الأحداث في تلك الدورة. Identify the resources affected by each event and the agents who participate in those events. تحديد الموارد التي تتأثر بكل حدث تبادل تجاري، ومن هم الوكلاء المشاركون في هذه الأحداث. Analyze each economic exchange event to determine whether it should be decomposed into a combination of one or more commitment events and an economic exchange event. تحليل كل حدث تبادل تجاري لتحديد هل أن يعتبر هذا الحدث التزام تجاري واحد أو أكثر (أي أحداث تجارية تبادلية). Determine the cardinalities of each relationship. تحديد العلاقات التشاركية لكل علاقة. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

17 Sample REA diagram عينة للرسومات البيانية (الموارد، الأحداث، الوكلاء)
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

18 Relationships between Entities العلاقات بين الكينونات
Three basic types of relationships between entities are possible. They are: يوجد هناك ثلاثة أنواع من العلائق بين الكينونات وهي: A one-to-one relationship (1:1) علاقة واحد إلى واحد A one-to-many relationship (1:N) علاقة واحد إلى متعدد A many-to-many relationship (M:N) علاقة متعدد إلى متعدد Cash Receipts Sales (0,1) (1,1) Sales Cash Receipts (0,N) (1,1) Sales Cash Receipts (0,N) (1,N) ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

19 Implementing an REA Diagram in a Relational Database تنفيذ الرسم البياني في قاعدة بيانات ترابطية
An REA diagram can be used to design a well-structured relational database. إن الرسم البياني الـ REA يمكن أن يستخدم لتصميم قاعدة بيانات ترابطية مبنية بشك جيد. Build a set of tables to implement an REA model of an AIS in a relational database. يتم بناء مجموعة من الجداول في قاعدة بيانات ترابطية لتنفيذ نموذج الـ REA لنظام معلومات محاسبي. Implementing an REA diagram in a relational database is a three-step process: هناك ثلاثة إجراءات لتنفيذ الرسم البياني لـ REA في قاعدة بيانات ترابطية: Create a table for each distinct entity and for each many-to many relationship إنشاء جدول لكل كينونة معينة ولكل علاقة ”متعدد إلى متعدد“ Assign attributes to appropriate tables تحديد خصائص (صفات) كل جدول Use foreign keys to implement one-to-one and one-to-many relationships استخدام المفاتيح الأجنبية لتنفيذ علاقة ”واحد إلى واحد“ وعلاقة ”واحد إلى متعدد“ ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

20 Implementing an REA model تنفيذ نموذج الرسم البياني
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

21 Create Tables الإجراء الأول: إنشاء الجداول
From the previously discussed REA diagram, nine tables would be created: one for each of the seven entities and one for each of the many-to-many relationships. من الرسم البياني السابق، من المفترض إنشاء تسعة جداول: جدول لك واحدة من السبعة كينونات، وواحد لكل من العلاقات المتعددة. Inventory البضائع Purchases المشتريات Employees الموظفين Vendors الموردين Cashier أمين الصندوق Cash disbursements توزيع النقد Cash النقد Purchases-inventory شراء البضائع Purchases-cash disbursements تسديد المشتريات ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

22 Assign Attributes for Each Table تحديد خصائص (صفات) كل جدول
Assign Primary keys: Usually, the primary key of a table representing an entity is a single attribute. تحديد المفتاح الرئيس: عادة ما يحتوي كل جدول على مفتاح رئيس، وكذلك يحتوي صفات أخرى، ويكون المفتاح الرئيس ذا صفة فريدة. وعادة ما تكون المعرفات الرقمية هي المفاتيح الرئيس (مثلاً: رقم الفاتورة كمفتاح رئيس في جدول المبيعات، ورقم الزبون العميل كمفتاح رئيس في جدول العملاء). Assign Other Attributes: Additional attributes are included in each table to satisfy transaction processing requirements. تحديد الصفات الأخرى: هناك صفات إضافية توضع في كل جدول لإكمال متطلبات معالجة العمليات. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

23 Implement One-to-One and One-to-Many Relationships تنفيذ علاقات ”واحد إلى واحد“ و”واحد إلى متعدد“
One-to-One Relationships: In a relational database, one-to-one relationships between entities can be implemented by including the primary key of one entity as a foreign key in the table representing the other entity. علاقات ”واحد إلى واحد“: في قواعد البيانات الترابطية يمكن أن تنفذ علاقات ”واحد إلى واحد“ بين الجداول (الكينونات) عن طريق وضع المفتاح الرئيس في أحد الجداول (الكينونات) كمفتاح أجنبي في جدول آخر. One-to-Many Relationships: In a relational database, one-to-many relationships can be also implemented in relation to databases by means of foreign keys. (e.g., employee number and vendor number are foreign keys in the purchases event and in the cash disbursement event). علاقات ”واحد إلى متعدد“: في قواعد البيانات الترابطية يمكن أن تنفذ علاقات ”واحد إلى متعدد“ بين قواعد البيانات عن طريق المفتاح الأجنبي (مثلاً: رقم الموظف ورقم المشتري هما رقمين أجنبيان في عملية البيع). ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

24 Documentation of Business Practices توثيق التطبيقات التجارية العملية
REA diagrams are especially useful for documenting an advanced AIS built using databases. إن الرسم البياني الـ REA يكون مفيداً بشكل خاص في توثيق نظام معلومات محاسبي متقدم مبني باستخدام قاعدة بيانات. REA diagrams provide information about the organization’s business practices إن الرسم البياني الـ REA يزود بمعلومات عن التطبيقات التجارية العملية للمنشأة. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart

25 Extracting Information From the AIS استخراج المعلومات من نظام معلومات محاسبي
A complete REA diagram serves as a useful guide for querying an AIS database. إن الرسم البياني الـ REA الكامل يستخدم كمرجع قيم للاستعلام من من قاعدة بيانات لنظام معلومات محاسبية Queries can be used to generate journals and ledgers from a relational database built on the REA model. الاستعلامات يمكن أن تستخدم لإنشاء دفاتر اليوية والأستاذ من قاعدة بيانات ترابطية (علائقية) مبنية باستخدام نموذج الرسم البياني الـ REA. ©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart


Download ppt "بسم الله الرحمن الرحيم Chapter 5"

Similar presentations


Ads by Google