1 New Unit I Date

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

UNIT – I (WEB TECHNOLOGY)

DATABASE CONCEPT

DBMS(Database management System)

Database management System is a software package that allows data to be


effectively stored, retrieve and manipulate. The data contains in a DBMS
package can be accessed by multiple application programs and users.
Application packages such as mysql, sql server, oracle, Ms-Access are
the examples of commercially available DBMS packages.

Database Applications:

Banking: all transactions


Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions

Database :- A database is a collection of related file it is an organized collection of


facts.

File :- A file is a collection of related records .

Field :- The smallest piece of meaningful information in a file is called a data item or field

Record :- The collection of related fields with actual information is called a record .

Data :- Data is raw facts which can be manipulated. Data is required in the operation of
any organization

Information :- Information is the manipulation of data which is summarized in data


presentable form .
Database ----> Student
File ------>XIICT
Field ----->RollNo name Address Class

Fields rollno name Address Class


001 Jonas Pilar xiict
1208 Alonza Vasco xiict
123 Johan Cortalim xiict
007 Nathan Panjim xiict
Characteristics of DBMS

1) It represents complex relationships among different data


2) It keeps a tight control of data Redundancy
3) Enforces user defined rules to ensure the integrity of data
in the table form.
4) It has a centralized data dictionary for the storage of
information related to database and data manipulation.
5) It ensures that data can be shared across all the
application.
6) It has an automatic intelligent backup and recovery procedure
of data.

Advantages of DBMS

1. Reduction of Redundancies: Centralized control of data by the


DBA avoids unnecessary duplication of data and effectively
reduces the total amount of data storage required. It also
eliminates the extra processing necessary to trace the
required data in a large mass of data.
2. Shared Data: A database allows the sharing of data under its
control by any number of application programs or users.
3. Integrity: Centralized control can also ensure that adequate
checks are incorporated in the DBMS to provide data integrity.
Data integrity means that the data contained in the database
is both accurate and consistent.
4. Security: Data is of vital importance to an organization and
may be confidential. Such confidential data must not be
accessed by unauthorized persons. The DBA who has the ultimate
responsibility for the data in the DBMS.
5. Conflict Resolution: Since the database is under the control
of the DBA, he/she should resolve the conflicting
requirements of various users and applications.

Disadvantages of DBMS
1. Cost of software/hardware and migration: The cost of
purchasing or developing the software, the hardware has to be
upgraded to allow for the extensive programs.
2. Problem associated with centralization: While centralization
reduces duplication, the lack of duplication requires that
the database be adequately backed up so that in the case of
failure the data can be recovered. Centralization also means
that the data is accessible from a single source.
3. Complexity of Backup and Recovery: Backup and recovery
operations are fairly complex in a DBMS environment.
DBMS USERS

Classification of DBMS users : The users of a database system can be


classified in the following groups depending on their degree of expertise
or the mode of their interactions with the DBMS.

1) Naive Users:- Users who need not be aware of the presence of the
database system or any other system supporting their usage are considered
naïve users. A user of an automatic teller machine fall in this category.

2) Online Users:- Online users are those who may communicate with the
database directly via online terminal or indirectly via user interface
and application program. These users are aware of the presence of the
database System.

3)Application programmer:-

Application programmer are the professional programmer who are


responsible for developing application programs or user interface
utilized by the naïve and online users fall into this category.

4)Database Administrator :- Centralized control of the database is


exerted by a person or group of persons under the supervision of a high
level administration. This person or group is referred to as the
database administrator (DBA), who are familiar with the database.

Data Independence:-

Allows a database to change its structure. It means data can be


added and deleted or data attributes alter with minimum disruption to
existing system.

a) Logical Data Independence:-

Logical Data Independence includes application programs from


logical operations such as combining two records into one or splitting
an existing record into two or more records .

b) Physical Data Independence:-

Physical Data Independence indicates that the physical storage


structures or devices used for storing data could be changed without
requiring a change in the record structure or application program.
Types of database language:-

a) DDL(Data Definition language )


b) DML(Data Manipulation Language)
c) DCL(Data Control Language)
a)DDL:-DDL is used to define data and their relationship to other
types of data. It is mainly used to create files, database, data
dictionary and tables within database.

b) DML:-It deals with processing or manipulation of various database


objects. It helps you to navigate through the records, add new records
and change or delete existing records.

c) DCL:-It is a language which is used to impose security features and


prevent unauthorized access to data in the database.

3-Level Architectural Proposal of DBMS

1) Internal Level:-

Internal Level of the DBMS is the one which is closest to the physical
aspects of data storage. It refers to how data are actually store on
the physical storage medium such as hard disk etc. The internal level of
DBMS architecture is also known as the physical level.

2) Conceptual Level:-

Conceptual level is also called as logical level of DBMS architecture


deals with what data are stored in a database and the relationship among
data items. Users involve in these level are concerned with the business
logical of the database and decide what data types are required for
different data stored in a database, how these data items must be related
with one another and how the changes may be in one data item should
affect the other data item in the database.
3) External Level:-

External level may also called as view level since it is very close to
the end users. The level deals with the way in which individual users
view data. Individual users are given different views according to the
users requirement a view involves only those portions of a database which
are of concern to a user. Therefore same database can help different
views or different users.

Data Redundancy: Redundancy is unnecessary duplication of data . eg. if


account department and registration department both keep student name,
number and address. Redundancy wastes space and duplicates efforts in
maintaining the data.

Redundancy also lead to inconsistency. Inconsistent data is data which


contradicts it. Two different addresses for a given student number.
Inconsistency cannot occur if data is represented by a single entry ie
if there is no redundancy.

Controlled redundancy some redundancy may be desirable. A DBMS should


be aware of it, and take care of propagating updates to all copies of a
data item.

Null Value concept

Null is a term used to represent a missing value. A null value in a table


is a value in a field that appears to be blank.

A field with a null value is one that has been left back during the record
entry eg.may not have a middle name signify a null value.

A field with a null value is a field, which is, not assign a value. A null
value is different from a zero value or a field that contains spaces:

Database Design

Schema The schema is the physical arrangement of the data as it


appears in the DBMS. Mean an overall plan of all the data item
(field) types and record types stored in a database. Schema
includes the definition of the database name, the record type and
the components that make up those records. Schema gives the names
of the entities and attributes.
Subschema:-

The term subschema refers to the application programmer’s views of the


data items and record types, which the user would, used. Many subschema
can be derived from one schema it is also referred as logical view.

Database Security

Database security include policies frame to protect data in a database.


Security also includes the techniques used to ensure that data elements
are not accessed, altered or deleted by unauthorized users.

1)Privacy of data:-

Privacy relates to the legal and critical rights regarding the access to
certain personal data items some critical information may be regarded as
private example:- The medical record of a person which cannot be
accessed, read or modified by unauthorized persons.

2) Preserving policies of the organization:-

Some government, institutional or co-operate level organization have


specific policies as to what kind of information should be made publicly
available for example:- persons credit ratings and medical records should
never be made public.

3) System related security level:-

The level of the system at which the security should be enforced for
example security should be enforced at the hardware level, os (operating
system) level or DBMS level.

4) Database Integrity:-It is the mechanism used to ensure that the data


in the database is correct and consistent

5) Access Control:-

Restricting database access only to authorized users can be implemented


by access control mechanism. The database administrator (DBA) as the
responsibility of granting access permission and user account to various
users of a database
Relational Model(RDBMS)

Definition of relation

All data and relationship are represented in a two dimensional table


called a relation. A database constructed using relations is called as
relational database . Relational database is constructed from
arrangements of data items.

Fields Emp-code Name Year


Attributes 101 Ramu 3
102 Sonu 4
103 Monu 8
104 Meena 3

A relation consist of number of records or row wise information (Tuple)


and Column wise information attributes .

Tuples:-A relation consist of number of records or row wise information.

Attributes:-The column wise information present in the Entity set are


called attributes.

Domain:-A Domain is a collection of all possible value from the given


column or attribute is drawn. There are Domain defined for every
attributes in each of the tables

Entities:-

An Entity is an object that exist and is distinguishable from other


objects. And Entity is a real word person , place or thing or a conceptual
(logical person), place or things of significant interest to the
organization and about which the authorization must collect and maintain
data for example:-Employee entity may be described by employees name,
address and age.

