Presentation is loading. Please wait.

Presentation is loading. Please wait.

System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.

Similar presentations


Presentation on theme: "System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design."— Presentation transcript:

1 System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design

2 Avicenna System Analysis and Design System Design2 learning Objectives  Explain data design terminology, including entitles, fields, records, files, tables, and key fields

3 Avicenna System Analysis and Design System Design3 Data Design Terminology Data model Data model A formal way of representing the data that are used and created by a business system A formal way of representing the data that are used and created by a business system Shows the people, places and things about which data is captured and the relationships among them. Shows the people, places and things about which data is captured and the relationships among them. Logical data model Logical data model shows the organization of data without indicating how it is stored, created, or manipulated. shows the organization of data without indicating how it is stored, created, or manipulated.

4 Avicenna System Analysis and Design System Design4 Data Design Terminology Entity: An entity is a person, place, thing, or event for which data is collected and maintained. Entity: An entity is a person, place, thing, or event for which data is collected and maintained. Entity Must be multiple occurrences to be an entity Must be multiple occurrences to be an entity eg.EMPLOYEE SALES ORDER SUPPLIER often identified from nouns used within the business application often identified from nouns used within the business application

5 Avicenna System Analysis and Design System Design5 Data Design Terminology Entity Type Entity Type An Entity Type is a logical grouping of data relevant to the application in question An Entity Type is a logical grouping of data relevant to the application in question An Entity instance is an Occurrence of an Entity Type An Entity instance is an Occurrence of an Entity Type An Entity Type would be represented in a RDBMS as a table. An Entity Type would be represented in a RDBMS as a table. An Entity instance would be represented as a single row in a table An Entity instance would be represented as a single row in a table

6 Avicenna System Analysis and Design System Design6 Data Design Terminology Table or file: A set of related records is grouped into a table, which stores data about a specific entity. Tables are shown as two-dimensional structures that consist of vertical columns representing fields and horizontal rows representing records. Table or file: A set of related records is grouped into a table, which stores data about a specific entity. Tables are shown as two-dimensional structures that consist of vertical columns representing fields and horizontal rows representing records. Tablefile Tablefile Field: A single characteristic or fact about an entity. A field, or attribute, is the smallest piece of data that has meaning within an information system. For example, a Social Security number or company name could be examples of a field. The terms, data element and field, are used interchangeably. Field: A single characteristic or fact about an entity. A field, or attribute, is the smallest piece of data that has meaning within an information system. For example, a Social Security number or company name could be examples of a field. The terms, data element and field, are used interchangeably. Field Attribute names are nouns Attribute names are nouns Sometimes entity name is added at the beginning of the attribute name for clarity Sometimes entity name is added at the beginning of the attribute name for clarity

7 Avicenna System Analysis and Design System Design7 Data Design Terminology Common field: A common field is an attribute that appears in more than one entity. Common fields can be used to link entities in various types of relationships. Common field: A common field is an attribute that appears in more than one entity. Common fields can be used to link entities in various types of relationships. Common field Common field Record: also called a tuple, is a set of related fields that describes one entity instance, or member of an entity, such as one customer, one order, or one product. A record might have one or dozens of fields, depending on what information is needed. Record: also called a tuple, is a set of related fields that describes one entity instance, or member of an entity, such as one customer, one order, or one product. A record might have one or dozens of fields, depending on what information is needed. Record

8 Avicenna System Analysis and Design System Design8 Data Design Terminology Key Fields Key Fields Key Fields Key Fields Key fields are used during the systems design phase to organize, access, and maintain data structures. The four types of key fields are primary keys, candidate keys, foreign keys, and secondary keys. Key fields are used during the systems design phase to organize, access, and maintain data structures. The four types of key fields are primary keys, candidate keys, foreign keys, and secondary keys.

9 Avicenna System Analysis and Design System Design9 Data Design Terminology Key Fields Key Fields Primary key: A primary key is a field or combination of fields that uniquely and minimally identifies a particular member of an entity. An identifier may be ‘artificial,’ such as creating an ID number. For example, in a student table the student number is a unique primary key because no two students can have the same student number. That key also is minimal because it contains no information beyond what is needed to identify the student. Sometimes it is necessary for a primary key to consist of a combination of fields. In that case, the primary key is called a combination key, composite key, concatenated key, or multi- valued key. For example, if a student registers for three courses, his or her student number will appear in three records so its no more valid as a primary key. So in the registration file, neither the student number nor the course ID is unique, to identify a specific student in a specific course, the primary key must be a combination of student number and course ID Primary key: A primary key is a field or combination of fields that uniquely and minimally identifies a particular member of an entity. An identifier may be ‘artificial,’ such as creating an ID number. For example, in a student table the student number is a unique primary key because no two students can have the same student number. That key also is minimal because it contains no information beyond what is needed to identify the student. Sometimes it is necessary for a primary key to consist of a combination of fields. In that case, the primary key is called a combination key, composite key, concatenated key, or multi- valued key. For example, if a student registers for three courses, his or her student number will appear in three records so its no more valid as a primary key. So in the registration file, neither the student number nor the course ID is unique, to identify a specific student in a specific course, the primary key must be a combination of student number and course ID Primary key Primary key No two fields within the primary key can have the same value No two fields within the primary key can have the same value

