Database
> Shared collection of logically related data (and a description of this
data), designed to meet the information needs of an organization.
> Systemcatalog (metadata) provides description of data to enable
program–data independence.
> Logically related data comprises entities, attributes, and relationships
of an organization’s information.
Database Management System(DBMS)
> A softwaresystemthatenables users to define, create, maintain, and
control access to the database.
> (Database) application program: a computer program that interacts
with databaseby issuing an appropriaterequest (SQL statement) to the
DBMS.
Database Approach
Data definitionlanguage (DDL).
>Permits specification of data types, structures and any data constraints.
>All specifications are stored in the database.
Data manipulationlanguage (DML).
>General enquiry facility (query language) of the data.
Components of DBMS Environment
Hardware
Can range froma PC to a network of computers.
Software
DBMS, operating system, network software(if necessary) and also the
application programs.
Data
Used by the organization and a description of this data called the
schema
Procedures
Instructions and rules that should be applied to the design and useof
the databaseand DBMS.
People
Roles in the Database Environment
>Data Administrator (DA)
>Database Administrator (DBA)
>Database Designers (Logicaland Physical)
>Application Programmers
>End Users (naive and sophisticated)
Advantages of DBMSs
>Control of data redundancy
>Data consistency
>More information fromthe same amount of data
>Sharing of data
>Improved data integrity
>Improved security
>Enforcement of standards
>Economy of scale
>Balance conflicting requirements
>Improved data accessibility and responsiveness
>Increased productivity
>Improved maintenancethrough data independence
>Increased concurrency
>Improved backup and recovery services
Disadvantages of DBMSs
>Complexity
>Size
>Cost of DBMS
>Additional hardwarecosts
>Cost of conversion
>Performance
>Higher impact of a failure
ANSI-SPARC Architecture
External Level
*Users’ view of the database.
*Describes that part of databasethat is relevant to a particular user.
Conceptual Level
*Community view of the database.
*Describes whatdata is stored in databaseand relationships among the
data.
Internal Level
*Physicalrepresentation of the databaseon the computer.
*Describes how the data is stored in the database.
Relational Keys
Superkey
* An attribute, or set of attributes, that uniquely identifies a tuple within
a relation.
Candidate Key
* Superkey (K) such that no proper subsetis a superkey within the
relation.
* In each tuple of R, values of K uniquely identify that tuple
(uniqueness).
* No proper subsetof K has the uniqueness property (irreducibility).
Primary Key
*Candidate key selected to identify tuples uniquely within relation.
Alternate Keys
*Candidate keys that are not selected to be primary key.
ForeignKey
*Attribute, or set of attributes, within one relation that matches
candidate key of some(possibly same) relation.
Integrity Constraints
Null
> Represents value for an attribute that is currently unknown or not
applicable for tuple.
> Deals with incomplete or exceptional data.
> Represents the absence of a value and is not the same as zero or
spaces, which are values.
Entity Integrity
>In a base relation, no attribute of a primary key can be null.
Referential Integrity
>If foreign key exists in a relation, either foreign key value mustmatch a
candidate key value of sometuple in its home relation or foreign key
value must be wholly null.
General Constraints
>Additional rules specified by users or databaseadministrators that
define or constrain someaspect of the enterprise.
Entity Type
Strong Entity Type
Entity type that is not existence-dependent on some other entity type.
Weak Entity Type
Entity type that is existence-dependent on some other entity type.

Database note for 4th semester Notes

  • 1.
    Database > Shared collectionof logically related data (and a description of this data), designed to meet the information needs of an organization. > Systemcatalog (metadata) provides description of data to enable program–data independence. > Logically related data comprises entities, attributes, and relationships of an organization’s information. Database Management System(DBMS) > A softwaresystemthatenables users to define, create, maintain, and control access to the database. > (Database) application program: a computer program that interacts with databaseby issuing an appropriaterequest (SQL statement) to the DBMS. Database Approach Data definitionlanguage (DDL). >Permits specification of data types, structures and any data constraints. >All specifications are stored in the database. Data manipulationlanguage (DML). >General enquiry facility (query language) of the data. Components of DBMS Environment Hardware Can range froma PC to a network of computers. Software DBMS, operating system, network software(if necessary) and also the application programs. Data Used by the organization and a description of this data called the schema Procedures Instructions and rules that should be applied to the design and useof the databaseand DBMS. People
  • 2.
    Roles in theDatabase Environment >Data Administrator (DA) >Database Administrator (DBA) >Database Designers (Logicaland Physical) >Application Programmers >End Users (naive and sophisticated) Advantages of DBMSs >Control of data redundancy >Data consistency >More information fromthe same amount of data >Sharing of data >Improved data integrity >Improved security >Enforcement of standards >Economy of scale >Balance conflicting requirements >Improved data accessibility and responsiveness >Increased productivity >Improved maintenancethrough data independence >Increased concurrency >Improved backup and recovery services Disadvantages of DBMSs >Complexity >Size >Cost of DBMS >Additional hardwarecosts >Cost of conversion >Performance >Higher impact of a failure ANSI-SPARC Architecture External Level *Users’ view of the database. *Describes that part of databasethat is relevant to a particular user. Conceptual Level
  • 3.
    *Community view ofthe database. *Describes whatdata is stored in databaseand relationships among the data. Internal Level *Physicalrepresentation of the databaseon the computer. *Describes how the data is stored in the database. Relational Keys Superkey * An attribute, or set of attributes, that uniquely identifies a tuple within a relation. Candidate Key * Superkey (K) such that no proper subsetis a superkey within the relation. * In each tuple of R, values of K uniquely identify that tuple (uniqueness). * No proper subsetof K has the uniqueness property (irreducibility). Primary Key *Candidate key selected to identify tuples uniquely within relation. Alternate Keys *Candidate keys that are not selected to be primary key. ForeignKey *Attribute, or set of attributes, within one relation that matches candidate key of some(possibly same) relation. Integrity Constraints Null > Represents value for an attribute that is currently unknown or not applicable for tuple. > Deals with incomplete or exceptional data. > Represents the absence of a value and is not the same as zero or spaces, which are values. Entity Integrity >In a base relation, no attribute of a primary key can be null. Referential Integrity >If foreign key exists in a relation, either foreign key value mustmatch a candidate key value of sometuple in its home relation or foreign key value must be wholly null. General Constraints >Additional rules specified by users or databaseadministrators that define or constrain someaspect of the enterprise.
  • 4.
    Entity Type Strong EntityType Entity type that is not existence-dependent on some other entity type. Weak Entity Type Entity type that is existence-dependent on some other entity type.