0% found this document useful (0 votes)
30 views9 pages

Reviewer Infoshit

Uploaded by

kurtwilab026
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views9 pages

Reviewer Infoshit

Uploaded by

kurtwilab026
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

INFO MANAGEMENT

Week 1 - Orientation
Week 2 – Intro to DB Systems
Data – group of information that represent the
qualitative or quantitative attributes of a variable or set
of variables.
Information – refined or processed data that has been
transformed into meaningful and useful form of data.
Databases & Data Modeling
Database – a collection of information that is
organized so that it can be easily managed and Evolution of DB
updated.
1960 – File Processing Systems (batch
Database Management System (DBMS) – collection processing, punch cards, magnetic tape)
of interrelated data and a set of programs to access
File System Data Processing – updating, sorting
the data.
or validating a data file.
❖ facilitates the process of defining,
constructions, manipulating and sharing File – a chunk of data. File processing is anything
databases among various users. you do to that data.

DBMS consists of: 1970 – Hierarchical and network (limited data


dependence)
✔ Database
✔ DBMS 1980 – Relational Database developed by Dr. E.F.
Codd
✔ Application Program
1990 – Object-oriented database (large amount of
DBMS components:
structured and unstructured data)
✔ Data
200 and beyond – multi-tier, client-server,
✔ Hardware
web-based, data mining
✔ Software
✔ User Ranges of DB:
Database Environment – collective system of Personal Database – PC’s, PDAs, phones used in
components that comprise and regulates the group of specials situations where there is a need to share
data, management, and use of data, which consists of data among users.
software, hardware, people, techniques of handling
the database and the data also. Workgroup Database – Designed to support
collaboration in a small team (less than 25 ppl)
Database Environment components:
Department Database – larger than workgroup
✔ CASE (Computer Aided Software Engineering and more diverse range of functions. (25-100 ppl)
Tools)
✔ Repository Enterprise Database – Scope of the whole
✔ Database/DBMS organization.
✔ Application Programs Types of DB:
✔ User Interface
✔ Data Administrators Hierarchical Database – The most intuitive way to
✔ System Analysts/Programmers visualize this type of relationship is by visualizing an
✔ Users upside-down tree of data. In this tree, a single table
acts as the "root" of the database from which other
tables "branch" out.

Examples of DBMS
Logical Model – describes the data flow and database
content. It adds detail to the overall structure in the
conceptual model.
Components:
a. Entities – each entity represents a set of
things, persons, or concepts relevant to a
business.
b. Relationships – every relationship
represent an association between two
Network Database – This model solves the problem entities.
of data redundancy by representing relationships in c. Attributes – each attribute is a descriptive
terms of sets rather than hierarchy. piece of characteristic or any other
Relational Database – uses relations or information that is useful to describe an
two-dimensional tables to store information. entity.
✔ Presence of attributes for each entity.
Object Relational Database – a DBMS similar to ✔ Key Attributes/Non-Key Attributes
relational DB but with object-oriented database ✔ Primary Key – Foreign Key Relationships
model. ✔ User-friendly attribute names
✔ More detailed than Conceptual model.
Data Modeling – process of creating a simplified
✔ Database agnostic
diagram of a software system and the data elements
✔ A bit difficult to enhance.
it contains.
Physical Model – describes the specifics of how the
❖ Provides a blueprint for designing a new
logical model will be realized. It is specific to a
database.
designated database software system.
❖ Helps an organization use its data effectively
to meet business needs for information. ✔ Entity names are now table names.
❖ The data model lives on to become the ✔ Attributes are now column names.
documentation and justification for why the ✔ Database compatible names.
database exists and how it flows. ✔ Data type for each column is specified.
Why is Data Modeling done? ✔ Difficult for users to understand.

✔ It is a core data management discipline. Data Modeling Techniques


✔ It helps pinpoint information needs for different Entity-Relationship Data Modeling – it maps entities,
business processes. their attributes and the relationships.
✔ It specifies the characteristics of the data
elements that will be included in applications Dimensional Modeling – consists of fact tables that
in the database or file system. contain data about transactions or other events.