10 Avicenna System Analysis and Design System Design10 Data Design Terminology Supplier NameSupplier AddressSupplier Tel. No. Sup Con Ahmad115 zeriab St+962/7563025Ali Ali & sons12 King Hussien St 020-8…... Bella SonicLake Industrial Estate +962/7999663... Supplier Number 1463 3621 2327 6762…3 Lot’s Corner... Columns Attribute Names Primary Key RecordRecord Field

11 Avicenna System Analysis and Design System Design11 Key Fields Key Fields Candidate key: Sometimes it is possible to have a choice of fields or field combinations to use as the primary key. Any field that could serve as a primary key is called a candidate key. For example, if every employee has a unique employee number, then you could use either the employee number or the Social Security number as a primary key. Candidate key: Sometimes it is possible to have a choice of fields or field combinations to use as the primary key. Any field that could serve as a primary key is called a candidate key. For example, if every employee has a unique employee number, then you could use either the employee number or the Social Security number as a primary key. Candidate key Candidate key Nonkey field: Any field that is not a primary key or a candidate key is called a nonkey field. Nonkey field: Any field that is not a primary key or a candidate key is called a nonkey field. Nonkey field Nonkey field Data Design Terminology

12 Avicenna System Analysis and Design System Design12 Data Design Terminology Key Fields Key Fields Foreign key: A foreign key is a field in one table that must match a primary key value in another table in order to establish the relationship between the two tables. Unlike a primary key, a foreign key need not be unique Foreign key: A foreign key is a field in one table that must match a primary key value in another table in order to establish the relationship between the two tables. Unlike a primary key, a foreign key need not be unique Foreign key Foreign key A foreign key must either match a primary key or else be null A foreign key must either match a primary key or else be null Secondary key: is a field or combination of fields that can be used to access or retrieve records. Secondary key values are not unique. For example, if you need to access records for only those customers in a specific ZIP code, you would use the ZIP code field as a secondary key. Secondary keys also can be used to sort or display records in a certain order. Secondary key: is a field or combination of fields that can be used to access or retrieve records. Secondary key values are not unique. For example, if you need to access records for only those customers in a specific ZIP code, you would use the ZIP code field as a secondary key. Secondary keys also can be used to sort or display records in a certain order. Secondary key Secondary key

13 Avicenna System Analysis and Design System Design13 Data Design Terminology Entity Integrity Entity Integrity Entity integrity constraints are rules for primary keys: Entity integrity constraints are rules for primary keys: The primary key cannot have a null value The primary key cannot have a null value If the primary key is a composite key, none of the fields in the key can contain a null value If the primary key is a composite key, none of the fields in the key can contain a null value

14 Avicenna System Analysis and Design System Design14 Data Design Terminology Referential Integrity Referential Integrity Referential Integrity Referential Integrity Validity checks can help avoid data input errors Validity checks can help avoid data input errors One type of validity check, called referential integrity, is a set of rules that a voids data inconsistency and quality problems One type of validity check, called referential integrity, is a set of rules that a voids data inconsistency and quality problems In a relational database, referential integrity means that a foreign key value cannot be entered in one table unless it matches an existing primary key in another table In a relational database, referential integrity means that a foreign key value cannot be entered in one table unless it matches an existing primary key in another table You cannot change a primary key that has matching child table records You cannot change a primary key that has matching child table records A child table that has a foreign key for a different record A child table that has a foreign key for a different record Referential integrity also can prevent the deletion of a record has a primary key that matches foreign keys in anther table Referential integrity also can prevent the deletion of a record has a primary key that matches foreign keys in anther table

15 Avicenna System Analysis and Design System Design15 Data Design Terminology Combination primary key Primary keys Secondary keyForeign key Secondary key Candidate keys

16 Avicenna System Analysis and Design System Design16 Sequence Summary In an information system, an entity is a person, place, thing, or event for which data is collected and maintained In an information system, an entity is a person, place, thing, or event for which data is collected and maintained A field, or attribute, is a single characteristic of an entity A field, or attribute, is a single characteristic of an entity A record, or tuple, is a set of related fields that describes one instance of an entity A record, or tuple, is a set of related fields that describes one instance of an entity Records are grouped into files (in a file-oriented system) and tables (in a database environment) Records are grouped into files (in a file-oriented system) and tables (in a database environment) A primary key is a field or field combination that uniquely and minimally identifies a specific record; a candidate key is any field that could serve as a primary key A primary key is a field or field combination that uniquely and minimally identifies a specific record; a candidate key is any field that could serve as a primary key A foreign key is a field or field combination that must match primary key of anther file or table A foreign key is a field or field combination that must match primary key of anther file or table A secondary key is a field or field combination used as the basis for sorting or retrieving records A secondary key is a field or field combination used as the basis for sorting or retrieving records Entity integrity constraints are rules for primary keys Entity integrity constraints are rules for primary keys referential integrity, is a set of rules that a voids data inconsistency and quality problems referential integrity, is a set of rules that a voids data inconsistency and quality problems

17 Avicenna System Analysis and Design System Design17 Sequence Summary In this Sequence we have In this Sequence we have  Explain data design terminology, including entitles, fields, records, files, tables, and key fields  Focused on entity integrity and referential integrity

18 Avicenna System Analysis and Design System Design18 Reference [1] System Analysis and Design, Sixth Edition Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt Publisher: SHELLY CASHMAN SEWIES. Publisher: SHELLY CASHMAN SEWIES.


Download ppt "System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design."

Similar presentations


Ads by Google