Uploaded by Abigael Rodriguez

AIS report script chapter 9

advertisement
1st slide Thank you, so let’s move to our next topic, which is the relational database model.
2nd slide Portrays data in the form of two dimensional ‘tables’ such as database table, called customer.
Its strength is the ease with which tables may be linked to one another
(a major weakness of hierarchical and network
databases)
Relational model supports the relational algebra functions of restrict, project and join.
3rd slide Restrict- extracts specified rows from a specified table, in this operation, it creates a virtual
table (na hindi nageexist physically, that is just subset of the original table.
Project- unlike restrict, it extracts specified attributes or columns from a table to create a virtual table.
Join- builds a new physical table galing sa dalawang table that consist all concatenated pairs of rows,
from each table. These building blocks are then used later in the chapter to design a small database
from scratch.
4th slide Next, let’s discuss some relational database concepts.
First is entity, this is anything about which organization wishes to capture data. Pwede maging physical,
tulad ng inventories, customers or employees. Pwede rin maging conceptual, such as sales,
accounts receivable or accounts payable. Kailangan maidentify ng system designers first ang
entity to prepare a model of them na kagaya neto. 5th slide 6th slide The blueprint for creating
the physical database is called the data model. The entity relationship diagram or ER, na pinakita
ko kanina is the graphical representation used to depict the model. Next is occurrence, that is
used to describe the number of instances or records that pertain to a specific entity. Halimbawa
nito, kapag ang isang organization ay may 100 employees, therefore, the employee entity ay
masasabing mayroong 100 occurrences. On the other hand, attributes are the data elements
that define an entity. For example, an employee entity may be defined by the partial set of
attributes, such as name, address, job skill, years of service and hourly rate of pay.
7th slide Association and cardinality read.
8th slide This is an example of an entity association, again ang kaninang definition natin ng association is
a line connecting two entities in a data model. So dito sa figure, ang entity associations ay yung
line sa gitna, yung mga is assigned, is provided, places and supplies, dahil yun ang mga linya na
nagkokonekta sa dalawang entities. So the employee is assigned a company car, manager is
provided a laptop and so on. How about cardinality? As of our definition a while ago, cardinality
is a degree of association between two entities. It can be 0 or 1, 1 and only 1, 0 or many, and 1
or many. These are combined to represent logical association. Sa example 1, mayroong 1 or 1
cardinality sa dulo ng employee at 0 or 1 cardinality naman sa kabila therefore results to 1 is to 1
association. Same as example 2, ito ay 1 is to 1. Ang example 3 and 4 naman ay 1is to many dahil
sa sign na parang greater than na nakikita nyo sa screen. Lastly, example 5 ay many is to many
association bakit? Kasi may 1 or many cardinality ang both side.
9th slide So How to properly designed relational tables? Each row in the table must be unique in at least
one attribute, so ano nga uli ang attribute? These are the data elements that define an entity. So
this one attribute is the primary key. tables are linked by embedding the primary key into the
related table as a foreign key.
1. All attribute values in any column must be of the same class of data or type
2.
Each column in a given table must be uniquely named. However, different tables may contain
columns with the same name.
3.
Tables must conform to the rules of normalization. Ibigsabihin, they must be free from
structural dependencies or anomalies.
10th slide We have 3 types of anomalies, pero ano nga ba ang ibigsabihin ng anomalies? It is the negative
operational symptoms of our database. Usually it is caused by improperly normalize tables in a database
management system.
Read ppt.
Deletion. Kapag nagkaroon ng negative operational deletion then madedelete yung ibang attributes.
11th slide Let’s talk about the normalization process. In the previous slides, we had discussed some
database anomalies. Those anomalies can be corrected by creating additional relational tables.
To address these problems or the negative operational symptoms of the database, we have this so
called normalization process wherein it involves identifying and removing some structural dependencies
from the table under review. Read ppt. Kasi ang problema natin kanina sa insert, delete and update
anomalies, dahil related ang mga iyon, most likely we have a problem on inserting, updating, deleting so
sineseaparate or iiisplit thorugh normalization process yung mga table into smaller so that it could avoid
some anomalies.
When unnormalized tables are split and reduced to third normal form, they must then be linked
together by foreign keys. Evenj though they are broken down into smaller tables, still they are being
linked to each other. Kasi yun naman ang purpose ng realational database, to link various tables on a
particular step.
12th slide. Here are the steps of the normalization process, so sa user view, you will have unnormalized
table, so ang gagawin dun sa table in first normal form ay ireremove ang partial dependencies then
magkakaroon ng second normal form then remove transitive dependencies and you will have the tabe in
third normal form. So ditto, nanormalized yung mga tables natin.
13th slide read. Since we have a problem on updating, so same as insertion anomalies which can result in
unrecorded transactions and incomplete audit trails. And for deletion anomalies, wherein kapag ang
isang attribute ng isang entity ay nadelete, ay madedelete din ang lahat ng mga information which can
cause the loss of accounting records and the destruction of audit trails.
Kailangang maintindihan ng mga Accountants ang data normalization process at kayang ma-determine
kung ang database ay talagang properly normalized.
So for the next topic, designing relational databases, here is -----
Question: Advantage of relational database
Download