Why is Data Modeling important? Graph Modeling – often used to describe data sets
that contain complex relationships.
✔ Eliminates redundancy.
✔ Reduces storage requirements. Week 3 – Business Rules & Data Abstraction
✔ Enables efficient retrieval.
Business Rule – a set of approved guidelines or
Phases of Data Modeling frameworks within an organization. It is also a
statement that imposes some form of constraint on a
Conceptual Model – typical starting point for data specific aspect of the database.
modeling, identifying the various data sets and data
flow. These rules will influence a wide variety of database
issues:
✔ Highly abstract
✔ Easy to understand. ✔ Data you collect and store.
✔ Easy to enhance. ✔ The way you define and establish
✔ Only entities are visible. relationships.
✔ No software tool is required.
✔ Types of information that the database can ❖ Data are stored as tables.
provide.
Relational Model Concepts:
✔ Security and confidentiality of the data itself.
Tuple – a single row of a table which contains a single
Each organization has its own data and information
record.
requirements, and each has its own unique way of
conducting its business; therefore, every Relation Schema – represents the name of the
organization needs its own specific set of relation with its attributes.
business rules.
Degree – total number of attributes which relation is
Types of Business Rules: called the degree of the relation.
Database-oriented – impose constraints that you can Cardinality – total number of rows present in the table.
establish within the logical design of the database.
Implementing a given constraint by modifying Column – represents the set of values for a specific
various field specification elements, relationship attribute.
characteristics or a combination of the two. Relation Instance – a finite set of tuples in the
(Like irerequire mo sa fields yung address, name, or RDBMS. Never have duplicates tuples.
any other information. Sa database lang siya Relation Key – every row has one of multiple
macoconfigure) attributes which is called relation key.
Application-oriented – impose constraints that you Attribute Domain – every attribute has some
cannot establish within the logical design of the pre-defined value and scope which is known as
database. Needs to be established within the physical attribute.
design of the database where they will be more
meaningful. Relational Integrity Constraints – referred to
conditions which must be present for a valid relation.
(Eto naman yung automatically magaappear sa mga Derived from the rules in the mini world that the
forms like if limited lang yung access sa users due to database represents.
location issues, magkakaroon ng warning or notice sa
mismong system na magnonotify sa user) Types of Integrity Constraints:

Data Abstraction – refers to the process of hiding Domain Constraints – can be violated if an attribute
irrelevant details from the user. There are three levels value is not appearing in the corresponding domain.
of data abstraction to achieve data independence. The value of each attribute must be unique.

Data Independence – users and data should not Key Constraints – an attribute can uniquely identify a
directly interact with each other. The user should be at tuple in a relation is called the key to the table. The
a different level and the data should be present at value of the attribute for different tuples in the relation
some other level. has to be unique.

View Level – this level tells the application about how Referential Integrity Constraints – based on the
the data should be shown to the user. concept of foreign keys. This happens where relation
refers to a key attribute of a different or same relation.
Conceptual Level/Logical Level – this level tells how However, that key element must exist in the table.
the data is actually stored and structured.
Operations in Relational Model
Physical Level or Internal Schema – this tells us
where the data is stored. Insert – used to insert data into the relation.

Week 4 – Relational Database Model Delete – used to delete tuples from the table.

Relational Model – represents the database a Modify – allows you to change the values of some
collection of relations. attributes in existing tuples.

