0% found this document useful (0 votes)
44 views12 pages

Database Concept - Revision

Uploaded by

preet.k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views12 pages

Database Concept - Revision

Uploaded by

preet.k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

RELATIONAL DATABASE

Storing and manipulating records


DATABASE
 May be defined as a collection of
interrelated data stored together to serve
multiple application
 It is computer based record keeping system.

 It not only allows to store but also allows


us modification of data as per requirements.
DBMS
 A DBMS refers to Database Management System
 It is a software that is responsible for storing,
manipulating, maintaining and utilizing
database.
 A database along with the a DBMS is
referred to
as a database system.
 There are various DBMS software available in
the market like :-
 Oracle, MS SQL Server, MySQL, Sybase,
PostgreSQL, SQLite
PURPOSE OF DBMS
RELATIONAL DATABASE MODEL
 In relational database model data is organized
into table (i.e. rows and columns).
 These tables are also known as relations.

 A row in a table represent relationship among a


set of values.
 A column represent the field/attributes related to
relation under which information will be stored.
 For example if we want to store details of
students then : Roll, Name, Class, Section, etc.
will be the column/attributes and the collection of
all the column information will become a
Row/Record
SAMPLE TABLES
EMPLOYEE
EMPNO GENDER DEPTNO SALARY COMM
ENAME F 10 20000 1200
1 ANKITA M 20 24000
2 SUJEET F 10 28000 2000
3 VIJAYA M 30 18000 3000
4 NITIN M 30 22000 1700
5 VIKRAM

DEPARTMENT
DEPTNO DNAME LOCATION
10 HR NEW YORK
20 ACCOUNTS BRAZIL
30 SALES CANADA
40 IT INDIA
COMPONENT OF A TABLE
 Byte : group of 8 bits and is used to store a
character.
 Data Item : smallest unit of named data. It
represent one type of information
and often referred to as a field
or column information
 Record : collection of data items which
represent a complete unit of
information
 Table : collection of all Rows and
Columns.
Table
Fields

DEPTNO DNAME LOCATION


10 HR NEW YORK
20 ACCOUNTS BRAZIL
30 SALES CANADA
40 IT INDIA

Data Items (requires 5 bytes)


Records
COMMON RDBMS
 Oracle, MS SQL Server, MySQL, IBM DB2, IBM

 Out of these MySQL, PostgreSQL and SQLite are


Open source implementation.
JUST A MINUTE…
BOOKCODE BOOKNAME PUB PRICE
B001 LET US C BPB 400
B002 VISUAL EEE 350
BASIC
B003 JAVA PHI 550
B004 VC++ BPB 750

Identify the following in the above table

1) Degree of Table
2) Cardinality of Table
3) Attributes of Table
4) Tuple
5) Data types of Book Code and Price (as studied in Python)
CONCEPT OF KEYS
EMPNO ENAME GENDER DEPTNO SALARY COMM
1 ANKITA F 10 20000 1200
2 SUJEET M 20 24000
3 VIJAYA F 10 28000 2000
4 NITIN M 30 18000 3000
5 VIKRAM M 30 22000 1700

In relation each record must be unique i.e. no two


identical records are allowed in the Database. A
key attribute identifies the record and must have
unique values. There are various types of Keys:
Primary Key, Candidate Key, Alternate Key
and Foreign Key.

You might also like