
Relational Databases and SQL
-REA approach makes sure that the system captures all the business events
-you can extract and analyze data through SQL
-REA (Resources, Events, Agents)
-SQL : a database query language used to construct and manipulate relational databases
-William McCarthy published a paper that outlined the REA approach, “a new way of thinking about acct
information”
-he was attracted by the E-R models capability to capture the meaning (semantics) of business
events more efficiently and effectively
-he classified business info into 3 types: resources, events and agents
-instance: one specific thing of the type defined of an entity…so the entity could be Employee and the
instance would be Dan and Misty
-an entity is represented as a table and the instances are represented as rows in the tables
-attribute: an item of data that characterizes an entity or relationship, ex: Name, address, phone
number
-attribute can include several different subattributes…ex: attribute is address, subattributes
would be house number, street, state, zip
-composite attributes: attributes that consist of multiple subattributes, ex: address
-attributes do NOT need to be broken down into the smallest possible units
-necessary that one or more attributes be identified so that the user can access the correct
entity
-key attribute: attribute whose value is unique for every entity that is in a database, used as
primary key
-most designers use coding to get key attribute
-databases include multiple entities
-the ease that a user can extract data from a database depends on the logical design of the database
-most common way to gather info about relationships among entities is to interview employees, NOT
just managers
-recursive relationship: a relationship b/t two different instances of an entity, represented by a
diamond
-DBMS include a feature that enforces max constraints which ensure that data are never entered that
connect more than one employee to a single work entry
-participation constraint: specifies the degree of min participation of one entity in the relationship with
another entity, minimum can be zero or one
-cardinality with participation constraint is shown as (min, max), it provides more info but is used less
frequently
-objective of REA model is to integrate the data in way that allows mgt and other users to access the info
they need to perform effectively
-REA models continue to grow with an explosion of entities and relationships
-relational database driven systems are in large organizations
-legacy systems: systems that have existed in a company for a long period of time and developed using
an organizations previous computer hardware and software
-relational databases are perceived as a collection of tables
-relation: a collection of data representing multiple occurrences of a resource, event or agent
-rows are tuples (a set of data that describes a single instance of an entity represented by a relation)
-ordering of tuples is not important in relational databases
-each tuple must be distinct from all other tuples