❖ The table name and column names are Select – allows you to choose a specific range of
helpful to interpret the meaning of values in data.
each row.
Best Practices for Creating a Relational Model:
❖ Data are represented as a set of relations.
✔ Data need to be represented as a collection of Deletion Anomaly – This anomaly happens when
relations. deletion of a data record results in losing some
✔ Each relation should be depicted clearly in the unrelated information that was stored as part of the
table. record that was deleted from a table.
✔ Rows should contain data about instances of
Update Anomaly – Manually updating from the
an entity.
database which can be time-consuming.
✔ Columns must contain data about attributes of
the entity. Database Relationships
✔ Cells of the table should hold a single value.
✔ Each column should be given a unique name. One-to-One Relationships (1:1) – each record in tbl A
✔ No two rows should be identical. relates to only one record in tbl B, vice versa.
✔ The values of an attribute should be from the One-to-Many Relationships (1:N) – tbl A can relate to
same domain. zero, one or many records in tbl B, vice versa.
Advantages:
Many-to-Many Relationship – Each project can
✔ Simplicity – simpler than hierarchical and involve more than one employee and each employee
network model. can be working on more than one project.
✔ Structural Independence – only concerned Codd’s Relational Database Rules
with data and not with a structure.
✔ Easy to use – quite natural and simple to Dr. Edgar F. Codd – 12 rules a database must obey in
understand. order to be regarded as a true relational database.
✔ Query capability – possible for a high-level
Rule 1: Information Rule – the organization of
query language like SQL to avoid complex
database navigation. headers in the database should be flexible and should
not have an impact.
✔ Data independence – can be changed without
having to change any application. Rule 2: Guaranteed Access Rule – Every single data
✔ Scalable – should be enlarged to enhance element is guaranteed to be accessible logically with
usability. a combination of table-name, primary-key and
attribute-name. Pointers are not allowed.
Disadvantages:
Rule 3: Systematic Treatment of NULL values – NULL
▪ Few relational databases have limits on filed
values in a database must be given a systematic
length.
treatment because it can interpret as a missing data,
▪ Relational databases can be complex as the
not known or data is not applicable.
amount of data grows.
▪ Complex relational database systems may Rule 4: Active Online Catalog – the structure
lead to isolated databases where info cannot description of the entire database must be stored in
be shared from one system to another. an online catalog, known as data dictionary.
Week 5 – Relational Database cont. METADATA - data in database, also stored as rows
and columns. Collection of these is stored in the data
Key Constraints – There must be at least one minimal
subset of attributes in the relation, which can identify dictionary or system catalog.
a tuple uniquely. If there are more than one, these are SYSTEM CATALOG - accessed by DBMS to perform
called candidate keys. various transactions and data dictionary has the user
▪ No two tuples can have identical values for accessible views that are accessed by the
developers/designers/users,
key attributes.
▪ A key attribute cannot have null values. Rule 5: Comprehensive Data Sub-Language Rule - A
database can only be accessed using a language
Data Redundancy – having multiple copies of same
data in the database. having linear syntax that supports data definition, data
manipulation, and transaction management
Insertion Anomaly – This problem happens when the operations.
insertion of a data record is not possible without
Rule 6: View Updating Rule - All the views of a
adding some additional unrelated data to the record.
database, which can theoretically updated, must also
be updatable by the system.
TYPES OF VIEWS:

1. USER View - lists only those tables and views 3. SET DIFFERENCE - takes the two sets and
which are created by current user/schema. It returns the values that are in the first set but
does not list the tables and views of other not the second set.
schemas nor the ones to which it has access.
2. ALL View - lists all the tables and views that
are owned by the current user as well as
those tables and views to which it has access.
3. DBA View - will have access to all the tables
and views of all users/schema. But these
views will be accessible by only those who
have DBA privileges.
Rule 7: High-Level Insert, Update, and Delete Rule - a
database must support high-level insertion, update, Rule 8: Physical Data Independence - the data stored
and deletion. This must not be limited to a single row, in a database must be independent of the applications
that is, it must also support union, intersection, and that access the database. If any change in the
minus operations to yield sets of data records. physical structure of the database occurs, it must not
have any impact on how data is being accessed by
Relation Set Operators in DBMS external applications.
1. UNION - combines two different results Rule 9: Logical Data Independence - the logical data
obtained by a query into a single result in the in a database must be independent of it’s user’s view
form of a table. Results should be similar if (application). This is one of the most difficult rules to
union is to be applied on them. If duplicate apply. For example, if two tables are merged or one is
values are required in the resultant data, then split in to two different tables, there should be no
UNION ALL is used. impact or change on the user application.
Rule 10: Integrity Independence - A database must be
independent of the application that uses it. All its
integrity constraints can be independently modified
without the need of any change in the application.
Rule 11: Distribution Independence - The foundation
of distributed database systems. The end-user must
not be able to see that data is distributed over various
locations. User should always get the impression that
the data is located at one site only.
Distributed Database System - A database that is not
limited to one system, it is spread over different sites
like multiple computers or over a network of
computers. Located on various sites that don’t share
physical components.
2. INTERSECTION - Gives the common data Rule 12: Non-Subversion Rule - If a system has an
values between the two data sets that are interface that provides to low-level records, then the
intersected. Removes all duplicates before interface must not be able to subvert the system and
displaying the result. bypass security and integrity constraints.
WEEK 6 - ENTITY RELATIONSHIP DIAGRAM Multivalued Attribute - An attribute that has
multiple values for a single entity at a time.
Entity Relationship Diagram (ERD) - also known as 4. Composite Attribute - If an attribute has two or
entity relationship model, a graphical representation more other attributes.
that depicts relationships among people, objects, 5. Derived Attribute - As the name suggests, the
places, etc., within an IT systems. It also uses data derived attribute is an attribute whose value
modeling that can help define business processes can be calculated from another attribute.
and serve as the foundation for a relational database. 6. Relationship - represented by
diamond-shaped box. All the entities
IMPORTANCE OF ERDS
participating in a relationship, are connected
★ Provide a visual starting point for database to it by a line.
design that can also be used to help PARTICIPATION CONSTRAINTS
determine information system requirements in
the organization.
★ After a relational database is rolled out, an
ERD can still serve as a reference point for
any debugging or re-engineering needed for
later purposes.

