Database Basics
Database Basics
UNIT – 7
Database Development
Database Servers – Database servers are dedicated computers that hold the
actual databases and run only the DBMS and related software. Databases on the
database servers are accessed through command line or graphic user interface
tools referred to as Frontends; database servers are referred to as Back-
ends. Such type of data access is referred to as Client-server model.
For example,
Database :- Employee
Emp_C Emp_Na Emp_Add Emp_Design Emp_Conta Emp_Sal
ode me ress ation ctNo ary
E001 ABC Meerut Manager 9876543210 Rs.
50,000
Item : Employee
Field : Emp_Code , Emp_Name , Emp_Address , Emp_Designation ,
Emp_ContactNo , Emp_Salary
Record :
E001 ABC Meerut Manager 9876543210 Rs. 50,000
Value : E001 , ABC , Meerut , Manager , 9876543210 , Rs. 50,000
5. Key Field :- Key Field is a value in a Field that uniquely identifies the record. Eg.
E001 which is unique to every employee.
Important Question :- How data is organized in a RDBMS ?
Ans :- In RDBMS, data is organized in the form of inter linked tables.
SESSION 2:- DATA STORAGE
DATA TYPES :- Datatypes are used to identify the type of data we are going to
store in the database.
Categories of data types:- Data types can be broadly classified into five
categories:-
1. Numeric Types
2. Alphanumeric Types
3. Binary Types
4. Date Time
5. Other variable Types
NUMERIC TYPES:- They are used for describing numeric values like mobile
number, age, etc.
BINARY TYPES:-
Binary types are used for storing data in binary formats. It can be used for storing
photos, music files or (in general file of any format) etc.
The list of different datatypes available in Binary types are :-
1. LongVarBinary (Image)
2. Binary (Binary (fix) )
3. VarBinary (Binary)
DATE TIME:-
Date time data types are used for describing date and time values for the field used
in the table of a database. It can be used for storing information such as date of
birth, date of admission etc.
The list of different data types available in Date Time type are :-
1. Date (Stores month, day and year information)
2. Time (Store hour, minute and second information)
3. Timestamp (Stores date and time information)
PRIMARY KEY:- A primary key is a unique value that identifies a row in a table.
These keys are also indexed in the database, making it faster for the database to
search a record.
FOREIGN KEY:- The foreign key identifies a column or set of columns in one
(referencing) table that refers to a column or set of columns in another
(referenced) table.
Note:- The “one” side of a relation is always the parent, and provides the
PK(Primary Key) Attributes to be copied. The “many” side of a relation is always the
child, into which the FK(Foreign Key) attributes are copied.