0% found this document useful (0 votes)
3 views

Week-1 LECTURE Intro to Module Database and Database Systems

Module CC5051NI focuses on teaching students the analysis, design, and development of database systems, covering both theoretical and practical aspects. The course includes lectures, tutorials, and hands-on workshops, with assessments based on coursework and practical proficiency. Key topics include SQL, database management systems, data modeling, and the evolution from manual file systems to modern databases.

Uploaded by

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

Week-1 LECTURE Intro to Module Database and Database Systems

Module CC5051NI focuses on teaching students the analysis, design, and development of database systems, covering both theoretical and practical aspects. The course includes lectures, tutorials, and hands-on workshops, with assessments based on coursework and practical proficiency. Key topics include SQL, database management systems, data modeling, and the evolution from manual file systems to modern databases.

Uploaded by

himiisheather
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

Module CC5051NI

Databases
Autumn Year: 2024
Agenda
• Structure of Course • Assessment
• Module Leaders • Expectation from students
• Lecturers and Tutors • Topics covered in Data
Modelling and Database
• Module Aim Systems
• Learning Outcomes
Module Aim
• Allows students to understand, and put into practice,
techniques available for Analysing, Designing and
Developing Database Systems.
• To give introduction to issues governing Design and
Implementation of Database Systems.
• To provide Introduction to both Theoretical aspects of
Designing sound Database Systems as well as Practical
aspects of Implementing such Systems.
What is Database?
• Something to store data digitally.

• Stored so that it can be searched and retrieved later

• Usually stored on large computers called servers

• Can create one in your personal computer.

• Represented by Cylinder.
Where is Database used?
• Websites. (as a part of website) to
collect, store and display data

• Desktop Applications

• Phone Applications

• Internal System used by


companies, utilities and more.
Goal of Database
• Database is more than just storing of data

• It's more about solving a problem

• Help in keeping the track of data change

• Solution to the problem that will help you


determine what to store and what the
purpose of storage is and what the
boundary or limit of storage will be.
SQL
• Language used to interact with the database

• Set of commands that can be sent to the

database.

• Commands are sent in form of questions

known as Queries.

• SQL is database independent language so

works on majority of databases.


SQL
• First developed in the 1970s by IBM as way to manage and manipulate data stored in a
database.

• In the early 1980s, the American National Standards Institute (ANSI) and the International
Organization for Standardization (ISO) published the first official SQL standard, which defined
the language and established it as a standard for database management.

• Since then, SQL has become the standard language for interacting with relational databases and
is supported by most RDBMSs, including MySQL, Oracle, and Microsoft SQL Server.
Jobs that you can crack through SQL.
• Data analyst
• Data scientist
• Web developer
• Programmer
• Software engineer
• Business intelligence analyst
• SEO Analyst
• Accountant
Oracle
• Oracle makes software, called database management
systems (DBMS), to create and manage databases.

• An Oracle Database (aka Oracle RDBMS) is a collection of


data organized by type with relationships being
maintained between the different types.

• The primary purpose of an oracle database is to store and


retrieve related information.
Loading and Working with SQL PLUS
• Type CONNECT at SQL Prompt

• Login into Database

• Type Username and Password

• Note: When Typing Password,

password will not be visible, and


cursor will not move
Structure of the Course
❖ 1 Lecture (1.5 hours / week)
❖ 1 Tutorial (1 hours / week)
❖ 1 Computer Lab / Workshop (1.5 hours / week)
❖ Scheduled Learning and Teaching Activities – 45 Hours
❖ Individual practical work using case study and hands on
exercise and Self Study – 105 Hours
Learning Outcomes
•Produce Entity-Relationship model from realistic
Problem Specification
•Use Formal Design Techniques (e.g. Normalisation) to
produce Database Schema
•Design and Implement Database System from
Conceptual Data Model
•Manipulate / Extract data from Database using
Relational Algebra and SQL
•Discuss relative merits of Relational environment
Assessment
Assessment will consist of one component
• Coursework (100 %)
• Followed by compulsory viva
Students will to be assessed on their ability to absorb and
apply Theoretical material such as Design Notation and
Modelling.

MUST ACHIEVE AT LEAST 40% MARKS


