Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 69

DFC20203 DATABASE

DESIGN
CHAPTER 1
FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEM
1. Apply fundamental of DBMS, relational data model and
normalization concepts in database development process.
CLO (C3, PLO2)
FUNDAMENT
ALS OF  1. Identify database

DATABASE  2. Identify DBMS


 3. Identify data model
MANAGEMEN
T SYSTEM
CHAPTER 1
FUNDAMENTALS OF
DATABASE MANAGEMENT
SYSTEM
1.1 IDENTIFY DATABASE
 A collection of related data shared by various categories
of users to fulfill the information needs and
requirements of an organization.
What is database?
 A database application is a program application written
in a specific programming language.
DATABASE IN EVERY DAY
LIFE…
 Databases are everywhere and have extensive effect in our life.
 Example:
DATABASE o Online TV streaming

IN EVERY o Social gaming


o E-commerce
DAY LIFE… o Social media
o Finances
 A database can be used at once is shared by
many users.
 Perform protection and data security.
Importance of  Overcoming difficulties in accessing data.

database to  Control of data redundancy.

everyday life  Provision for multiple views of data.


 Enforcement of integrity constraints
 Data sharing:
 The ability to share the same data resource with multiple
applications or users.

Data sharing
concept in
database
 Databases are powerful organizational tools
that help businesses quickly record, view and
respond to important information. When used
Uses of effectively, they can improve the efficiency and
profitability of a business.
database in
 Example of database role in business world:
business world  Customer relationship management: allows businesses
to document every interaction with a current or potential
customer, leading to more efficient marketing and sales
departments.
 Inventory Tracking: keep track how much inventory is in a
Uses of warehouse, in a storage room and on store shelves.
 Personnel Database: using a database to manage employee
database in information can simplify scheduling and help prevent payroll

business world errors.


 Analyse: reporting features of databases make them useful
(cont.) resources for analyzing data and predicting future trends.
 Data modeling is the first step in the database development
process.
 It involves collecting and analyzing the data that a business
needs to track, and then diagramming the organization of that
data in an Entity Relationship Diagram.

Database
development
process
 Step two, the database design phase of the development
process, translates the information modeled on the entity
relationship diagram to a table instance chart.

 The table instance chart lists the design


specifications of the information and
has the following components:
Database • Table name

development • Column names


• Keys: a primary key (PK) & foreign
process (cont.) key (FK)
• Nulls: indicates if a column must
contain a value (mandatory)
• Unique: indicates if the value
contained in a column is unique within
the table.
• Data type: identifies the definition
and format of the data stored in each
column
 Table instance chart:

https://hemantrohtak.blogspot.my/2016/11/33-creating-tables.html
 Step three, database build.
 Structured Query Language
(SQL) commands are used
to build the physical
structure of the database.

Database  SQL is also used to


development populate, access, and
manipulate the data within
process (cont.) the relational database.
Database  Reference: Oracle Academy notes (Chapter Database Design)
development  https://cit.dixie.edu/it/4310/Design/Intro-3.pdf

process(cont.)
PROPERTIES  There are many possible choices that can be made during the
OF A design and many rules to guide this work.

DATABASE  When trying to decide if some choices are better than others,
you need to consider the key desirable properties of a database.
Completeness
 Ensures that users can access the data they want. Note that
this includes ad hoc queries, which would not be explicitly
given as part of a statement of data requirements.
Integrity
 Ensures that data is both consistent (no contradictory data)
Properties Of and correct (no invalid data), and ensures that users trust the

A Database : database.
Flexibility
 Ensures that a database can evolve (without requiring
excessive effort) to satisfy changing user requirements.
Efficiency
 Ensures that users do not have unduly long response times
when accessing data.
Properties Of Usability (ease of use)
A Database  Ensures that data can be accessed and manipulated in ways
(cont.) which match user requirements.
CHAPTER 1
FUNDAMENTALS OF
DATABASE MANAGEMENT
SYSTEM
1.2 IDENTIFY DBMS
 DEFINITION: A software system which
DATABASE enables user to define, create, organize,
update, manage and administer databases.
MANAGEM
ENT  DBMS also controls access to data in a
database.
SYSTEM
 Example: MS Access, Oracle, MySQL,
(DBMS)
Filemaker, Microsoft SQL server, etc…
 End user are the people who use the
application programs to run the organization’s
daily operations.
 For example, sales clerks, supervisors,
Users of managers, and directors are all classified as end
DBMS users.
 High-level end users employ the information
obtained from the database to make tactical and
strategic business decisions.
 Application programmer is an individual who
writes application programs in a user

Users of organization.

DBMS (cont.)  Database administrator manage the DBMS


and ensure that the database is functioning
properly.
 Database system attempts to solve the difficulties in
conventional file processing system.
 Examples:
 Data redundancy and inconsistency
Problems with  Difficulties in accessing data
conventional  Data isolation
file processing  Integrity problems
system  Atomicity problems
 Concurrent access anomalies
 Security problems
 In traditional approach, information is stored in
Traditional flat files which are maintained by the file
approach to system under the operating system’s control.
information  Application programs go through the file
processing system in order to access these flat files.
Traditional
approach to
information
processing
(cont.)
 How data is stored in flat
files:
 Data is stored in flat files
as records.
 Records consist of various
Traditional fields which are delimited

approach to by a space, comma, pipe,


any special character etc.
information  End of records and end of
processing files will be marked using

(cont.) any predetermined


character set or special
characters in order to
identify them.
 Data security:
 The data stored in the flat file(s) can be easily
accessible and hence it is not secure.

Disadvantages of
traditional  Data redundancy:
approach to  In this storage model, the same information may get
duplicated in two or more files. This may lead to
information higher storage and access cost. It also may lead to
processing data inconsistency.
 Suppose the same data is repeated in two or more
files. If a change is made to data stored in one file,
other files also needs to be change accordingly.
 Data isolation:
 Data Isolation means that all the related data is not available in one
file.
 Usually the data is scattered in various files having different formats.
Disadvantages of Hence writing new application programs to retrieve the appropriate

traditional data is difficult.

approach to  Lack of flexibility:


information  The traditional systems are able to retrieve information for
processing predetermined requests for data.
 If we need unanticipated data, huge programming effort is needed to
make the information available, provided the information is there in
the files.
 By the time the information is made available, it may no longer be
required or useful.
 Program / data dependence:
 In traditional file approach, application programs are
closely dependent on the files in which data is stored.
Disadvantages of  If we make any changes in the physical format of the
file(s), like addition of a data field , etc, all application
traditional programs needs to be changed accordingly.
approach to  Consequently, for each of the application programs that
information a programmer writes or maintains, the programmer
must be concerned with data management.
processing  There is no centralized execution of the data
management functions. Data management is scattered
among all the application programs.
 Concurrent access anomalies:
 Many traditional systems allow multiple users
to access and update the same piece of data
simultaneously.
Disadvantages of  However this concurrent updates may result in
traditional inconsistent data.
approach to  To guard against this possibility, the system
information must maintain some form of supervision.
 But supervision is difficult because data may be
processing accessed by many different application
programs and these application programs may
not have been coordinated previously.

References:
http://www.careerbless.com/db/rdbms/c1/traditionalApproach.php
1. Controlling Redundancy
2. Integrity can be enforced
3. Inconsistency can be avoided
The
importance of 4. Data can be shared
having DBMS 5. Standards can be enforced
6. Restricting unauthorized access
7. Providing Backup and Recovery
 Distributed database
 Two generic database  In a distributed database, the data
is stored in storage devices that
architecture: are located in different physical
locations.
 Centralized database  They are not attached to a
 all the data of an common CPU but the database is
controlled by a central DBMS.
organization is stored in a
 Users access the data in a
single place such as a distributed database by accessing
mainframe computer or a the WAN (Wide Area Network).

Database server.  To keep a distributed database up


to date, it uses the replication and

architecture Users in remote locations
access the data through
duplication processes. The
replication process identifies
changes in the distributed
the Wide Area Network
database and applies those
(WAN) using the changes to make sure that all the
application programs distributed databases look the
same.
provided to access the
data.

