Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

DATABASE STRUCTURE LANGUAGE GUIDE MYSQL

Rating
-
Sold
-
Pages
23
Uploaded on
24-02-2025
Written in
2024/2025

A full guide on mysql important basic concept

Institution
Course

Content preview

DATABASE CONCEPT WITH MYSQL

MySQL stands for My Structured Query Language. MySQL is a Relational Database
Management System (RDBMS) type software in which data can be stored in tabular
format & all tables are linked with other tables. Any DBMS and RDBMS software has
basic features called rows, columns and tables. Row is horizontal line of table whereas
column is vertical line of table. The row of table is also called as tuple or record. The
column of table is also called as field or attribute.

A collection of rows and columns is called as table. Table is also called as entity set or
relation. An entity is real world value that specifies single value in cell. Group of entities
is called as a Table.

Degree: A Degree is total number of columns available in table.

Cardinality: A Cardinality is total number of rows available in table.

Domain: A spool (Group) of values under any column is known as Domain

RDBMS Concepts:

DBMS refers to software for storing, maintaining and utilizing databases.

Database may be defined as a collection of interrelated data stored together to serve
multiple application. A database may contain one or more tables. Tables in database
will have relationship among them, which will help to store interrelated data. This kind
of relationship in database forms RDBMS concept.

DBMS works on major limitations and disadvantages of file processing system which
are data redundancy (Duplication of data), without inconsistency, unsharable data,
unstandardized data, unsecured and incorrect data. A DBMS is an answer to all above
problems of file processing system as it provides centralized control of data.



1

,Constraints of MySQL:

1) Primary key: A primary key is a set of attributes (columns) that can uniquely
identify tuples (rows) within the relation.

A primary key is also called as super key of a relation (table). This super key will
be useful to make relationship with other table. A relation can have primary key
to more than one columns (which is called as combined primary key) but more
than one primary key to a single relation is not possible.

Primary key is a column or combination of columns which uniquely identify a
record. Only one candidate key can be primary key.

2) Unique key: A unique key ensures that no two rows have the same value in
specified column.

Difference between unique and primary key: Though both ensure unique value
for each row in a column but unique allows null values whereas primary key does
not. That is primary key is combination of two constraints unique and not null.

There can exist multiple columns with multiple unique constraints in a table but
there can exist only one column or one combination with primary key constraint.

Unique can never be super key whereas primary key can.

3) Not null key: The not null constraint will not allow null values in specific column.
4) Candidate key: All attributes combinations inside a relation that can serve as a
primary ley is called as a candidate key as they are candidates for primary key.

Candidate key is one which is capable of becoming primary key i.e. a field or
attribute that has unique value for each row in a relation whereas primary key
is designation attribute or group of attributes whose value can uniquely identify
the tuples in relation.

A candidate key can be any column or combination of columns that can qualify
as unique key in table. There can be multiple candidate keys in table.
2

, 5) Alternate key: A candidate key which is not primary key is called as alternate
key.
6) Foreign key: A non – key attribute whose values are derived from the primary
key attribute of other table is known as foreign key of current table.

Foreign key is used to represent a relationship between two tables. Foreign key
is a non – key attribute or group of non – key attributes whose values are derived
from primary key attribute (key attribute) of other table.

A table which has key attribute is called as primary key table or master table or
parent table. A table which has non – key attribute is called as secondary table
or detailed table or child table. A table which does not have key attribute is
called as weak table.

7) Default constraint: it is used to keep default value in domain to avoid null value
to be inserted.
8) Check constraint: It allows to enter only limited values within specific range that
can be inserted in table.
View: A view is temporary shortcut of any table data. View doesn’t contain any
structure of table. Table structure contains information like table columns along with
datatypes and constraints. If view will be deleted then original table will not be
affected but if table will be deleted then views do not work.

Operations on tables:

1) Select operation: It selects the specific rows from entire table. (like where
condition)




3

Written for

Institution
Secondary school
Course
School year
1

Document information

Uploaded on
February 24, 2025
Number of pages
23
Written in
2024/2025
Type
Class notes
Professor(s)
Simon sir
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
priyanshugupta2

Get to know the seller

Seller avatar
priyanshugupta2
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions