WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Db Concepts1
1. Database concepts
Database
Container for data
Repository for storing organized
information in the form of files
MG/DB CONCEPTS/CL12
2. DATABASE MANAGEMENT SYSTEM
software package that handles the
database
interface between the user and the
database
organizes data as a data model
- infrastructure of data organization
MG/DB CONCEPTS/CL12
3. Relational Data Model
data is organized in the form of rows
and columns as in a table
Table - referred to as a relation
Rows - referred to as tuples / records
Columns - referred to as fields /
attributes
MG/DB CONCEPTS/CL12
4. Primary key
A field or a group of fields that is the
unique identifier for a table
The primary key uniquely identifies
each row of the table
It contains unique value for each
record
MG/DB CONCEPTS/CL12
5. Database is a collection of related files
Tables consist of organized related
information
Each table is a collection of records
Each record contains info about a specific
entity
The info in each record is contained in fields
A field is the basic unit of a db
A field can contain text, numbers, dates or
even photographs MG/DB CONCEPTS/CL12
6. A data base system has 2 parts
The back end
The front end
Front-end interfaces with the user
Eg> Visual Basic
The back-end holds data
Eg> IBM DB2, MS SQL Server, Oracle,
Sybase, Informix, MS Access, Ingress etc
MG/DB CONCEPTS/CL12
7. Structured Query Language(SQL)
Enables you to create, operate and control
relational databases
Used for defining and manipulating
relational databases
Non-procedural language
Format free language (Tabs, carriage return
and spaces can be included anywhere in the
statement)
Case insignificant
MG/DB CONCEPTS/CL12
8. The language consists of the following components:
Data definition component/language:
Consists of commands that define and destroy
objects like relations/tables, indexes, views etc
Eg> Create, alter, drop etc
Data manipulation component/language:
Consists of retrieval, manipulation and update
directives
Eg> select, insert, delete, update etc
MG/DB CONCEPTS/CL12
9. Data control component:
Used for defining security and access control of the
database.
Allows the user to grant access privileges.
Eg> grant : to grant privileges to other users
revoke: to revoke privileges
The commands are also known as Transaction control
commands
Transaction control language commands : Manage changes
made by DML commands.
Commit : to make the changes permanent
MG/DB CONCEPTS/CL12
Rollback: to undo all changes.
10. SQL statements can be executed directly i.e interactively
or as part of an application program
Interactive SQL :
Used to operate directly on a db to produce the required
output.
Used by non-programmers
MG/DB CONCEPTS/CL12
11. Embedded SQL :
SQL statements embedded within the program
source code that is written in some programming
language / front end tool
Used by programmers
MG/DB CONCEPTS/CL12
12. Terminology
Cardinality : The number of tuples is called the
cardinality
Degree : The number of attributes is called the degree
Domain
a pool of values from which specific attributes of
specific relations draw their values.
just a data type;
provides a set of values from which various
attributes in various relations take their actual values.
MG/DB CONCEPTS/CL12
13. Primary key :
a column or a group of columns in a table that
uniquely identifies records in the table.
unique identifier for the table.
contains unique value for each record.
Candidate key :
Attributes in a relation that can serve as primary
key are candidate keys as they are candidates for
the primary key position.
MG/DB CONCEPTS/CL12
14. Alternate key :
A candidate key that is not the primary key is
called an alternate key.
Foreign key :
Column or a group of columns in a table that is
used to reference a primary key in another
table.
MG/DB CONCEPTS/CL12