0% found this document useful (0 votes)
15 views30 pages

Lecture1 Intro

The document provides an introduction to database systems, covering topics such as the relational model, data versus information, and the importance of database management systems (DBMS). It outlines the structure of a database, the significance of data integrity, and the challenges associated with flat file storage. Additionally, it discusses various data models and the application of DBMS in building efficient applications.

Uploaded by

ahmadansarii302
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views30 pages

Lecture1 Intro

The document provides an introduction to database systems, covering topics such as the relational model, data versus information, and the importance of database management systems (DBMS). It outlines the structure of a database, the significance of data integrity, and the challenges associated with flat file storage. Additionally, it discusses various data models and the application of DBMS in building efficient applications.

Uploaded by

ahmadansarii302
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

01|Course Intro & Relational Model

Database Systems
Ms. Iqra Safder
Visiting Faculty Member
Information Technology University (ITU)
Today’s Agenda
• Overview
• Course Logistics
• Data vs Information
• File System Critics
• Database Management Systems
• Data Models

2
Project
• For the project
– lot of programming will be required

Databases
– in a high-level language of your own choosing (or rather
your team’s choosing)
– could be Java, C, C++, Perl, Python, etc.
– must know how to build a Web based application or be
willing to learn
• Project will be done in group of 3-4 students
3
Data vs Information
Example:
• A car company has two divisions and the two division has
1,380,456 and 1,453,907 invoices, respectively.
• Each invoice has invoice number, date, and amount

• The period is from the first quarter of 1997 to first quarter of 2002
• Total 2,834,363 (>2M) records

4
Data vs Information
… … …

Data 3000124 12-Jan-2002 $121.98

… … …

Information:----------?
5
6
Data vs Information
• Data constitute building blocks of information.

• Information produced by processing data.

• Information reveals meaning of data.

• Good, timely, relevant information is key to decision making.

• Good decision making is key to organizational survival

7
Data vs Information
Data Information
Data is unorganized raw facts that need processing Information is a processed, organized data presented in a
without which it is seemingly random and useless to given context and is useful to humans.
humans

Data is an individual unit that contains raw material Information is a group of data that collectively carry a
which does not carry any specific meaning. logical meaning.

Data doesn’t depend on information. It is measured in Information depends on data. Information is measured in
bits and bytes. meaningful units like time, quantity, etc.

Data is never suited to the specific needs of a designer. Information is specific to the expectations and
requirements because all the irrelevant facts and figures
are removed, during the transformation process.

An example of data is a student’s test score The average score of a class is the information derived
from the given data.
8
Database
• Database is shared, integrated computer structure
that stores a collection of data:
– End user data (raw data)
– Metadata (data about data, it contains data
characteristics and relationships)
• Organized collection of inter-related data that
models some aspect of the real-world.
• Databases are the core component of the most
computer applications.
9
Database Example
• Create a database that models a digital music store to
keep track of the artists and their albums.

• Things we need to store:


– Information about Artists
– What Albums those Artists released

10
Flat File Strawman
• Store our database as comma-separated value
(CSV) files that we manage in our own code.
– Use a separate file per entity (Artist & Album).
– The application has to parse the files
each time they want to read/update records.

11
Flat File Strawman

• Create a database that models a digital music store.

12
Flat File Strawman

Example: Get the year that Ice Cube went USA

13
Flat File : Data Integrity
• How do we ensure that the artist is the same for each
album entry?

• What if somebody overwrites the album year with


• an invalid string?

• How do we store that there are multiple artists on an


album?
14
Flat File : Implementation
• How do you find a particular record? For billions records, scanning
& parsing every time.

• Data Dependence
– Change in file’s data characteristics requires modification of
data access programs
– Must tell program what to do and how to do
• Structural Dependence
– Change in file structure requires modification of related
programs 15
Flat File : Implementation

• What if we now want to create a new application that


uses the same database?
• What if two threads try to write to the same file at the
same time?

16
Flat File : Durability
• What if the machine crashes while our program is updating a record?

• What if we want to replicate the database on multiple machines for high


availability?
• Data Redundancy: (Unnecessary Duplication of data)
– Results of uncontrolled data redundancy
• Data anomalies
– Modification
– Insertion
– Deletion
• Data inconsistency (Different and conflicting versions of same data)
– Lack of data integrity

17
Database Management
• Database Management System (DBMS): software
system (collection of software) help to manage the
data contents
– Manages Database structure
– Controls access to data
– Contains query language

18
19
Importance of DBMS
• Makes data management more efficient and effective.
• Query language allows quick answers to ad hoc
queries.
• Provides better access to more and better-managed data.
• Promotes integrated view of organization’s operations.
• Reduces the probability of inconsistent data.
• Improved data sharing.
• Improved data security.
20
Database Industry
• Relational databases are a great success of theoretical ideas.
• Big DBMS companies are among the largest software
companies in the world.
• Oracle
• IBM (with DB2)
• Microsoft (SQL Server, Microsoft Access)
• Others
• $54B industry.
21
Building an Application with a DBMS
• Requirements modeling (conceptual, pictures)
• Decide what entities should be part of the application and how they
should be linked.
• Schema design and implementation (Conceptual and
Implementation Models)
• Decide on a set of tables, attributes.
• Define the tables in the database system.
• Populate database (insert tuples).
• Write application programs using the DBMS
• way easier now that the data management is taken care of.
22
Conceptual Modelling
name category name
cid
ssn
Takes Course
Student
quarter
Advises Teaches
Professor

address name field 23


Data Model

• A data model is collection of concepts for describing the data in a


database.
• Conceptual Models: logical nature of data representation;
it emphasizes on what entity is presented; it is used for
database design as blueprint
• Implementation Models: emphasis on how the data are
represented in the database

• A schema is a description of a particular collection of data, using a


given data model. 24
Data Model : Implementation Models
• Relational
• Key/ Value
• Graph
• Document
• Column-family
• Array / Matrix
• Hierarchical
• Network
25
Data Model : Implementation Models
• Relational • Most Database
• Key/ Value • RDBMS
• Graph • Comprises of tables, rows
• Document and columns
• Column-family
• Array / Matrix
• Hierarchical
• Network
26
Data Model : Implementation Models
• Relational • NoSql
• Key/ Value • Other than the tabular relations
• Graph • Big data and real-time web apps
• Document • Examples: MongoDB, HBase
• Column-family
• Array / Matrix
• Hierarchical
• Network
27
Data Model : Implementation Models
• Relational
• Key/ Value
• Graph
• Document
• Column-family • Machine Learning
• Array / Matrix • DataFrames
• Hierarchical
• Network
28
Data Model : Implementation Models
• Relational
• Key/ Value
• Graph
• Document
• Column-family
• Array / Matrix
• Hierarchical • Obsolete / rare
• Network • FileSystems
29
Data Model : Implementation Models
• Relational • Most Database
• Key/ Value • RDBMS
• Graph • Comprises of tables, rows
• Document and columns
• Column-family
• Array / Matrix
• Hierarchical
• Network
30

You might also like