Lecture1 Intro
Lecture1 Intro
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
… … …
… … …
Information:----------?
5
6
Data vs Information
• Data constitute building blocks of information.
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.
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
12
Flat File Strawman
13
Flat File : Data Integrity
• How do we ensure that the artist is the same for each
album entry?
• 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
16
Flat File : Durability
• What if the machine crashes while our program is updating a record?
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