Wk 1&2

  • Uploaded by: khansaf
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Wk 1&2 as PDF for free.

More details

  • Words: 1,513
  • Pages: 35
Definitions 







Database: An Organized collection of logically related data, usually designed to meet the information needs of multiple users in an organization Data: stored representations of meaningful objects and events – Structured: numbers, text, dates – Unstructured: images, video, documents Information: data processed to increase knowledge in the person using the data Metadata: data that describes the properties and context of user data PRESENTED BY S.HAYAT

1

Figure 1-1a Data in context

Context helps users understand data PRESENTED BY S.HAYAT

2

Figure 1-1b Summarized data

Graphical displays turn data into useful information that managers can use for decision making and interpretation PRESENTED BY S.HAYAT

3

Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context PRESENTED BY S.HAYAT

4

Types of data Structured

data includes numbers, text, dates. Numeric data (numbers), this type of data consists numeric digits from 0-9. It may either be positive or negative. Alphabetic data (text), this type of data consists of alphabetic letters from A-Z,(a-z), blank space e.g “Ali shah’, “hayat” etc. Alphanumeric data (dates), it consists digits (0-9), letters (a-z, A-Z) and all special characters (*,+,@,&,#….) PRESENTED BY S.HAYAT

5

Types of data Unstructured data Includes images, audio, videos Images data consists charts, pictures, paintings. 

Audio data , that type of data includes music(audio), speech or any type of sound. Video data, collection of full motion images played at high speed. And used to display actions and movements.

PRESENTED BY S.HAYAT

6

Data Vs Information 

 





 

Data embraces unprocessed raw facts Data is meaningless Data is the input of computer Data is extensive in its volume Data is used rarely Data is independent Data is not functional in decision making



 









Information is processed form of data Information is meaningful Information is the output of computer Information is short in volume Information is frequently used Information is dependent on data Information is functional in decision making

PRESENTED BY S.HAYAT

7

Entity & Its types Entity “An entity is a person, place, object, event or concept in the user envirment about which the organization wishes to maintain data” Example-1; a library system may contain data about different entities like BOOK and MEMBER Example-2; a college system may include entities like STUDENT, TEACHER, CLASS etc.

PRESENTED BY S.HAYAT

8

Entity & Its types Some Examples of Entities Person

: employee, Student, Player, Doctor, Patient Place : Country, City, Store Object : Vehicle, Toy, Furniture, Building Event : Sale, Admission, Registration Concept : Programming, Account, Course The following symbol used for an entity in ERD.

PRESENTED BY S.HAYAT

9

Entity & Its types Each

entity in ERD is given a name, since name represent a collection of items (called attributes) The entity name is always a singular We represent the name of entity is capital letters In ERD the entity name is placed inside a box (entity symbol) representing the entity type. i.e

STUDENT STUDENT entity may have the attributes S_Name, F_name, Address, Class, DOB etc PRESENTED BY S.HAYAT

10

Entity & Its types Entity Type: “A collection of entities that share common properties or charactistics” OR “A set of entities with same attributes is called entity type” We

use capital letters for the names of entity type(s) An entity type is described just once (using metadata) in a database. For example PRESENTED BY S.HAYAT

11

Entity & Its types Entity type: STUDENT

STUDENT_ID S_NAME F_NAME ADDRESS DEPARTMENT_NAME CLASS BIRTHDATE

INT(4) CHAR(30) CHAR(30) CHAR(40) CHAR(30) CHAR(25) DATE

PRESENTED BY S.HAYAT

12

Entity & Its types Entity Instance: “A single occurrence of an entity type” OR “A member of an entity type is known as an entity instance” Example: Two instances of STUDENT (Entity Type) See example on next page

PRESENTED BY S.HAYAT

13

Entity & Its types 

Instance 1st 01 Ali M Shah Peshawar IBMS Bs(IT) July 13,1990

Instance 2nd 02 Jan Zain Islamabad IBMS Bs(IT) Sep 03, 1991

PRESENTED BY S.HAYAT

14

Entity & Its types Many instances ( hundred or thousands) of that entity type (STUDENT) may be represented by data stored in the database.

PRESENTED BY S.HAYAT

15

Entity & Its types STRONG ENTITY VS WEAK ENTITY TYPES Strong Entity Type: “An entity type that exist independently of other entity types” 

Most of the basic entity types to identify in an organization are classified as strong entity types.



Instances of a strong entity type always have a unique charactistics (called identifier) that is an attribute or combination of attributes that uniquely distinguish each occurrence of that entity.

PRESENTED BY S.HAYAT

16

Entity & Its types 

To represent strong entity in ER Diagram, the following symbol is used



Weak Entity Type: “an entity type whose existence depends on some other entity type”

PRESENTED BY S.HAYAT

17

Entity & Its types 

A weak entity type has no business meaning in the ER Diagram without the entity on which it depends.



The below symbol is used for weak entity type.



Identifying Owner:” the entity type on which the weak entity type depends” PRESENTED BY S.HAYAT

18

Entity & Its types 

A weak entity type does not have its own identifier, Generally on an ERD a weak entity type has an attribute that serves as a partial identifier.



Identifying Relationship: “ the relationship b/w a weak entity type and its owner(identifying owner)” Example (next page)



PRESENTED BY S.HAYAT

19

Entity & Its types

EMPLOYEE E_ID E_Name

DEPENDENT Dependent_name (first_name, middle_name, last_name) DOB

Example of weak entity type and its identifying relationship PRESENTED BY S.HAYAT

20

Entity & Its types 

In above Fig EMPLOYEE is a strong entity type, with identifier Employee_ID.



DEPENDENT is a weak entity type as indicated by double line rectangle.



EMPLOYEE (Strong entity type) is the owner of DEPENDENT (weak entity type)



“Has” shows the identifying relationship(double lined diamond symbol). PRESENTED BY S.HAYAT

21

Entity & Its types 

The attribute ‘Dependent_Name’ serves as a partial identifier.



We use double underline to show a partial identifier.

Identifier: “An attribute or combination of attribute that uniquely distinguish individual instance of an entity type”

PRESENTED BY S.HAYAT

22

Entity & Its types 

The above Fig ,can be represented in more simple form as

Strong entity

Identifying relationship

Weak entity

PRESENTED BY S.HAYAT

23

Attributes & its types 

Attribute – “property or characteristic of an

entity type that is of interest to the organization”  Each entity type has a set of attributes associated with it.  In Entity Relationship Diagram(ERD) we represent an attribute with sign of ellipse. Attribute Symbol in ERD PRESENTED BY S.HAYAT

24

Attributes & its types 

Following are the some entity types and their associated attributes

STUDENT [ Student_ID, Student_Name, Home_Address, Phone_Number] V. EMPLOYEE [Employee_ID, Employee_Name, Designation, Department]. III.

PRESENTED BY S.HAYAT

25

Attributes & its types  In

naming attributes, we use an initial capital letter and other are in lower case.

 We

represent an attribute(in ERD) by placing its name in an ELLIPS(symbol) with a line connecting it to its associated entity. e.g (next page) PRESENTED BY S.HAYAT

26

Attributes & its types Student_ID

Student_Name

Home_Address

STUDENT

Phone_Number

PRESENTED BY S.HAYAT

27

Attributes & its types Types of Attributes: -Simple Attribute -Composite Attribute -Single valued Attribute -Multi-Valued Attribute -Derived Attribute -Stored Attribute 

PRESENTED BY S.HAYAT

28

Attributes & its types -Simple Attribute: “An attribute that can not be subdivided into smaller component is known as simple attribute”

Fig shows STUDENT entity and their attributes(simple attributes) PRESENTED BY S.HAYAT

29

Attributes & its types -

-Composite Attribute: “An attribute that can be divided into smaller components” Example-1

An attribute broken into component parts

PRESENTED BY S.HAYAT

30

Attributes & its types Example-2 CUSTOMER entity type with composite attribute(Customer_Address)

PRESENTED BY S.HAYAT

31

Attributes & its types Single-valued Vs Multi-valued Attribute: Single-valued attribute: “An attribute that may contain single value” e.g. Age of a person is a single-value attribute, also gender is the example of single-value attribute. Multi-valued attribute: “An attribute that may contain two or more values”  Multi-valued attribute is represented by doubleline oval. PRESENTED BY S.HAYAT

32

Attributes & its types

Employee entity type with multi-valued attribute(Skill)

Multivalued: an employee can have more than one skill

PRESENTED BY S.HAYAT

33

Attributes & its types Derived Attribute: “an attribute whose value can be calculated from other related attribute” The following fig show s the derived attribute

Multivalued:

Derived from date employed and current date PRESENTED BY S.HAYAT

an employee can have more than one skill 34

Attributes & its types Stored Attribute: “An attribute that is stored in a database is called stored attribute” Attribute Domain: “A set of possible values for an attribute is known as attribute domain” The domain may consist of range of a values or some discrete values. e.g. the domain for GPA can be from 0-4, similarly the domain for ‘Gender’ attribute can be either ‘Male’ or ‘Female’. PRESENTED BY S.HAYAT

35

Related Documents

Wk 2006
November 2019 10
Wk - Faq
November 2019 3
Wk-04
May 2020 7
Wk 3
June 2020 7
Wk 11
June 2020 3
Libel-wk
December 2019 16

More Documents from ""

Weak 3
May 2020 8
Wk-04
May 2020 7
Wk 1&2
May 2020 9
Wk-10-11
May 2020 5