You are on page 1of 3

DATABASE – collection of integrated data or  MANUFACTURING:

records. PRODUCTION,INVENTORY
 HUMAN RESOURCES: EMPLOYEE
RECORD – representation of a physical or
RECORDS
conceptual entity
DB2
TABLE – is the core of structure for storing data
 Developed by IBM
FIELD – is a part of a record and contains a single
 Abbreviation for “IBM
piece of data for the subject record
DATABASE 2”
Purpose of database system is stored in files  Introduced in june 1983
 Support relational model
DRAWBACK OF USING FILE SYSTEM TO STORE
DATA  Platform specific DB2 product
 Supports SQL
DATA REDUNDUNCY AND INCONSISTENCY –  Version is DB2 10.5
multiple file formats and duplication of  DB2 for LINUX,UNIX AND
information on different files WINDOWS
DIFFICULTY IN ACCESSING DATA – need to write LEVEL OF ABSTRACTION
a new program carry out each task 1. PHYSICAL LEVEL – describe how a data is
DATA ISOLATION – multiple files and format stored
2. LOGICAL LEVEL - the way a person views
DATA SECURITY – hard to provide users access data within the context of a problem
to some but not at all, data domain
3. View level- application programs hide
TYPES OF DATABASES
details of data types.
 SINGLE USER DATA – a database that
support only one users at a time Data model – a representation, usually graphic,
 MULTIUSER DATA - a database that of a complex “real-world” data structure.
support multiple concurrent users
 Hierarchical model – This model is based
 WORKGROUP DATABASE – usually
on an upside-down tree structure in
support fewer than 50 users or is used
which record is called a segment. The
for a specific department in an
top record is the root segment. Each
organization
segment has a 1:M relationship to the
 ENTERPRISE DATABASE – the overall
segment directly below it.
company data representation which
provide support from present and  Network model – An early data model
expected future needs that represent data as a collection of
 CENTRALIZED DATABASE- a database records types in 1:M relationships.
located at a single site
o Schema – is the conceptual
 CLOUD DATABASE – a database that is
organization of the entire as viewed by
created and maintained using cloud
the database administrator
services such Microsoft azure or amazon
aws o - a logical groupings of database
objects such as tables, indexes, views
DATABASE MANAGEMENT SCIENCE (DBMS)
and queries that are related to each
- is a collection of data and set of programs
other
to access and store those data in easy and
efficient data o Subschema – defines the portion of the
database “seen” by the application
DATABASE APPLICATION:
programs that actually produce the
 BANKING: TRANCSACTION
desired information from the data
 AIRLINES :RESERVATION,SCHEDULE
within the database
 UNIVERSITIES:
REGISTRATION,GRADES o A data manipulation language (DML) –
 SALES: CUSTOMER,PRODUCTS the set of commands that allows an end
 ONLINE RETAILER:ORDER TRACKING user to manipulate the data in the
database such as SELECT, INSERT, Relational Model
UPDATE, DELETE, COMMIT and  All the data is stored in various tables.
ROLLBACK  Example of tabular data in the relational
o also known a query language model
o SQL is the most widely used
commercial language

A schema data definition language (DDL) – a


language that allows a database administrator to
define the database structure, schema and
subschema

 Specification notation for defining the


database schema

Example: create table instructor (


 ERD – a diagram that depicts an entity
ID char(5),
relationship model’s entities, attributes,
name varchar(20),
and relations.
dept_name varchar(20),
salary numeric(8,2))

 DDL compiler generates a set of table


templates stored in a data dictionary
 Data dictionary contains metadata (i.e.,
data about data)
 Database schema
 Integrity constraints - Primary
key (ID uniquely identifies
instructors)  Object-oriented data model (OODM) a
 Authorization - Who can access data model whose basic modeling
what structure is an object

 Relational model – Each relation (table)


is conceptually represented as a two-
dimensional structure of intersecting
rows and columns. The relations are
related to each other through the
sharing of common entity characteristics
(values in columns)

 Entity-Relationship data model (mainly


for database design) - A diagram that
depicts an entity relationship model’s
entities, attributes, and relations.

 Object-oriented data model (OODM) –


a data model whose basic modeling
structure is an object

 Extensible Markup Language (XML) – a  NoSQL – is a large-scale distributed


database system that stores and database system that stores structured
manages semistructured XML data and unstructured data in efficient ways

 NoSQL – a new generation of DBMS that Characteristics of NoSQL database:


is not based on a traditional relational
o They are not based on the relational
database model
model and SQL

o They support highly distributed


database architectures
o They provide high scalability, high MAIN FUNCTION
availability and fault tolerance 1. Select 5. Union
2. Project 6. Difference
o They support very large amount of
3. Join 7. Product
sparse data
4. Intersect 8. Divide
o They are geared toward performance
rather than transaction consistency. RELVAR - short for relation variable
- container(variable) for holding relation
RELATIONAL TABLE data, not the relation itself
1. Perceived as a two-dimensional structure
composed of rows and columns RELATIONAL SET OPERATORS
2. Each table row (tuple) represents a single
entity occurrence within the entity set 1. SELECT - used to select a subset of rows
3. Each table column represents an attribute, - also known as RESTRICT
and each column has a distinct name 2. PROJECT -used to select a subset of columns
4. Each intersection of a row and column
represents a single data value 3. UNION - used to merged (append) 2 tables
5. All values in a column must conform to the into a new table, dropping the duplicate rows
same data format - table must be UNION-COMPTIBLE
6. Each column has a specific range of values *UNION COMPATIBLE – 2 or more
known as the attribute domain tables that have same number of columns and
7. The order of the rows and columns I s corresponding columns have compatible
immaterial to the DBMS domains
8. Each table must have an attribute of
combination of attributes that uniquely 4. INTERSECT - used to yield ONLY the rows that
identifies each row are common to 2 union-compatible tables

5. DIFFERENCE – used to yield all rows form one


DBM CAN SUPPORT DIFFERENT DATA TYPE
table that are not found in another union-
1. NUMERIC – you can use numeric data to
compatible table
perform meaningful arithmetic procedures
2. CHARACTER – also known as text data or 6. PRODUCT - used to yield ALL possible pairs of
string data rows from 2 tables
- can contain any character or - also known as CARTESIAN PRODUCT
symbol not intended for mathematical
7. JOIN - used to yield rows from 2 tables based
manipulation
on criteria. Types of join: Natural join, Theta
3. DATE – contain calendar dates stores in a
join, Equijoin and Outer join
special format known as the Julian data format
*NATURAL JOIN – yields a new table composed
4. LOGICAL- can ONLY have true or false
of only the rows with common values in their
common attributes
RELATIONAL DATABASE
*THREE-STAGE PROCESS
PRIMARY KEY (PK) - an identifier composed of
1. Product
one or more attributes that are uniquely
2.Select
identifies a row
3. Project
- a candidate key selected
*JOIN COLUMN - used in criteria
as a unique entity identifier
- generally share similar values
*LEFT OUTER JOIN – yields all the rows
FOREIGN KEY (FK) – an attribute or attributes in
in the left table, including those that have no
one table whose values must match the primary
matching values in the other values
key in another table or whose values must be
*RIGTH OUTER JOIN – yields all the row
null
in the right table, including the ones with no
matching values in the other table
RELATIONAL ALGEBRA – set of mathematical
principles that form the basis for manipulating
relational table contents

You might also like