Introduction to Database System
▸File System ▸ Basic Data Modeling Concepts
▸Database System ▸ Database Management System
▸Database
▸Database Model
File systems
▸ used by manager of any small organization to track necessary data.
▸ Composed of a collection of file folders that are properly tagged, kept in a
filing cabinet, and organized according to their logical relationships.
Database System
Is a computerized system whose overall purpose is to maintain
information and make that_informationavailable on demand
Examples:
▸ Computerized record-keeping system
▸ Electronic filing cabinet
▸ Repository for a collection of computerized data files
Database System Environtment
Database System
▸ Five major parts of DBS:
❑ Hardware
❑ Software
- Operating System
- DBMS Software
- Application programs and utility software
Database System
❑ People
- System Administrator who oversee the general operations of the dbs
- Database Administrator who manage the use and proper functionality of
database system
- Database Designer who design the database structure
- Systems analyst and Programmers who design and implement the application
programs –thru w/c access and manipulation of the database is done
- End Users who use the application programs for the daily operations of the
organization
Database System
❑ Procedure are the rules that govern and design
and use of database system
❑ Data covers the collection of facts stored in
the database
Database
▸ Is a shared, integrated computer structure that stores a collection of:
- End user data raw facts of interest to the end user
- Metadata data
about data through which the end
-user data are integrated
and managed
Database
▸ Database is a collection of self-describing data, similar to a well-organized
electronic filing cabinet
Database
▸ Advantages ▸ Disadvatages
- Reduced Data redundancy -Expensive
- Data integrity - Lengthy development time
- Data independence - Training Cost
- Data Security - Extensive programming
- Data Consistency -Vulnerability
- Easier use of data
- Less Storage
▸ Database Model
- defines the logical design of data that can be stored, organized, and manipulated
in a database system
- defined the infrastructures offered by a particular database.
▸ Categories:
❑ Conceptual Model
- focuses on the logical nature of thedata representation (Example: Entity
relationship)
❑ Implementation Model
- places emphasis on how the data are represented in the database or how the
data structures are implemented to represent what is modeled
- Examples:
▸ Hierarchical database model
▸ Network database model
▸ Relational database model
▸ Object-oriented database model
▸ Basic building blocks of a database model:
❑ Entity – is anything about which data are to be collected and stored ( a person,
a place, a thing, or an event)
❑ Attribute - is the characteristic of an entity (describes an entity)
- Example: a STUDENT entity may have attributes such as student
number, student name, student address and student contact number
❑ Relationship – describes the association among entities.
- Example: a student-teacher relationship : a student may attend classes
conducted by several teachers, and each teacher may teach several students in
one class.
Database Models
❑ Relationship
- Types:
One to many (1:*)
Many to many (*:*)
One to one (1:1)
❑ Constraint
- a restriction placed on the data
- help to ensure data integrity
- Example: GWA must from 1.00 t0 5.00, One class must have 40 students only
▸ Hierarchical Model
- it was developed in the 1960’s
- is used to manage large amounts of data for complex manufacturing projects
- has a basic logical structure represented by an upside-down tree
- The main drawback of this model is that, it can have only one to many
relationships between nodes
- each parent can have many children
Network Model
- Was created to represent complex data relationships, improve database
performance, and impose a database standard
- The network database model was created to solve the shortcomings of the
hierarchical database model.
- In this type of model, a child can be linked to multiple parents, a feature that
was not supported by the hierarchical data model.
▸ Relational Model
- was introduced in 1970 by E.F. Codd of IBM
- is a collection of relations or two-dimensional tables having distinct names
- the table represents a relational database.
- Rows called records
- Column called field
Database Models
▸ Entity Relationship Model
- was introduced by Peter Chen in 1976
- yields a graphical representation of entities and their relationships in database
structure
- usually represented by an entity relationship diagram
▸ Introduced the three types of relationships:
▹ One-to-many relationship
▹ Many-to-many relationship
▹ One-to-one relationship
Is based on the following components:
▹ Entity
▹ Attributes
▹ Relationships
Object-oriented Model
▹ Stores both data and their relationships in a single structure known as object
▹ Is based on the components sych as:
▹ Object – an abstraction of real-world entity
▹ Attribute – describes the properties of an object
▹ Class – is a collection of similar objects with shared attributes and methods
▹ Class hierarchy – refers to the arrangement of classes
▹ Inheritance – refers to the ability of an object within the class hierarchy to
inherit the attributes and methods of the classes
Database Management System
▸ DBMS is a collection of programs that manages the database structure and
controls access to the data stored in the database.
▹ Example:
▹ MS SQL
▹ MySQL
▹ Oracle
▸ Functions of a DBMS:
▹ Data dictionary management
▹ Data storage management
▹ Data transformations and presentation
▹ Security management
▹ Multi-user access control
▹ Backup and recovery management
▹ Data integrity management
▹ Database access languages and application programming
interfaces:
▹ Query Language
▹ Data Definition Language
▹ Data Manipulation Language
▹ Database communication interfaces
Data Dictionary
▸ Data Dictionary
▹ describes the data stored in a database
▹ Is a centralized repository of information about data such as meaning,
relationships to other data, origin, usage, and format.
2 types of data dictionary
▹ Active Data Dictionary – is automatically updated by the DBMS by every
database access
▹ Passive Data Dictionary – is not automatically updated and
usually requires batch processing to run