1. Total Participation - Each entity is involved in


the relationship. Represented in DOUBLE
LINES.
2. Partial Participation - Not all entities are
involved in the relationship. Represented in
SINGLE LINES

WEEK 9 - Advance Data Modeling

Extended Entity-Relationship Model (EER) - EER is


a high-level data model that incorporates extensions to
the original ER model. Enhanced ERDs are high-level
models that represent the requirements and
complexities of complex databases.

Sub-classes and Superclass - A superclass is an


COMPONENTS OF ERD entity that can be divided into further subtypes.
1. Entities - objects or concepts that can have
data stored about them, refer to tables used in
databases.
a. Weak Entity - does not have a primary
key, and are dependent on the parent
entity.
b. Strong Entity - has a primary key, it
has weak entities that are dependent Sub-classes and Superclass - The superclass
on storing entity. "shape" has subgroups: Triangle, Square, and Circle.
2. Attributes - properties or characteristics of
entities. An ERD attribute can be denoted as -Subclasses are the group of entities with some unique
primary key, which identifies as a unique attributes. A subclass inherits the properties and
attribute, or a foreign key, which can be attributes from the superclass.
assigned to multiple attributes.
3. Primary Key - Every table has one Primary
key and cannot have null values.
Specialization and Generalization - Why do we Need Normalization?
Generalization is a process of generalizing an entity Normalization is a technique for organizing the data
which contains generalized attributes or properties into multiple related tables to minimize data
of generalized entities. redundancy and data inconsistency. It aims to
eliminate anomalies in data.

Functional Dependency
-an attribute is dependent on another attribute if the
latter uniquely identifies it.
-It is denoted by A -> B, which means A determines B
and B depends upon A.
-For example, Student name can be determined by

Data Anomalies
A data anomaly is an unexpected side effect of trying
Category or Union - Relationship of one to insert, update, or delete a row. Essentially, more
superclass or subclass with more than one data must be provided to accomplish an operation than
superclass. expected.

Owner is the subset of two super class: Vehicle and House.

Aggregation - Represents relationship between a Insertion Anomaly


whole object and its component. -Insertion anomaly occurs when we cannot insert a
new tuple into the table due to a lack of data. For
Entity Clustering - Entity Clustering is a virtual example, what happens if we try to insert (add) the
entity type used to represent multiple entities and details of a new retail outlet with no items in its stock?
relationships in ER Diagrams. It is formed by -NULL values would be inserted into the item details
combining multiple interrelated entities into a columns, which is not preferable and can lead to
single entity object. It is a useful way to inconsistencies in the data.
represent a data model for large and complex
organizations. Deletion Anomaly

WEEK 10 - Database Normalization -Deletion anomaly occurs when the deletion of some
data deletes other required data as well, resulting in
Database Normalization - It is the process of unintended data loss. For example, what happens if we
organizing the data in a database. It helps in try to delete the item with item code I1106?
removing duplicate values in the database. -The details of the retail outlet R1002 will also be
Normalization divides the larger table into smaller deleted from the database, causing unintended and
tables and links them using relationships. potentially critical data loss.

Update Anomaly

-When an update of a single record requires an update


