Q.1: What do you mean by ERD? Draw ERD for a payroll system and show entity attributes. Write the assumptions while writing/drawing an ERD. (10 marks)
Entity relationship diagram: * To create a database, you must understand the relationships among the data, the type of data that will be maintained in the database, how the data will be used, and how the organization will need to change to manage data from a company-wide perspective. * An ER diagram is an abstract way to describe and design a database. Describing a database usually starts with a relational database, which stores data in tables. * An ERD identifies the concepts or entities that exist in a system and the relationships between those entities. Thus an ERD is often used as a way to visualize a relational database: each entity represents a database table, and the relationship lines represent the keys in one table that point to specific records in related tables.
Payroll System Diagram: (drawn in my notebook) * Here, the diagram below illustrates the relationship between the entities EMPLOYEE, PAYROLL SYSTEM, ACCOUNTING DEPARTMENT, and PAYCHECK. * The EMPLOYEE fills up the time sheet into the PAYROLL SYSTEM, which sends back a tax form to fill out. * The PAYROLL SYSTEM then forwards the payroll report to the ACCOUNTING DEPARTMENT to process the salary payment, after which the EMPLOYEE receives the PAYCHECK along with the payslip
Building blocks of an ERD: 1) Entity: * An entity may be defined as a thing which is recognized as being capable of an independent existence and which can be uniquely identified. An entity is an abstraction from the complexities of a domain. * An entity is an object that exists and is distinguishable from other objects. For instance, John Harris (proper noun). * An entity may be concrete (a person or a book, for example) or abstract