Assessment
● Students will be assessed on their ability to Demonstrate
Practical Proficiency of popular DBMS environment
● Assessment strategy ensures that students understand the
Theoretical aspects of subject area and demonstrate Practical
knowledge which they will have acquired during Tutorials /
Workshops with use of Practical Coursework
Indicative Syllabus
• Databases and Database Management Systems
• Data Analysis and Modelling
• Database Models
• Introduction to Database languages and SQL
• Relational Database Theory
• Relational Database Languages
• Relational Algebra
Assessment
• Assessment will consist of single component
• Coursework
• Case study – Introduction, Design and
Implementation (3000 words + a combination of
entities / relationships / queries)
• Submission Week – 12th Week
What is expected from you?
• Attend all Lectures and Tutorial / Seminar sessions / Workshops / Computer Labs

• Come in Tutorial / Workshop classes well prepared for class works.

• Clear your doubts during Tutorial.

• Individual practical work using case study and hands on exercise

• Self Study

• Download Module Specification, Lecture Slides, Tutorials and other materials from LMU or

Google Classroom
Further Reading
• Connolly, T. & Begg, C. Database Systems - A Practical Approach to
Design, Implementation and Management (6th ed.)
• Ritchie, C. Relational Database Principles (2nd Ed.)
• Kroenke, D. Database Concepts
• McFadden, F. R., Hoffer, J. A. & Prescott, M. B. Modern Database
Management (7th Ed.)
• Shah, N. Database Systems Using Oracle
• Kline, K. with Kline, D. SQL in a Nutshell - A Desktop Quick Reference
• Earp, R. & Bagui, S. Learning SQL A Sep-by-Step Guide using Oracle
Introduction to Databases and
Database Design Process
Topics
• Introduction: definitions
• Data and Information
• Metadata
• Database Systems
• Data Modelling
• Database Management Systems
• Database Design Process
• Oracle
Data and information
Data
● Raw, unorganized fact that doesn’t have meaning
● Can be in the form of a number, figure, character, symbol, audio, video and so on
Data and information
Information
● Processed and structured set of data that gives meaning
● Suitable for human interpretation
● Can be used for decision-making
Data and information

Data Processing Information

Process involves acquisition, Information is collective


Data are raw facts; or
Unprocessed information
storage, manipulation, data that have been
retrieval and distribution. processed and
presented in a form
suitable for human
interpretation
Data
Baker, Kenneth 98778373 19.01.83
Bagum, Ammena 97327627 01.02.82
Ako, Sarah 98737373 08.08.83
Finkle, Clive 93838383 09.09.83
Mc Farren, Debra 98383837 01.01.83
Sinseros, Douglas 99344222 27.05.82
Information
Class List for Module Database
Autumn Semester 2023
Student Name Student ID Date of Birth
Baker, Kenneth 98778373 19-JAN-1983
Bagum, Ammena 97327627 01-FEB-1982
Ako, Sarah 98737373 08-AUG-1983
Finkle, Clive 93838383 09-SEP-1983
Mc Farren, Debra 98383837 01-JAN-1983
Sinseros, Douglas 99344222 27-MAY-1982
Information - Relevance

What will you do if you see


What will you do if you see such
such sign while driving ?
sign while driving ?
Data versus Information
• Data constitutes building blocks of Information

• Information produced by processing Data

• Information reveals meaning of Data

• Good, timely and relevant Information keys to decision making

• Good decision making keys to organizational survival


Q. Which of the following statements is correct?

A. Data can only be understood by highly skilled people.

B. Data is described as the processed information.

C. Data refers to the raw and unprocessed facts and figures that have no context or

purposeful meaning.

D. Data is irrelevant facts and is worthless.


Q. Which of the following statements is correct?

A. Data can only be understood by highly skilled people.

B. Data is described as the processed information.

C. Data refers to the raw and unprocessed facts and figures that have no context or

purposeful meaning.

D. Data is irrelevant facts and is worthless.


Manual File Systems
Manual File Systems
● Traditionally composed of collection of File Folders kept in File
Cabinet
● Organization within Folders was based on data’s expected use
(Ideally Logically related)

● System was adequate for small amounts of data with few reporting
requirements
● Finding and using data in growing collections of File Folders became
time-consuming and cumbersome
File Processing Approach
● A file processing system is a collection of programs that
store and manage files in computer hard-disk.
● Traditional approach to Information System Design.
● In a typical file processing system, each department or
area within an organization has its own set of files.
● The records in one file may not relate to the records in
any other file.
● Organizations have used file processing systems for many
years.
File Processing Approach
• Many of these systems, however, have two major weaknesses: they have redundant data and they
isolate data.
• Data separated and isolated.
Five major operations can be performed on file are:
• Creation of a new file.
• Opening an existing file.
• Reading data from a file.
• Writing data in a file.
• Closing a file.
File Processing Approach
• Focuses on data processing needs of individual departments.

• Data often duplicated

• Application programs dependent on file formats

• Files often incompatible with one another

• Difficult to represent data in a user’s perspective


Evolution of Simple File System
• As number of files increased, small file system evolved

• Each file used its own application programs

• Each file was owned by individual or department who

commissioned its creation


File Processing Approach

Account
Customer details Account file
processing

Loan
Customer details Loan file
processing
File Processing Approach
First_name Last_name Phone Address Email
James Smith 12345667 Chicago [email protected]

Last_name First_name Phone Address Email


Smith James 00977-12345667 Chicago, USA [email protected]

Last_name First_name Phone Address Email


7th Eads St Chicago,
Smith Jaames 00977-12345667 USA [email protected]
Bank process
•Account Department

•Deposit Department

•Remittance Department

•Debit Cards, ATM Facilities

•Loan Department

•Notary Service

•Account Closing Department


File Processing Approach
Disadvantages
• Uncontrolled Redundancy

• Inconsistent Data

• Inflexibility

• Limited Data Sharing

• Poor Enforcement of Standards

• Excessive Program Maintenance


Data Redundancy
• Redundancy means having multiple copies of same
data in the database.

• Data Redundancy results in data inconsistency as


different versions of same data appear in different
places

• Errors more likely to occur when complex entries are


made in several different files and recur frequently in
one or more files
Data Redundancy issue
● Inconsistencies: If any one customer updates his address or phone number, the bank needs to ensure that all

instances of his data are updated. Failure to do so can lead to inconsistencies in customer records.

● Wasted Storage: Storing the same data multiple times consumes more storage space than necessary.

● Data Integrity: If updates are made to one instance of customer’s data but not others, it can lead to

discrepancies and impact the integrity of the data.

● Increased Maintenance: When changes need to be made to customer data, they have to be made in multiple

places, which increases the complexity of maintenance and the likelihood of errors.
Data Redundancy issue
● Security Concerns: Storing redundant data increases the surface area for potential security breaches. If

one set of data is compromised, it can lead to leaks in multiple systems.


Data Anomalies
• Also known as irregularity.
• Update (Modification) Anomalies
▪Occur when changes must be made to existing records
• Insertion Anomalies
▪Occur when entering new records
• Deletion Anomalies
▪Occur when deleting records
Database Concept
Database
• It is collection of interrelated data stored
together without unnecessary redundancy to
serve multiple operations.
• Databases can store, manipulate and retrieve data
• Used across wide range of organizations
• Single user to hundreds (or thousands) of users
Database vs. File System
• Problems inherent in File Systems make using a Database System desirable
• File system
▪Many separate and unrelated files
• Database
▪Logically related data stored in a single Logical Data Source
Database Management System
A group of programs or software which allows data organised in a database to
be added to, deleted, modified or retrieved.
Contrasting Database and File
Systems
Objectives of Database System
• Database must be shared by community of users.

• Integrity of Database must be preserved.

• Database should integrate operational files of corporate

organization.

• Database should be capable of evolving, both in short

term and in longer term.


Key Message

DATABASE DBMS END USER

DBMS acts as Facilitator/Interface


for us to Interact with Database
Database Model
• Prior to building a house, an architect
gathers the client's requirements and
creates a blueprint of the house.

• Blueprints sets guidelines to achieve the


set results.

• Only after the blueprint is finalized, the


construction work starts.
Database Model
● A database model is a blueprint for the database that can be implemented later.
● It is something that determines the logical structure of a database.
● It also determines how records are stored in the database and how relationships between
records are established.
Types of Database Model
○ Hierarchical database model
○ Network database model
○ Relational model
○ Entity-relationship model
○ Object-oriented model
○ Centralized database model
○ Graph database model
○ Document database model
MetaData
•Database is self-describing, which means that it contains description of its structure as part of itself.

•This description of structure is called metadata.

Name Type Length Description


Student Character 50 Student’s full name
Unique identification
Student ID Number 8
number for each student
Student’s date of birth in
Date of Birth Date 8
the format ’01.01.80’
MetaData in Microsoft Access and Oracle
Data in Microsoft Access and Oracle
Database Processing Systems Users/Programmers

