4. Contents:
Introduction of Database.
Basic terms of Database.
Flat file Database structures.
Working with Database.
How to create a Database.
Forms and filters.
SQL (Structured query language).
Examples of queries.
RDBMS.
Normalization.
Database at work.
Common Corporate DBMS.
Data warehouse.
Data Mining.
5. • People need data so people create kinds of lists to store and organize it.
• A database is a collection of information that is organized so that it can
easily be accessed, managed, and updated.
• Previously, different departments in a company would design their own
databases with their own copies of data.
• Reduced data redundancy (copies of data).
• Improved data access to users.
• Improved data security.
• Reduced data entry, storage, and retrieval costs.
6. • Entity: An entity is a piece of an object about which data is stored. i.e. Student,
Employee.
• Fields: A field is a combination of one or more related characters or bytes and it is
the smallest of data fields also called attribues or column. i.e. studentID, studentname,
studentsaddress, employeename,emloyeemailaddress.
• Records: Is a group of related fields.
• Tables: Is a complete collection of records make a table.
7. • The most basic way to organize data is as a flat file
• In databases a flat file refers to data files that contain records with
no structured relationships. Flat files may contain only basic
formatting, have a small fixed number of fields, and it may or may
not have a file format.
• A flat file database is a database that stores data in a plain text file.
• Flat file database for certain single user for small group situation.
8. • A data model is a collection of concepts and rules for the
description of the structure of the database.
• Database systems can be based on different data models or
database models respectively.
• Structure of the database means the data types, the constraints
and the relationships for the description or storage of data
respectively.
9. There are four basic types of database:-
• Hierarchical Model
• Network Model
• Relational Model
• Object-oriented Model
10. • Hierarchical Model: A hierarchical database model is a data model in
which the data is organized into a tree-like structure. The data is stored as records
which are connected to one another through links.
• Network Model: The network model is a database model conceived as a
flexible way of representing objects and their relationships.
11. • Relational Model :The relational model for database management is
a database model based on
first-order predicate logic
• Object-oriented Model:
• Object Oriented DBMS Database that stores data elements as objects. Uses of
object-oriented concepts. The term object oriented is abbreviated by OO or O-O
• An object database (also object-oriented database management system) is a
database management system .
12. Relational Database Structures:
• RDBMS are most important database system used in the software
industry today. It was exclusively used to establish the relation the
relationship between two-database objects. One of the database
objects is one table.
13. The BDMS:
• A database management system (DBMS) is system software for
creating and managing databases. The DBMS provides users and
programmers with a systematic way to create, retrieve, update and
manage data in a database.
• The DBMS is perhaps most useful for providing a centralized view
of data that can be accessed by multiple users, from multiple
locations, in a controlled manner.
14. • When you have a lot of data to organize, putting it into a
database can be a big help.
• The DBMS interface present the user with data and the tools
required to work with the data.
• You work with the interface’s tools to perform these data
management functions:
• Creating tables
• Sorting records
• Creating Queries
• Generating reports
15. Querying a Database
• Queries are the primary mechanism for retrieving
information from a database and consist of questions
presented to the database in a predefined format.
• Allow the DBMS to locate records.
• Establish relationship or linked b/w tables to update records.
• List a subset of records.
• Perform calculations.
• Delete obsolete records.
• Perform other data management tasks.
• For example, you might only want to see how many individuals in your
database live in a given city. Or you might only want to see which
individuals have registered with your database within a given time
period.
16. SQL
• SQL stands for Structured query language.
• SQL is used to write query.
• SQL ( Structured Query Language) is a special-purpose programming
language designed for managing data held in a relational database
management system (RDBMS).
• The SQL statements can be used for both interactive queries and
collecting data for reports from relational database.
• There are four common and main queries
1. Select
2. Insert into
3. Delete
4. Update
17. Creating tables
• A table is a collection of related data held in a structured format within
a database.
• It consists of fields (columns), and rows.
• This is the first step in building any database.
• Define each field in the table by following three step:
1.Name the field
2.Specify the field type
3.Specify the field size
• After the table has been set up , now
data can enter in a Table.
18. Sorting Records:
• DBMS is the ability to sort a table of Data, either for a
printed report or for display on the screen.
• For example, a product catalog that lists the products in
alphabetical order or on the basis of unit price is much
easier to use than one that lists the items in random
order.
• When you sort records, you are putting them into
a logical order, with similar data grouped together.
19. Generating Reports
• Not all DBMS operations have to occur on screen.
• A report is printed information that, like a query result, is
assembled by gathering database on user-supplied
criteria.
• In fact, reports generators is most DBMSs create reports
from queries.
• Reports are also similar to forms because their layout can
be customized with object representing fields and other
controls
20. RDBMS
• RDBMS stands for Relational Database Management System.
• A relational database management system (RDBMS) is a
program that lets you create, update, and administer
a relational database.
• Each RDBMS table consists of database table rows. Each
database table row consists of one or more database table
fields.
RDBMS store the data into collection of tables, which might
be related by common fields
(database table columns).
21. • A relationship is a link b/w two tables of
database.
• When a relationship created , a record in one table is
connected to one or many records in another table.
• There are three types of Relationship:
1. One-To-One Relationship
2. One-To-Many Relationship
3. Many-To-Many Relationship
Relationships in RDBMS
22. One-To-One Relationship
• A one-to-one relationship in a relational database occurs when one
parent record or field has either zero or one child record only.
These relationships are the easiest to represent in databases
23. • In relational databases, a one-to-many relationship occurs
when a parent record in one table can potentially reference
several child records in another table.
One-To- Many Relationship:
24. • A many-to-many relationship refers to a relationship between tables
in a database when a parent row in one table contains several child
rows in the second table, and vice versa. Many-to-many
relationships are often tricky to represent.
Many-To- Many Relationship:
25. Keys in Database
• Primary key: is a candidate key that is most appropriate to be the main reference
key for the table.
• Foreign key: is generally a primary key from one table that appears as a field in
another where the first table has a relationship to the second.
• Secondary Key or Alternative Key: A table may have one or more choices for the
primary key. Collectively these are known as candidate keys as discuss earlier. One
is selected as the primary key. Those not selected are known as secondary keys or
alternative keys.
• Candidate Key: A candidate is a subset of a super key. A candidate key is a single
field or the least combination of fields that uniquely identifies each record in the
table.
26. Database normalization
• Database normalization: Database normalization is the process of
organizing the attributes and tables of a relational database to minimize
data redundancy.
• In other words normalization is used to purify database.
• There are 3 form of normalization.
• 1st Normal Form.
• 2nd Normal Form.
• 3rd Normal Form.
27. First Normal Form
• As per First Normal Form, no two Rows of data must contain repeating
group of information.
• Each set of column must have a unique value.
• After Normal 1st form.
28. 2nd Normal Form
• Second Normal Form there must not be any partial dependency of
any column on primary key.
29. Third Normal Form
• Third Normal form applies that every non-prime attribute of table
must be dependent on primary key.
30. Common Corporate DBMS.
• MySQL
• Microsoft SQL Server
• Microsoft Office Access
• Microsoft Visual FoxPro
• PostgreSQL
• SQLite
• Firebird
31. Data warehouse
• In computing, a data warehouse (DW or DWH), also known as an
enterprise data warehouse (EDW), is a system used for reporting
and data analysis. DWs are central repositories of integrated data from one
or more disparate sources.
32. Data Mining
• Data mining is a powerful new technology with great potential
• Data mining, is the computer-assisted process of digging through
and analyzing enormous sets of data and then extracting the
meaning of the data.