You are on page 1of 3

Database is organized collection of data stored in an electronic format.

Dbms is a system software for creating and managing databases.

Systematic way to create manage and retrieve data

Data base architecture- 1.File Server

2.Client Server

FileServerfiles are located in a local system/server.

If we send a document to our friend and make a change later the changes would not be reflected in
the file that is present in the friend’s system.

So we can say that the file is local to us.

Client SreverIf there are n number of clients say at irctc website and are requesting for a same
data.So the database server would process there data and at the same time and give them their
desired outputs about the data simultaneously without causing any problem.

SQL-SQL stands for Structured Query Language.

1.Communication with the database.

2.Manipulating and accessing database.


SQL-

Data query language-(SELECT)

Data definition language (Create Table, AlterTable , Drop Table)

Data manipulation language(INSERT, UPDATE and DELETE)

Data control language(Grant ,Revoke)

After installation we should go to the MySQL Client bash or MYSQL server management Studio and
run our code happily.

|||| A table is an object with rows and columns.

In SQL rows are called records and columns are called fields.

|||||A field provide specific information about he data in the table .

||||| A record is each individual entry in the table.

CREATE ,USE AND DROP A DATABASE......................... tick

DATA TYPES IN SQL................................

Data types define what type of data a column can hold.

Different datatypes in sql----

NUMERICAL DATA TYPES-

bigint---

int –

smallint-

tinyint—

decimal(s,d)-s for size of entire decimal number and d is for size of digits after decimal point.
CHARACTER DATA TYPES-

Char(s)---if s =30 then we cannot have more than 30 characters.If

Varchar(s)---

Text---String

DATE AND TIME Datatypes

date- YYYY-MM-DD

time- HH:MM:SS

Year-YYYY

CONSTRAINTS –To limit the type of data that can go into the table

Not Null—ensures that a column cannot have a null value

Unique--- ensures that all the values in a column are different

Default-Used to provide default value for a column

Primary Key-uniquely identifies each record in a table.(Not Null+Unique)

A table cannot have more than ne primary key.

Creating table.................

You might also like