Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
62 views

Rcs 201: Database DESIGN (3-Units)

The document describes an introductory course on database design. The objectives are to explain what databases are, discuss database architecture and approaches to design, and teach normalization techniques. Students will design and implement relational databases. Assessment includes coursework, assignments, exams. Students are expected to study materials, practice techniques, and communicate with instructors. An example university database is provided to demonstrate entities, attributes, and relationships for students, courses, departments and more.

Uploaded by

Elisante David
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Rcs 201: Database DESIGN (3-Units)

The document describes an introductory course on database design. The objectives are to explain what databases are, discuss database architecture and approaches to design, and teach normalization techniques. Students will design and implement relational databases. Assessment includes coursework, assignments, exams. Students are expected to study materials, practice techniques, and communicate with instructors. An example university database is provided to demonstrate entities, attributes, and relationships for students, courses, departments and more.

Uploaded by

Elisante David
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

RCS 201: DATABASE

DESIGN(3-units)

06/12/2020 RCS 201 1


Objectives of the course
1. Explain what a database is
2. Discuss the advantages and disadvantages of databases and explain
the architecture of databases
3. Describe the different approaches to database design and list down
the advantages of the relational model design
4. Perform 1NF, 2NF 3NF and BCNF normalisation, ER and EER
modelling
5. Design and implement well-structured relational databases

06/12/2020 RCS 201 2


Mode of Delivery & Assessment
• Mode of Delivery :Lectures, Tutorials, Practical and presentation

• Integrated Method of assessment:


 Course work (quizzes/Attendance, tests, assignments/homework, Practical) =
40%
End of Semester Exam 60%

06/12/2020 RCS 201 3


Requirements
• Read, read, read between line
• Textbooks, system manual, …
• Practice, practice, practice
• Homework, project
• Study sample programs, examples in books, form your own ideas, …
• Communicate, communicate, communicate
• With instructor, teammates, fellow students, …
• Be honest
• No cheating, no plagiarism, …

06/12/2020 RCS 201 4


Introduction: Databases and Database
Users
• Outline
Introduction
Types of Databases and Database Applications
Basic Definitions
Typical DBMS Functionality
Example of a Database (UNIVERSITY)
Main Characteristics of the Database Approach
Database Users
Advantages of Using the Database Approach
When Not to Use Databases
06/12/2020 RCS 201 5
Types of Databases and Database
Applications
traditional database applications:
• deposit or withdraw funds to a bank account,
• Hotel or airline reservation,
• if we access a computerized library catalogue to search for a bibliographic
item, or
• if we purchase something online—such as a book, toy, or computer
• chances are that our activities will involve someone or some computer program accessing a
database
• Even purchasing items at a supermarket often automatically updates the
database that holds the inventory of grocery items.
Most of the information that is stored and accessed is either textual or
numeric.
06/12/2020 RCS 201 6
Types of Databases and Database
Applications..
More Recent Applications:
• Multimedia Databases (store images, audio clips, and video streams digitally.)
• Geographic Information Systems (GIS) (store and analyse maps, weather data, and satellite
images.)
• Data warehouses and online analytical processing (OLAP)(extract and analyse useful business
information from very large databases to support decision making)
• Real-time and Active Databases(used to control industrial and manufacturing processes)
• New types of database systems, often referred to as big data storage systems, or NOSQL
systems, have been created to manage data for social media applications.
 These types of systems are also used by companies such as Google, Amazon, and Yahoo, to manage
the data required in their Web search engines, as well as to provide cloud storage
• Many other applications
• In our course we will focuses on traditional applications
06/12/2020 RCS 201 7
Basic Definitions
Database:
• A collection of related data.
• The collection of data containing information relevant to an enterprise
• is a collection of related and organized information
• is a collection of non-redundant data shareable between different
application systems

Data:
• Known facts that can be recorded and have an implicit meaning.
• Data are raw or isolated facts from which the required information is produced.
• Data are distinct pieces of information, usually formatted in a special way.
INFORMATION
• Data and information are closely related and are often used interchangeably.
• Information is the processed, organized or summarized data.
• Collection of related data that when put together, communicate meaningful
and useful message to a recipient who uses it, to make decision or to interpret the data to get the meaning.
• Data are processed to create information, which is meaningful to the recipient.
Mini-world:
• Some part of the real world about which data is stored in a database. For example, student grades and transcripts at a
university.
06/12/2020 RCS 201 8
Basic Definitions..
Database Management System (DBMS):
• is a computerized system that enables users to create and maintain a database.
• A software package/ system to facilitate the creation and maintenance of a
computerized database.
• is a collection of programs that enables users to create and maintain a database.
• is a general-purpose software system that facilitates the processes of defining,
constructing, manipulating, protecting and sharing databases among various users
and applications.
• is a software utility for storing and retrieving data that gives the end-user the impression that
the data is well integrated even though the data can be stored with no redundancy at all.
• Example MySQL, Microsoft SQL Server, Oracle , Microsoft Access, PostgreSQL, SQLite,
Firebird etc.
Database System:
• The DBMS software together with the data itself(database). Sometimes, the
applications are also included.
06/12/2020 RCS 201 9
Simplified database system environment

06/12/2020 RCS 201 10


Purpose of Database System

• In the early days, database applications were built on top of file


systems
• Drawbacks of using file systems to store data:
• Data redundancy and inconsistency
• Multiple file formats, duplication of information in different files
• Difficulty in accessing data
• Need to write a new program to carry out each new task
• Data isolation — multiple files and formats
• Integrity problems
• Integrity constraints (e.g. account balance > 0) become part of program code
• Hard to add new constraints or change existing ones

06/12/2020 RCS 201 11


Purpose of Database Systems (Cont.)

• Drawbacks of using file systems (cont.)


• Atomicity of updates
• Failures may leave database in an inconsistent state with partial
updates carried out
• E.g. transfer of funds from one account to another should either
complete or not happen at all
• Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
• E.g. two people reading a balance and updating it at the same time
• Security problems
• enforcing security constraints is difficult.
• Database systems offer solutions to all the above
problems

06/12/2020 RCS 201 12


Typical DBMS Functionality
Define a particular database in terms of its data types, structures, and
constraints.
Construct or Load the initial database contents on a secondary
storage medium.
Manipulating the database:
• Retrieval: Querying, generating reports
• Modification: Insertions, deletions and updates to its content
• Accessing the database through Web applications
Processing and Sharing by a set of concurrent users and application
programs –yet, keeping all data valid and consistent

06/12/2020 RCS 201 13


Typical DBMS Functionality…
Other features:
• Protection or Security measures to prevent unauthorized access
• “Active” processing to take internal actions on data
• Presentation and Visualization of data
• Maintaining the database and associated programs over the lifetime of the
database application
• Called database, software, and system maintenance

06/12/2020 RCS 201 14


Example of a Database(with a Conceptual
Data Model)
Mini-world for the example:
• Part of a UNIVERSITY environment.
Some mini-world entities:
• STUDENTs
• COURSEs
• SECTIONs (of COURSEs)
• (academic) DEPARTMENTs
• INSTRUCTORs

06/12/2020 RCS 201 15


Example of a Database(with a Conceptual
Data Model)…
Some mini-world relationships:
• SECTIONs are of specific COURSEs
• STUDENTs take SECTIONs
• COURSEs have prerequisite COURSEs
• INSTRUCTORs teach SECTIONs
• COURSEs are offered by DEPARTMENTs
• STUDENTs major in DEPARTMENTs
Note: The above entities and relationships are typically expressed in
a conceptual data model, such as the ENTITY-RELATIONSHIP data
model

06/12/2020 RCS 201 16


Example of a simple database(A database that
stores students and courses information)

06/12/2020 RCS 201 17


Example of a simple database(A database that
stores students and courses information)…

06/12/2020 RCS 201 18


Example of a simple database(A database that
stores students and courses information)…

06/12/2020 RCS 201 19


Main Characteristics of the Database Approach
Self-describing nature of a database system:
A DBMS catalogue stores the description of a particular database (e.g. data
structures, types, and constraints)
The description is called meta-data.
This allows the DBMS software to work with different database applications.
Insulation between programs and data:
Called program-data independence.
Allows changing data structures and storage organization without having to
change the DBMS access programs.

06/12/2020 RCS 201 20


Example of a simplified database catalogue

06/12/2020 RCS 201 21


Main Characteristics of the Database
Approach (continued)
• Insulation between Programs and Data, and Data Abstraction:
• Called program-data independence.
• Allows changing data structures and storage organization without having to
change the DBMS access programs.
• A data model is used to hide storage details and present the users with a
conceptual view of the database.
• Programs refer to the data model constructs rather than data storage details
Support of multiple views of the data:
• Each user may see a different view of the database, which describes only the
data of interest to that user.

06/12/2020 RCS 201 22


Main Characteristics of the Database Approach
(continued)

Sharing of data and multi-user transaction processing:


• Allowing a set of concurrent users to retrieve from and to update the
database.
• Concurrency control within the DBMS guarantees that each transaction is
correctly executed or aborted.
• Recovery subsystem ensures each completed transaction has its effect
permanently recorded in the database.
• OLTP(Online Transaction Processing) is a major part of database applications.
This allows hundreds of concurrent transactions to execute per second.

06/12/2020 RCS 201 23


Database Users…
Users may be divided into
a) Those who actually use and control the database content, and
those who design, develop and maintain database applications
(called “Actors on the Scene”), and
b) Those who design and develop the DBMS software and related
tools, and the computer systems operators (called “Workers Behind
the Scene”).

06/12/2020 RCS 201 24


Database Users…
Actors on the scene
Database administrators:
• Responsible for authorizing access to the database, for coordinating and
monitoring its use, acquiring software and hardware resources, controlling its
use and monitoring efficiency of operations.
Database Designers:
• responsible for identifying the data to be stored in the database and for
choosing appropriate structures to represent and store this data
• They must communicate with the end-users and understand their needs.

06/12/2020 RCS 201 25


Database Users…
• Actors on the scene (continued)
End-users: They use the data for queries, reports and some of them
update the database content. End-users can be categorized into:
Casual: access database occasionally when needed
Naïve or Parametric: they make up a large section of the end-user
population.
• They use previously well-defined functions in the form of “canned
transactions” against the database.
• Examples are bank-tellers or reservation clerks who do this activity for an
entire shift of operations.

06/12/2020 RCS 201 26


Database Users…
Sophisticated:
• These include business analysts, scientists, engineers, others thoroughly familiar with the system capabilities.
• Many use tools in the form of software packages that work closely with the stored database.
Stand-alone:
• Mostly maintain personal databases using ready-to-use packaged applications.
• An example is a tax program user that creates its own internal database.
• Another example is a user that maintains an address book
System Analysts and Application Programmers (Software Engineers)
• System analysts determine the requirements of end users, especially naive and parametric end
users, and develop specifications for standard canned transactions that meet these requirements
• Application programmers implement these specifications as programs; then they test, debug,
document, and maintain these canned transactions
• Such analysts and programmers—commonly referred to as software developers or software
engineers—should be familiar with the full range of capabilities provided by the DBMS to
accomplish their tasks.

06/12/2020 RCS 201 27


Database Users…
Workers behind the Scene
 DBMS system designers and implementers-
 design and implement the DBMS modules and interfaces as a software package.
 A DBMS is a very complex software system that consists of many components, or modules,
including modules for implementing the catalog, query language processing, interface processing,
accessing and buffering data, controlling concurrency, and handling data recovery and security.
 The DBMS must interface with other system software, such as the operating system and compilers
for various programming languages.
 Tool developers
design and implement tools—the software packages that facilitate database modeling and design,
database system design, and improved performance.
They include packages for database design, performance monitoring, natural language or graphical
interfaces, prototyping, simulation, and test data generation.
 Operators and maintenance personnel (system administration personnel)
are responsible for the actual running and maintenance of the hardware and software
environment for the database system.
06/12/2020 RCS 201 28
Advantages of Using the DBMS Approach
 Controlling redundancy in data storage and in development and
maintenance efforts.
Sharing of data among multiple users.
 Restricting unauthorized access to data.
the type of access operation—retrieval or update—must also be controlled.
 Providing persistent storage for program Objects
Main reason In Object-oriented DBMSs
 Providing Storage Structures (e.g. indexes) for efficient Query
Processing
 DBMS must provide specialized data structures and search techniques to speed up disk
search for the desired records.

06/12/2020 RCS 201 29


Advantages of Using the DBMS Approach(continued)

• Providing backup and recovery services.


 A DBMS must provide facilities for recovering from hardware or software failures.
• Providing multiple interfaces to different classes of users.
Because many types of users with varying levels of technical knowledge use a
database, a DBMS should provide a variety of user interfaces such as graphical
user interfaces(GUI)
• Representing complex relationships among data.
• Enforcing integrity constraints on the database.
Example specifying a data type for each data item
• Permitting Inferencing and Actions Using Rules and Triggers

06/12/2020 RCS 201 30


Additional Implications of Using the
Database Approach
• Potential for enforcing standards:
This is very crucial for the success of database applications in large organizations. Standards
refer to data item names, display formats, screens, report structures, meta-data (description
of data), Web page layouts, etc.
• Reduced application development time:
Incremental time to add each new application is reduced.
• Flexibility to change data structures:
Database structure may evolve as new requirements are defined.
• Availability of current information:
Extremely important for on-line transaction systems such as airline, hotel, car reservations.
• Economies of scale:
Wasteful overlap of resources and personnel can be avoided by consolidating data and
applications across departments.

06/12/2020 RCS 201 31


Historical Development of Database
Technology
Early Database Applications:
• The Hierarchical and Network Models were introduced in mid 1960s and dominated during
the seventies.
• A bulk of the worldwide database processing still occurs using these models, particularly,
the hierarchical model.
• One of the main problems with early database systems was the intermixing of conceptual
relationships with the physical storage and placement of records on disk. Hence, these
systems did not provide sufficient data abstraction and program-data independence
capabilities.
• Another shortcoming of early systems was that they provided only programming language
interfaces
Relational Model based Systems:
• Relational model was originally introduced in 1970, was heavily researched and
experimented within IBM Research and several universities.
• Relational DBMS Products emerged in the early 1980s.

06/12/2020 RCS 201 32


Historical Development of Database
Technology (continued)
Object-oriented and emerging applications:
• Object-Oriented Database Management Systems (OODBMSs) were
introduced in late 1980s and early 1990s to cater to the need of complex data
processing in CAD and other applications.
• Their use has not taken off much.
• Many relational DBMSs have incorporated object database concepts, leading
to a new category called object-relational DBMSs (ORDBMSs)
• Extended relational systems add further capabilities (e.g. for multimedia data,
XML, and other data types)

06/12/2020 RCS 201 33


Historical Development of Database
Technology (continued)
Data on the Web and E-commerce Applications:
• Web contains data in HTML (Hypertext markup language) with links among
pages.
• This has given rise to a new set of applications and E-commerce is using new
standards like XML (eXtended Markup Language). (see Ch. 27).
• Script programming languages such as PHP and JavaScript allow generation of
dynamic Web pages that are partially generated from a database (see Ch. 26).
• Also allow database updates through Web pages

06/12/2020 RCS 201 34


Extending Database Capabilities
for New Applications
New functionality is being added to DBMSs in the
following areas:
• Scientific Applications i.e high energy physics
• Storage and retrieval of images
• Storage and retrieval of videos
• Data mining applications
• Spatial applications
• Time series applications

06/12/2020 RCS 201 35


Extending Database Capabilities
for New Applications…
• It was quickly apparent that basic relational systems were not very suitable
for many of these applications, usually for one or more of the following
reasons:
■ More complex data structures were needed for modeling the application
than the simple relational representation.
■ New data types were needed in addition to the basic numeric and
character string types.
■ New operations and query language constructs were necessary to
manipulate the new data types.
■ New storage and indexing structures were needed for efficient searching
on the new data types.

06/12/2020 RCS 201 36


Emergence of Big Data Storage Systems
and NOSQL Databases
• New types of database systems were necessary to manage huge
databases—systems that would provide fast search and retrieval as well
as reliable and safe storage of nontraditional types of data, such as social
media posts and tweets.
• Some of the requirements of these new systems were not compatible
with SQL relational DBMSs (SQL is the standard data model and language
for relational databases).
• The term NOSQL is generally interpreted as Not Only SQL, meaning that in
systems that manage large amounts of data, some of the data is stored
using SQL systems, whereas other data would be stored using NOSQL,
depending on the application requirements.
06/12/2020 RCS 201 37
When not to use a DBMS
Main inhibitors (costs) of using a DBMS:
• ■ High initial investment in hardware, software, and training
• ■ The generality that a DBMS provides for defining and processing data
• ■ Overhead for providing security, concurrency control, recovery, and integrity
functions
When a DBMS may be unnecessary:
• If the database and applications are simple, well defined, and not expected to
change.
• If there are stringent real-time requirements that may not be met because of
DBMS overhead.
• Embedded systems with limited storage capacity, where a general-purpose
DBMS would not fit
• If access to data by multiple users is not required.

06/12/2020 RCS 201 38


Bye
Have a good day
The great successful men of the world have used their imaginations.
They think
ahead and create their mental picture, and then go to work
materializing that
picture in all its details, filling in here, adding a little there, altering
this bit and
that bit, but steadily building, steadily building.

06/12/2020 RCS 201 39

You might also like