in multiple records. For example, if the retail outlet
location of R1001 is changed from King Street to
Victoria Street,
-2 rows will be updated.
Fourth Normal Form (4NF)
Data Redundancy If no database table instance contains two or more
When new items are supplied to a retail outlet, what independent and multivalued data describing the
details do we need to insert? relevant entity, then it is in 4th Normal Form (4NF).
Apart from all necessary details,
retail_outlet_location will also be inserted, which is Fifth Normal Form (5NF)
redundant. -The 5NF (Fifth Normal Form) is also known as project-
join normal form. A relation is in Fifth Normal Form
The Normalization Process - Normal Forms (5NF) if it is in 4NF and won't have lossless
Normal forms are used to eliminate or reduce decomposition into smaller tables.
redundancy in database tables. It is a way of -You can also consider that a relation is in 5NF if the
measuring the levels or depth to which a database candidate key implies every join dependency in it.
has been normalized. A database's level of
normalization is determined by the normal form. Join Dependency
Join dependency, or JD, is a constraint that is similar to
First Normal Form (1NF) FD (functional dependency) or MVD (multivalued
The objective of the 1NF is to divide the base into dependency). JD is satisfied only when the concerned
logical units called tables. When each table has relation is a join of a specific number of projections.
been designed, a primary key is assigned to most or Thus, such a type of constraint is known as a join
all tables. dependency.

Second Normal Form (2NF) WEEK 11 - Introduction to Structured Query


The objective of the 2NF is to take data that is only Language (Part 1)
partly dependent on the primary key and enter that
data into another table. SQL (Structured Query Language)
Structured Query Language (SQL) is a language for
Prime attribute - An attribute, which is a part of the storing and processing information in a relational
candidate-key, is known as a prime attribute. database. A relational database stores information in
tabular form, with rows and columns representing
Non-prime attribute - An attribute, which is not a different data attributes and the various relationships
part of the prime key, is said to be a non-prime between the data values. SQL provides a standardized
attribute. way to interact with relational databases, enabling
users to define, manipulate, and query the data stored
Third Normal Form (3NF) in these databases.
The objective of the third normal form (3NF) is to
remove data in the table that is not dependent on You can use SQL statements to store, update, remove,
the primary key. search, and retrieve information from the database.
You can also use SQL to maintain and optimize
Benefits of Data Normalization database performance.
✔Greater overall database organization
✔Reduction of redundant data Why is SQL important?
SQL is a popular query language that is frequently
✔Data consistency within the database
used in all types of applications. Data analysts and
✔A much more flexible database design developers learn and use SQL because it integrates
✔A better handle on database security well with different programming languages.
Drawbacks of Normalization
✔Reduced database performance History of SQL
Boyce–Codd Normal Form (BCNF) SQL was invented in the 1970s based on the relational
✔Boyce–Codd Normal Form (BCNF) is based on data model. It was initially known as the Structured
functional dependencies that take into account all English Query Language (SEQUEL). The term was
candidate keys in a relation. However, BCNF also later shortened to SQL. Oracle, formerly known as
has additional constraints compared with the Relational Software, became the first vendor to offer a
general definition of 3NF. commercial SQL relational database management
✔A table is in BCNF if every functional dependency system.
X → Y, X is the superkey of the table.
What are the components of a SQL system?

SQL Table Storage Engine


A SQL table is the basic element of a relational
database. The SQL database table consists of rows The storage engine, or database engine, is the
and columns. Database engineers create software component that processes the bytecode and
relationships between multiple database tables to runs the intended SQL statement. It reads and stores
optimize data storage space. the data in the database files on physical disk storage.
Upon completion, the storage engine returns the result
SQL Statements to the requesting application.
SQL statements, or SQL queries, are valid
instructions that relational database management
systems understand. Software developers build
SQL statements by using different SQL language
elements.

SQL language elements are components such as


identifiers, variables, and search conditions that
form a correct SQL statement.

How does SQL work?

SQL implementation involves a server machine that


processes the database queries and returns the
results. The SQL process goes through several
software components, including the following.

Parser
The parser starts by tokenizing, or replacing, some
of the words in the SQL statement with special
symbols. It then checks the statement for the
following:
Correctness – The parser verifies that the SQL
statement conforms to SQL semantics, or rules, that
ensure the correctness of the query statement. For
example, the parser checks if the SQL command
ends with a semi-colon. If the semi-colon is missing,
the parser returns an error.
Authorization – The parser also validates that the
user running the query has the necessary
authorization to manipulate the respective data. For
example, only admin users might have the right to
delete data.

Relational Engine
The relational engine, or query processor, creates a
plan for retrieving, writing, or updating the
corresponding data in the most effective manner.
For example, it checks for similar queries, reuses
previous data manipulation methods, or creates a
new one.

You might also like