Entity and the value of it's attributes

Entity

Name

Employee Address

Age
Key Concept

A DBMS key is an attribute or set of an attribute which helps you to


identify a row(tuple) in a relation(table). They allow you to find the
relation between two tables. Keys help you uniquely identify a row in a
table by a combination of one or more columns in that table.

example:-account no, product code, employee no, and customer no are used
as key field because they identify a record stored in a database.

1) Primary Key:-

The field or group of field that forms the unique identifier for a table
is called the tables primary key. The primary key uniquely identifies
each records in a table and must never be the same for two records.
for example:- employee code, can be primary key for the entity set
employees. The primary key should be chosen such that its attributes are
never or very rarely changes for instance the address field of a person
should not be part of the primary key since it likely to change.

2) Super Key:-

A super key for an entity is a set of one or more attributes whose


combined value uniquely identifies the entities in the entities set
for example:- for an entity set employees the set of attributes(Name,
Address ) can be considered to be a super key. If we assume that there
are no two employees with the same name and same address.

3) Candidate Key:-

It is an attribute or set of attribute that uniquely identifies a record


these attributes or combination of attributes are called candidate keys.
In such a case one of the candidate key is chosen to be a primary key .
The remaining candidate keys are called alternate keys. There is only
one primary key in a table but there can be multiple candidate keys.

4) Composite Key:-

In many cases we design a database we will have tables that will use
more than one column as a part of primary key these are called as
composite key. When a record cannot be uniquely identified by a single
field in such cases a composite key is used . A composite key is a group
of fields that uniquely identifies a record.

5) Secondary Key:-

Secondary Key is the key that has not been selected to be the
primary key. Therefore, a candidate key not selected as a primary key is
called secondary key. A secondary key is an attribute or combination of
attributes that may not be a candidate key.

6) Foreign Key:-

In a relation column, whose data values correspond to the values of a


key column in another relation is called a foreign key. In relational
database, the foreign key of relation would be the primary key of another
relation. Hence, the foreign key is useful in linking together two
tables.

Integrity Rule

When many users enter data items into database it becomes very important
that the data items and association among data items are not destroyed
hence data insertions, it's updating have to be carried In such a way
that the database integrity is not effected .

Integrity checks can be performed at the data level itself by checking


that data values contained in certain specific groups

Integrity Rule 1 - Entity Integrity

If an Attribute of a table is prime attributed (unique identifier) it


cannot accept null values or in other words no component of a primary
key values may be null.

Integrity Rule 2-Referential Integrity

A value that appears in one relation for a even set of attributes also
appears for a certain set of attributes in another relation .

Referential Integrity is controlled through the use of primary and


foreign key in a table. A foreign key is a single field directly
references a primary key in another table to enforce referential
integrity.
Entity-Relationship Data Model (E-R Model)
Draw the Entity-Relationship Data Model (E-R Model) for the following and explain the same.

1. Library System.
2. Admission of students
3. Banking Management
4. Hospital Management
5. Payroll System

1. Library System.

In the above Library ER model there for four entities/Tables :


Member,Book,publisher and supplier. Each table have their own attributes and is link to
the next table by a relationship. Here MEMBER table with attributes : member id,
name,address,mem-type,mem-date,expiry is link to BOOK table by a relationship
“Borrowed by”. And then BOOK table with attributes (book,title,author,available,price) is
link to PUBLISHER table (Pub_id,name,address) by a relationship “published by” and
then again the BOOK table is link to SUPPLIER table (sup_id,name,address) by a
relationship “supplied by”. This is how the ER model works.
2. Admission of students.

In the above Student admission ER model there for three entities/Tables :


Student, admission and staff. Each table have their own attributes and is
link to the next table by a relationship. Here STUDENT table with
attributes : Sno,sname,fname,address,caste,religion,dob is link to
ADMISSION table by a relationship “Admins”. Then again STUDENT Table is
again link to STAFF table (staff-id, name, address, subjects, experience,
paybill) by a relationship “Taught”.

Two above ER Model I have explain remaining 3 model u’ll explain. First
draw then explain. Then draw the next n explain and so on….
3. Banking System
4. Hospital System
5. Payroll

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy