Database by nabhatti



        Naimatullah   1
• Database system store information in every
  conceivable business environment.
• From large tracking database such as airline
  reservation system to child’s baseball card
  collection, database system store and distribute
  the data that we depend on. Until the last few
  years, large database system could be run only
  on large mainframe computers.
• These machines have traditionally been
  expensive to design, purchase, and maintain.

                      Naimatullah                    2
• Computing technology has made a permanent change in
  the ways business work around the world.
• Information that was at one time stored in warehouse full
  of filling cabinets can know the accessed instantaneous
  at the click of mouse button.
• First a database is an integrated collection of related
  data. Given a specific data item, the structure of a
  database facilitates the access to data related to it, such
  as a student and all of his register courses or an
  employee and his dependents.
• Next, a relational database is a type of database based
  in the relational model;

                           Naimatullah                      3
• Non-relational database commonly hierarchical,
  network, or object-oriented model as their
• Finally, a relational database managements
  system is the software that manages a relational
• These systems come in several variety, ranging
  from single-user desktop systems to full-
  featured, and global enterprise-wide system.

                      Naimatullah                4
• The relational model supports a single “logical”
  structure called a relation, a two dimensional
  data structure commonly called a table in the
  physical database.
• Attributes data elements that are related by the
  relation for example , the customer relation
  might contain such a attributes about the
  customer as the customer number, customer
  name, region, credit status, and so on.

                      Naimatullah                    5
• A primary key is an attribute or group of
  attributes that uniquely identifies a row in a table
• a table only has one primary key, and as a rule,
  every table has one.
• Because primary key values are used as
  identifiers, they cannot be null.
• You can have additional attributes in a relation
  with values that you define as unique to relation.

                        Naimatullah                      6
• Unlike primary keys, unique keys can contain null
• In practice, unique keys are used to prevent duplication
  in the table rather than identify rows.
• Linking one relation to another typically involves an
  attribute that is common to both relations.
• The common attributes are usually a primary key from
  one table and a foreign key from the other.
• Referential integrity rules dictate that foreign key values
  in one relation reference the primary key values in
  another relation.
• foreign keys might also reference the primary key of the
  same relation.

                           Naimatullah                          7
• ENTITY : A thing of significance about which
    information needs to be known.
•   Something that describe or qualifies an entity.
•   ATTRIBUTES :Each of the attributes are either
    required or optional: this state is called
•    In a database. the name or the structure of a
    field is considered to be an attribute of a record.
•   QUERY: In a database management system, a
    method of retrieving and displaying specific data
    from database.

                         Naimatullah                      8
Stored Procedure
• Stored Procedures are SQL Statements that are
  write once and reuse it plenty of times.
• Stored procedure stored in database .
• Stored Procedure reduced traffic between clients
  and database server.
• Retrieving data is easy and fast.
• Data is very secure ,in stored procedure
• Example : if we authenticate user login through
  stored procedure .it is secure method.
                      Naimatullah                9
Types of Databases and
Database Applications
• Traditional Applications:
  – Numeric and Textual Databases
• More Recent Applications:
  –   Multimedia Databases
  –   Geographic Information Systems (GIS)
  –   Data Warehouses
  –   Real-time and Active Databases
  –   Many other applications

                         Naimatullah         10
Basic Definitions
• Data:
  – Raw Data, Unprocessed Data, Facts and Figures.
• Information
  – Processed Data, Meaningful Data,
• Database:
  – A collection of related data.
• Database Management System (DBMS):
  – A software package/ system to facilitate the creation and
    maintenance of a computerized database.
• Database System:
  – The DBMS software together with the data itself.
    Sometimes, the applications are also included.
                            Naimatullah                         11
Typical DBMS Functionality
• Defining a particular database in terms of its data
  types, structures, and constraints
• Constructing or Loading the initial database
  contents on a secondary storage medium
• Manipulating the database:
  – Retrieval: Querying, generating reports
  – Modification: Insertions, deletions and updates to its
  – Accessing the database through Web applications
• Processing and Sharing by a set of concurrent
  users and application programs – yet, keeping all
                      Naimatullah                12
  data valid and consistent
Typical DBMS Functionality
• Other features:
  – Protection or Security measures to prevent
    unauthorized access
  – “Active” processing to take internal actions on
  – Presentation and Visualization of data
  – Maintaining the database and associated
    programs over the lifetime of the database
     • Called database, software, and system
                        Naimatullah               13
Example of a Database
(with a Conceptual Data Model)
• Mini-world for the example:
  – Part of a UNIVERSITY environment.
• Some mini-world entities:
  – (academic) DEPARTMENTs

                    Naimatullah         14
Example of a simple database

             Naimatullah       15
Main Characteristics of the
Database Approach
• Data Abstraction:
  – A data model is used to hide storage details
    and present the users with a conceptual view
    of the database.
  – Programs refer to the data model constructs
    rather than data storage details
• Support of multiple views of the data:
  – Each user may see a different view of the
    database, which describes only the data of
    interest to that user.
                       Naimatullah                 16
Simplified database system

              Naimatullah    17
Database Users
• Actors on the scene
  – Database administrators:
    • Responsible for authorizing access to the
      database, for coordinating and monitoring its use,
      acquiring software and hardware resources,
      controlling its use and monitoring efficiency of
  – Database Designers:
    • Responsible to define the content, the structure, the
      constraints, and functions or transactions against
      the database. They must communicate with the
      end-users and understand their needs.
                         Naimatullah                     18
Categories of End-users
• Actors on the scene (continued)
  – End-users: They use the data for queries,
    reports and some of them update the
    database content. End-users can be
    categorized into:
    • Casual: access database occasionally when
    • Naïve or Parametric: they make up a large section
      of the end-user population.
       – They use previously well-defined functions in the form of
         “canned transactions” against the database.
       – Examples are bank-tellers or reservation clerks who do
         this activity for an entire shift of operations.
                          Naimatullah                            19
Categories of End-users
   • Sophisticated:
      – These include business analysts, scientists, engineers,
        others thoroughly familiar with the system capabilities.
      – Many use tools in the form of software packages that
        work closely with the stored database.
   • Stand-alone:
      – Mostly maintain personal databases using ready-to-use
        packaged applications.
      – An example is a tax program user that creates its own
        internal database.
      – Another example is a user that maintains an address

                         Naimatullah                               20
For More Help Visit My Blogs:
•   Interview Questions and OOP Concepts
•   Fashion Design
•   Contact:
                     Naimatullah              21

To top