http://www.differencebetween.com/difference-between-distributed-database-and-vs-centralized-database/
Database
architecture
(cont.)

https://www.slideshare.net/cunniman/9-centralised-and-distributed-databases
CHAPTER 1
FUNDAMENTALS OF
DATABASE MANAGEMENT
SYSTEM
1.3 IDENTIFY DATA MODEL
Data model is an integrated collection of concepts for
describing and manipulating data, relationships between
Data Model data and constraints on the data in the organization.

definition A model is a representation of real-world objects and events,


and their association.
A data model represents the organization itself.

Connolly, T.M, and Begg, C. (2012), Database Systems: A Practical Approach To Design, Implementation And Management: International
Edition (5th Edition), Pearson, USA. (page 93)
Evolution of
Data Model
 Imagine we have to design database for college.
 What is the real world entities involved with college?
 What is the relationship between each entities?
 What are the attributes related to each entity?

Object Based  Object based data models are based on above concept.
data model  It is designed using the entities in the real world,
attributes of each entity and their relationship.
 Example: entity-relationship (ER) data model.

https://www.tutorialcup.com/dbms/object-based-data-models.htm
Object Based
data model:
ER data model
 ER model is a graphical representation of real world objects
with their attributes and relationship.

https://www.tutorialcup.com/dbms/object-based-data-models.htm
 Record based logical models are used in describing data at the logical
and view levels.
 In contrast to object based data models, they are used to specify the
Record Based overall logical structure of the database and to provide a higher-level
description of the implementation.
Logical  Record based models are so named because the database is structured
model in fixed format records of several types. Each record type defines a
fixed number of fields, or attributes, and each field is usually of a fixed
length.
 The three example of record based data models are: hierarchical
model, network model and relational model.

http://www.ques10.com/p/14167/explain-different-data-models-with-its-advantages-/
Record Based
Logical model:
Hierarchical
model
 The Hierarchical model represents data as a hierarchical tree
structures. Each hierarchy represents a number of related
records.

http://www.opentextbooks.org.hk/ditatopic/30673
Record Based
Logical
model:
Network
model  The Network model represents data as record types and also
represents a limited type of one to many relationship, called
set type.

http://static3.creately.com/blog/wp-content/uploads/2012/06/database-design-network-model.png
Record Based
Logical model:
Relational data
model  Relational data model: data and relationships are
represented by a collection of tables.
 Each table has a number of columns with unique names, e.g.
customer, account.

http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes/Chapter1/node10.html#SECTION00142100000000000000
http://www.cs.montana.edu/~halla/csci440/n3/figure-3-1.png
 ANSI-SPARC (American National Standard
Institute – Standard Planning and
Requirements Committee) proposed a 3
THREE- schema architecture.
SCHEMA
ARCHITECTU  The goal of the three-schema architecture
is to separate the user applications and
RE OF DBMS
the physical database.
THREE-SCHEMA ARCHITECTURE OF
DBMS
End End
EndUser
User22
EndUser
User11 End
EndUser
UserNN

External
Level View 1 View 2 View N

Conceptual Logical Data


Level Mapping Conceptual Scheme
Independence

Internal Physical Data


Level Mapping Internal Scheme Independence

Database
 User’s view of the DB where only a part of the
database is suitable to the requirements of each
user
THREE-
SCHEMA  Views of Users:
 Accessibility to certain data, defined in specific views,
ARCHITECTU is restricted to users.
RE OF DBMS -  The same data can be viewed and presented
External Level differently.
 Some views only stored virtual data where the data can
be produced only when needed.
 The middle level between the external and the internal
levels.
THREE-  Represent: what data & relationship between data.
SCHEMA  Contain : - Entities, attributes and relationship.
ARCHITECTU - Constraint of data.
- Semantic information of the data.
- Security and integrity information.
RE OF DBMS –
Conceptual  Supports the external scheme where any data useful to
users need to be stated in this level.
Level  Represent a complete organizational environment.
Lowest Level of ANSI/SPARC and closest to a DB.
Explain how data is stored in a database.
THREE- Covers physical implementation of the DB for
SCHEMA optimum runtime and data structure/file
ARCHITECTU
organization used to store data in storage
RE OF DBMS –
Internal Level instrument.
Contains descriptions of the following :
 Storage space required (data and indexes).
 Description of records of storage.
 Record positions.
 Data compression and data encryption techniques.
Client Server

 DBMS is located in a computer called server.

CLIENT-  Has very high processing capabilities.


SERVER  Its acts as a monitor to other clients
ARCHITECT computers connected to it in a local area
URE OF network.
DBMS
 Server computer is known as the
‘backend’ whereas the client computer
CLIENT- acts as the ‘front-end’.
SERVER  Capable of reducing cost because users
ARCHITECT are able to use personal computers or
URE OF workstations as server and client
DBMS  Able to share resources such as scanner,
printers etc.
TWO
CATEGORIE
S OF DBMS

FP304 Database System


 Desktop databases offer simple, flexible
solutions for data storage and retrieval.
DESKTOP  They're often quite sufficient to meet
DATABASE uncomplicated database requirements for
both small and large organizations.
 Desktop products include:
MicrosoftAccess
ParaDox
DESKTOP FileMakerPro
DATABASE
ExBase derivatives such as FoxPro and
ClipperLanguage
Lotus
Easy Management
Programs such as Microsoft Access are desktop based.
BENEFITS OF When you need to edit something, all you have to do is
USING download the necessary file from your web space and from
DESKTOP there you can use the program to edit and modify your
database.
DATABASE
Once you have carried out all your modifications you can
SOLUTION easily upload your modified database to your web space
where all changes will be immediate
Low Running Costs
To begin with all you have to do is purchase the
necessary desktop database program so that you
BENEFITS OF can create and manage your databases.
USING After that you can normally freely use your
DESKTOP chosen application to create and modify as many
DATABASE databases as you wish, but it must be noted that
SOLUTION you can only use the intended program to modify
your database unless you build your own web-
based interface
Easy To Use
Since desktop database systems are desktop
BENEFITS OF based, no knowledge is necessarily needed to be
USING able to manage such databases since the
DESKTOP programs themselves are normally very intuitive
and easy to learn.
DATABASE
SOLUTION Since the databases themselves aren’t SQL
based there is no need to have any prior
knowledge of SQL syntax.
 A server database is a computer program that
provides database services to other computer

SERVER programs or computers, as defined by the


client–server model.
DATABASE
 The term may also refer to a computer
dedicated to running such a program.
 Some examples of Database servers are Oracle,
DB2, and SQL Server.

SERVER  Every server uses its own query logic and


structure.
DATABASE
 The SQL query language is more or less the
same in all the database servers.
Scalability
Because SQL databases are served through a
service and are based on SQL syntax they are in
BENEFITS OF fact much more scalable meaning that they are
USING used by some of the largest database driven
SERVER websites on the internet.
DATABASE Having scalability allows you to grow your
SOLUTION website without having to worry about the
database crashing or not being accessible because
there are simply too many people using it at one
time.
Wider integration
SQL database systems can normally be used by
many different scripting languages.
BENEFITS OF
For example ASP.NET and classic ASP have the
USING
ability to be used with both Microsoft SQL
SERVER Server database servers and MySQL based
DATABASE database servers which provides webmasters with
SOLUTION a good choice of database server that they can use
when it comes to making their website database
driven.
Desktop management
Like desktop database systems, SQL database
servers can also be managed from the desktop
BENEFITS OF using external tools which will connect to your
USING SQL database server so that you are able to
SERVER manage the different databases that users have
DATABASE created on your server.
SOLUTION Although you can also make use of web admin
panels and other forms of SQL database
management that are now available to you.
What you have learned in
Chapter 1:
 Importance of DBMS
Database definition
 Centralized and distributed
Evolution of database database

Importance of database  Data model definition

3 steps of database development  Object based data model: ER


and design  Record based data model:
Summary Properties of database
hierarchical, network and
relational data model
DBMS definition  3-schema architecture of DBMS

Purpose of database system  Client-server architecture


 Desktop and server database
Traditional approach and
disadvantages  Users of DBMS

You might also like