# Entity Relationship Diagram

Powerful Essays
G. NARAYANAMMA INSTITUTE OF TECHNOLOGY & SCIENCE (For Women) DEPARTMENT OF IT

Principles of Programming Language

–Operator precedence rules? –Operator associativity rules? –Order of operand evaluation? –Operand evaluation side effects? –Operator overloading? –Type mixing in expressions?
Arithmetic Expressions: Operators A unary operator has one operand A binary operator has two operands A ternary operator has three operands Arithmetic Expressions: Operator Precedence Rules The operator precedence rules for expression evaluation define the order in which “adjacent” operators of different precedence levels are evaluated Typical precedence levels

– parentheses – unary operators – ** (if the language supports it) – *, / – +, -

Arithmetic Expressions: Operator Associativity Rule which adjacent operators with the same precedence level are evaluated

•The operator associativity rules for expression evaluation define the order in

•Typical associativity rules –Left to right, except **, which is right to left –Sometimes unary operators associate right to left (e.g., in FORTRAN) •APL is different; all operators have equal precedence and all operators associate right to left

G. NARAYANAMMA INSTITUTE OF TECHNOLOGY & SCIENCE (For Women) DEPARTMENT OF IT

Principles of Programming Language

•Precedence and associativity rules can be overriden with parentheses
Arithmetic Expressions: Conditional Expressions Conditional Expressions

–C-based languages (e.g., C, C++) –An example: –Evaluates as if written like if (count == 0) average = 0 else average = sum /count

average = (count == 0)? 0 : sum / count

Arithmetic Expressions: Operand Evaluation Order Operand evaluation order

•Variables: fetch the value from memory •Constants: sometimes a fetch from memory; sometimes the constant is in the machine language instruction

•Parenthesized expressions: evaluate all operands and operators first •The most interesting case is when an operand is a

## You May Also Find These Documents Helpful

• Powerful Essays

The Entity Relationship Diagram (ERD) depicts a conceptual data model that incorporates some of the important scientific information about the real world. It adopts a natural view that the real world consists of entities and relations (Chen, 1976). One objective of the ERD is to create a simple, easy to understand and conveniently presented data model consisting of entities, attributes, relationships and cardinalities. The model serves as tool for database design, where the model can facilitate communication…

• 1239 Words
• 6 Pages
Powerful Essays
• Good Essays

Entity-Relationship Diagrams (ERD) Data models are tools used in analysis to describe the data requirements and assumptions in the system from a top-down perspective. They also set the stage for the design of databases later on in the SDLC. There are three basic elements in ER models: Entities are the "things" about which we seek information. Attributes are the data we collect about the entities. Relationships provide the structure needed to draw information from multiple entities. Generally…

• 8631 Words
• 35 Pages
Good Essays
• Good Essays

#1. Entity Relationship Diagram #2. a. & b. One Room can be designated only one Room Type, whilst a particular Room Type can be assigned to several rooms (i.e. there may be many rooms that have double beds). Therefore, Room has a one-to-one relationship with RoomType and RoomType has a one-to-many relationship with Room. From the table, it can be seen that a particular room can only be designated as belonging to one type / category, thus confirming that Room RoomType has…

• 367 Words
• 2 Pages
Good Essays
• Good Essays

Entity Relationship Diagram The bellow diagram is what is refered to as an "Entity Relationship Diagram". Its purpose is to show the relationship between different data in the hotel management program , and the actions that are performed on it. And how data from different objects relate to each other. Legend The Data Entities represent data that will need to be stored on the system, in general terms. The Relationships represent actions that will occur to the Data Entities, or Weak Entities.…

• 1214 Words
• 5 Pages
Good Essays
• Powerful Essays

Tutorial Week 7 - Class and Entity-Relationship Diagrams 1 Class Diagrams and Entity Relationship Diagrams (ERD) Class diagrams and ERDs both model the structure of a system. Class diagrams represent the dynamic aspects of a system: both the structural and behavioural features. ERDs, depicting only structural features provide a static view of the system. 2 Class Diagrams 2.1 Elements of a class diagram: 2.1.1 class A class is a general concept (represented as a square box). A class defines…

• 1815 Words
• 8 Pages
Powerful Essays
• Satisfactory Essays

Introducing the Database  Data versus Information constitute building blocks of information produced by processing data reveals meaning of data  Data  Information  Information  Good,  Good timely, relevant information key to decision making decision making key to organizational survival Database Management  Database  End is shared, integrated computer structure housing: user data  Metadata  Database  Manages  Controls  Contains Management System (DBMS)…

• 494 Words
• 2 Pages
Satisfactory Essays
• Good Essays

Review Entity-Relationship Diagrams and the Relational Model CS 186, Fall 2007, Lecture 2 R & G, Chaps. 2&3 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody Allen (from Annie Hall, 1979) • Why use a DBMS? OS provides RAM and disk Review • Why use a DBMS? OS provides RAM and disk – Concurrency – Recovery – Abstraction, Data Independence – Query Languages – Efficiency (for most tasks)…

• 2515 Words
• 11 Pages
Good Essays
• Good Essays

Draw ENTITY RELATIONSHIP DIAGRAM (ERD) for the following requirement: 1. Students take courses in a college 2. Customers have accounts in a bank 3. People own vehicles 4. Employees manage projects 5. Machines are made up of parts 6. A college offers several courses. Attributes of the course include course code, name and credits. Each course may have zero or more subjects 7. Hotel (HotelNo, Name, Add, TelNo) Room (RoomNo, HotelNo, Type, Price) Booking (HotelNo…

• 319 Words
• 2 Pages
Good Essays
• Powerful Essays

Contents ERD (Entity Relation Diagram) 2 2.1 History of ERD 2 2.2 Building Blocks 2 2.2.2 Relationship 2 2.3. Diagramming Conventions 3 MS ACESS TABLE 5 3.1 Parts of Table 6 3.2 Creating Tables in Access 6 Chapter No 2 ERD (Entity Relation Diagram) 2.1 History of ERD An entity-relationship model (ERM) is an abstract and conceptual representation of data. Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data…

• 3540 Words
• 15 Pages
Powerful Essays
• Satisfactory Essays

Chapter 7 5) Consider the E-R diagram in Figure 7-20. Based on this E-R diagram, answer the following questions: a. How many EMPLOYEES can work on a project? There is no set limit of employees to work on one given project. b. What is the degree of the Used on relationship? There are 2 degrees for the Used on relationship. c. Do any associative entities appear in this diagram? If so, name them. Yes there is task which is an associative entity. d. How else could the attribute Skill…

• 334 Words
• 2 Pages
Satisfactory Essays