SQL I
SQL I
SQL I
What is data?
Data can be defined as a representation of facts, concepts or instructions in a
formalized manner which should be suitable for communication,
interpretation, or processing by human or electronic machine.
What is Information?
Information is organised or classified data which has some meaningful
values for the receiver.
Information is the processed data on which decisions and actions are based.
For the decision to be meaningful, the processed data must qualify for the
following characteristics:
their usefulness and add values for particular purpose. Data processing consists of basic steps
input, processing and output. These three steps constitute the data processing cycle.
Input - In this step the input data is prepared in some convenient form
for processing. The form will depend on the processing machine. For
example, when electronic computers are used, the input data could be
recorded on any one of several types of input medium, such as
magnetic disks, tapes and so on.
Database
A database is a data structure that stores organized information. Most
databases contain multiple tables, which may each include several different
fields. For example, a company database may include tables for products,
employees, and financial records. Each of these tables would have different
Nearly all e-commerce sites uses databases to store product inventory and
"back end" to the website. By storing website data in a database, the data can
simple rows and columns, like a spreadsheet. (See also "flat file database").
Relational databases can also run queries that involve multiple databases.
While early databases could only store text or numeric data, modern
databases also let users store other data types such as sound clips, pictures,
and videos.
What is DBMS?
DBMS has several components. Some of the major components are external
interface, database language engine, query optimizer, database
engine,storage engine, DBMS management component, etc..
What is RDBMS?
The below table lists downs some of the major differences between DBMS
and RDBMS.
Used for applications using small Used for complex and large amount of
4
amount of data. data.
Data Redundancy is common in this Keys and indexes are used in the
5
model tables to avoid redundancy.
Concepts
Tables − In relational data model, relations are saved in the format of
Tables. This format stores the relation among entities. A table has rows and
columns, where rows represents records and columns represent the
attributes.
Tuple − A single row of a table, which contains a single record for that
relation is called a tuple.
Relation key − Each row has one or more attributes, known as relation key,
which can identify the row in the relation (table) uniquely.
Constraints
Every relation has some conditions that must hold for it to be a valid
relation. These conditions are called Relational Integrity Constraints.
There are three main integrity constraints −
Key constraints
Domain constraints
Referential integrity constraints
Key Constraints
There must be at least one minimal subset of attributes in the relation, which
can identify a tuple uniquely. This minimal subset of attributes is
called key for that relation. If there are more than one such minimal subsets,
these are called candidate keys.
Domain Constraints
Attributes have specific values in real-world scenario. For example, age can
only be a positive integer. The same constraints have been tried to employ
on the attributes of a relation. Every attribute is bound to have a specific
range of values. For example, age cannot be less than zero and telephone
numbers cannot contain a digit outside 0-9.
Database Security
Database security covers and enforces security on all aspects and components
of databases. This includes:
1. Privilege abuse: When database users are provided with privileges that
exceeds their day-to-day job requirement, these privileges may be abused
intentionally or unintentionally.
Having seen how privilege can be abused intentionally, let us see how
privilege can be abused unintentionally. A company is providing a “work
from home” option to its employees and the employee takes a backup of
sensitive data to work on from his home. This not only violates the security
policies of the organization, but also may result in data security breach if the
system at home is compromised.