• Integrated Data Database


System
Application Programs/Queries
• Reduced Data Duplication
• Program / Data Independence DBMS
Software
Software: Query Processing & Programs
• Easier Representation of Users
Perspectives
Software: Data Access
• A database processing system
is a combination of machines,
people, and processes
involved in the database Database Database
Definition
DBMS Functions
• Performs functions that guarantee integrity and consistency of data

▪ Data Dictionary Management: Defines data elements and their

relationships.
▪ Data Storage Management: Stores data and related data entry forms,

report definitions, etc.


▪ Data Transformation and Presentation: Translates logical requests into

commands to physically locate and retrieve the requested data


DBMS Functions
•Security Management: enforces user
security and data privacy within database
•Multi-User Access Control: creates
structures that allow multiple users to access
data
•Backup and Recovery Management:
provides backup and data recovery.
DBMS Functions
•Data Integrity Management: promotes and enforces
integrity rules to eliminate data integrity problems
•Database Access Languages and Application
Programming Interfaces: provides data access
through a query language
•Database Communication Interfaces: allows
database to accept end-user requests within a
computer network environment
Advantages of Database System
• Avoidance of unnecessary duplication of data.

• Multiple use of data

• It follows that although data is input once, can be used for several purposes.

• Database provides data for organization as whole, not just for individual departments.

• Organization of data into Database, rather than into separate files, encourages integration of

data.
• Because data held only once, easier to ensure that it’s up-to-date.
Database Design Process
• Main phases in Database Design Process
• Requirements collection and analysis: Fact finding (interviews, observation, looking
at current data)
• Conceptual Database Design: Entities, ER modelling, function specs.
• Choice of DBMS
• Data Model mapping (logical database design): ER model 🡪 Relations,
Normalization
• Physical Database Design: Indexes, physical storage etc.
Database Users
• Users are differentiated by way they expect to interact with system
• Application programmers – interact with system through DML.
• Sophisticated users – form requests in Database query language

• Specialized users – write specialized Database applications that do not fit into traditional
data processing framework (knowledge base and expert systems, CAD, etc)
• Naïve users – invoke one of permanent application programs that have been written
previously. E.g. people accessing database over web, bank tellers, clerical staff
Database Administrator
• Coordinates all activities of Database system (has a good
understanding of enterprise information resources and needs)
• Database Administrator's duties include
• Schema definition
• Storage structure and access method definition
• Schema and physical organization modification
Database Administrator
• Database Administrator's duties include
• Granting user authority to access Database
• Specifying integrity constraints
• Acting as liaison with users
• Routine Maintenance
• Monitoring performance, responding to changes in requirements, backups, etc.
About Oracle Database XE
Oracle Database Express Edition (XE) is a free, lightweight, and entry-level
version of the Oracle Database software designed for small-scale development,
testing, and educational purposes.
Key features of Oracle Database XE include:
• Free to Use
• Limited Resources
• User-Friendly Installer
• Data Security
About Oracle Database XE
1. SYS user is the superuser in Oracle Database.

• It has highest level of administrative privileges and is responsible for


managing the database.
• The SYS user is used for tasks like database creation, configuration, and
maintenance.
2. SYSTEM user has administrative privileges but lower than the "SYS” user.
3. USERS in Oracle provide a flexible and organized way to manage user permissions.

• This role-based approach enhances security, simplifies administration, and


promotes consistent access control across the database environment.
About Oracle Database XE
Sys: perform all administrative
Sys: owns the oracle functions
data dictionary System: perform all
administrative functions
SYSTEM: the Excepts for Backup, recovery, and
master DBA user Database upgrade
USER User: Someone who can connect to a
database
Different views of users in the database
• DBA_USERS: It is a system view in Oracle Database that provides information about all users in the
database and is accessible to administrators only (DBAs)

• Example query: SELECT * FROM DBA_USERS;

• ALL_USERS: Provides information about all users visible to the currently logged-in user and accessible to
the querying user.

• Example query: SELECT * FROM ALL_USERS;

• USER_USERS: Placeholder or potentially a custom view name that needs to verify its existence or context in
specific database environment.

• Example query: SELECT * FROM user_users;


Types of users
SELECT * FROM dba_users;
•DBA_USERS SELECT * FROM all_users;
SELECT * FROM user_users;
•ALL_USERS
DBA Users List the users in the Oracle
•USER_USERS Database:

All users
User
users

You might also like