This document provides an introduction to databases. It defines what a database is, the steps to create one, and benefits such as fast querying and flexibility. It describes database models like hierarchical, network, entity-relationship, and relational. Key database concepts are explained, including entities, attributes, primary keys, and foreign keys. Finally, it outlines database management system components, common users, and introduces Microsoft Access.
2. Outline
β What is a Database?
β Database creation steps
β Benefits of using Database
β Types of Table Relationships
β What is a Database model
β Database Management System
β Users of Database
β MS Access
3. What is a Database?
β A database is one of the important components for many applications and is used
for storing a series of data in a single set.
β In other words, it is a group/package of information that is put in order so that it can
be easily accessed, managed and updated.
β There are different types of database. They are:
β Bibliographic
β Full-text
β Numeric
β Images
β In a database, even the smallest portion of information becomes the data.
4. Database creation steps
β There are five steps to create a database:
β Create a database
β Define the fields in the database
β Define the views in the database
β Set permissions on the database
β Create database reports
5. Benefits of using Database
β For large amount of data having many different entities, designing and
implementing database can be very useful.
β Following are the few benefits we can avail using database:
β Fast query
β Multiple users
β Portability
β Flexibility
β longevity
6. Types of Table Relationships
β Relationship works by matching data in key columns, usually columns that have
same name.
β There are three type of table relationships in DBMS:
β One-to-One
β One-to-Many
β Many-to-Many
10. What is a Database model
β A database model determines the logical structure of a database and how will
be data store, organized and manipulate.
β There are mainly three types of database models:
β Hierarchical
β Network
β Entity-relationship
β Relational
11. Hierarchical
β Data into a tree-like structure, with a single root, to which all the other data is
linked. The hierarchy starts from the Root data, and expands like a tree, adding
child nodes to the parent nodes.
β In other words, data is organized into tree-like structures with one, one-to-many
relationship between two different types of data.
β For example, one department can have many courses, many professors and off-
course many students.
12. Network
β This is an extension of the Hierarchical model.
β In this model, data is organized more like a graph, and are allowed to have
more than one parent node.
β In this database model data is more related as more relationships are
established in this database model.
β Also, as the data is more related, hence accessing the data is also easier and
fast. This database model was used to map many-to-many data relationships.
β This was the most widely used database model before Relational Model was
introduced.
13. Entity-relationship
β In this database model, relationships are created by dividing the object of
interest into an entity and its characteristics into attributes.
β Let's take an example, if we have to design a School Database, then Student
will be an entity with attributes name, age, address etc.
β As Address is generally complex, it can be another entity with attributes street
name, pin code, city etc., and there will be a relationship between them.
14. Relational
β In this model, data is organized in two-dimensional tables and the relationship
is maintained by storing a common field.
β The basic structure of data in the relational model is tables.
β All the information related to a particular type is stored in rows of that table.
16. Entity
β An Entity is generally a real-world object which has characteristics and holds
relationships in a DBMS.
β If a Student is an Entity, then the complete dataset of all the students will be the Entity
Set.
17. Attribute
β If a Student is an Entity, then student's roll no., student's name, student's age,
student's gender etc. will be its attributes.
β An attribute can be of many types, here are different types of attributes defined
in the ER database model:
β Simple attribute: The attributes with values that are atomic and cannot be broken
down further are simple attributes. For example, a student's age.
β Composite attribute: A composite attribute is made up of more than one simple
attribute. For example, student's address will contain, house no., street name, pin
code etc.
18. Attribute
β Derived attribute: These are the attributes which are not present in the whole
database management system but are derived using other attributes. For example,
the average age of students in a class.
β Single-valued attribute: As the name suggests, they have a single value.
β Multi-valued attribute: And, they can have multiple values.
19. Keys in DBMS
β Key is defined as the column or attribute of the database table.
β Keys are used to identify each record in the database table.
β Properties of good Key:
β Unique Identification
β Non-Redundancy
β Following the the types of Keys:
β Primary Key
β Super Key
β Foreign Key
20. Primary Key
β A column or group of columns in a table which helps us to uniquely identifies every row
in that table is called a primary key. This DBMS can't be a duplicate. The same value can't
appear more than once in the table.
β Rules for defining Primary key:
β Two rows can't have the same primary key value
β It must for every row to have a primary key value.
β The primary key field cannot be null.
β The value in a primary key column can never be modified or updated if any foreign key
refers to that primary key.
21. Super Key
β A super key is a group of single or multiple keys which identifies rows in a table.
β A Super key may have additional attributes that are not needed for unique identification.
22. Foreign Key
β A foreign key is a column which is added to create a relationship with another table.
β Foreign keys help us to maintain data integrity and also allows navigation between two
different instances of an entity.
β Every relationship in the model needs to be supported by a foreign key.
23. Components
β The database management system can be divided into five major components, they are:
β Hardware
β Software
β Data
β Procedures
β Database Access Language
24. Hardware
β When we say Hardware, we mean computers, hard disks, I/O channels for data,
and any other physical component involved before any data is successfully
stored into the memory.
β When we run Oracle or MySQL on our personal computer, then our computer's
Hard Disk, our Keyboard using which we type in all the commands, our
computer's RAM, ROM all become a part of the DBMS hardware.
25. Software
β This is the main component, as this is the program which controls everything.
β The DBMS software is more like a wrapper around the physical database, which
provides us with an easy-to-use interface to store, access and update data.
β The DBMS software is capable of understanding the Database Access Language
and interpret it into actual database commands to execute them on the DB.
26. Data
β Data is that resource, for which DBMS was designed. The motive behind the
creation of DBMS was to store and utilize data.
β In a typical Database, the user saved Data is present and metadata is stored.
β Metadata is data about the data. This is information stored by the DBMS to
better understand the data stored in it.
β For example: When I store my Name in a database, the DBMS will store when
the name was stored in the database, what is the size of the name, is it stored
as related data to some other data, or is it independent, all this information is
metadata.
27. Procedures
β Procedures refer to general instructions to use a database management system.
β This includes procedures to set up and installs a DBMS, to login and logout of
DBMS software, to manage databases, to take backups, generating reports etc.
28. Database Access Language
β Database Access Language is a simple language designed to write commands to
access, insert, update and delete data stored in any database.
β A user can write commands in the Database Access Language and submit it to
the DBMS for execution, which is then translated and executed by the DBMS.
β User can create new databases, tables, insert data, fetch stored data, update
data and delete the data using the access language.
29. Users of Database
β Database Administrators
β Database Administrator or DBA is the one who manages the complete database
management system.
β DBA takes care of the security of the DBMS, it's availability, managing the license
keys, managing user accounts and access etc.
β Application Programmer or Software Developer:
β This user group is involved in developing and designing the parts of DBMS.
β End-User:
β End users are the one who stores, retrieve, update and delete data.