0% found this document useful (0 votes)
61 views6 pages

Relational Database

The document summarizes key concepts in relational databases including: - Relations (tables) contain rows (tuples) and columns (attributes) to store connected data points. Each row contains a unique set of attribute values. - Primary keys uniquely identify each row. Foreign keys in one table match the primary key of rows in another table to link the tables. - Other concepts include domains that define the set of valid values for an attribute, and degrees which refer to the number of attributes in a table.

Uploaded by

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

Relational Database

The document summarizes key concepts in relational databases including: - Relations (tables) contain rows (tuples) and columns (attributes) to store connected data points. Each row contains a unique set of attribute values. - Primary keys uniquely identify each row. Foreign keys in one table match the primary key of rows in another table to link the tables. - Other concepts include domains that define the set of valid values for an attribute, and degrees which refer to the number of attributes in a table.

Uploaded by

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

Sector: 1

Relational databases are the foundation of the relational model, an instictive, it is the
kind of database which gives access to and stores connected data points. direct way to
view data in the tables.
Relation
Relation is used to state to a table in a relational database. And in the table, each row
epitomizes a collection of data values linked to it. A row, or record, is also referred to
as a tuple. The columns of a table are an area and are called attributes. Below, the
properties of a table are given:
● No identical rows exist; each row is distinctive.
● The row series is negligible.
● Each attribute has a name that is different.
● It has a title which is different from all of the other database tables.
● Column entries are from the same domain on the basis of their data form.
Records
Just as the subject matter of any file or entity requires to split into its constituent bits of
sector data storage, so that they can be reconstituted in their improving existing, the
connection between them also needs to be accessible. The foundations of all databases
are documents and fields.
Relational Model
The set of interrelated and interdependent table defines the data and relationships in
the relational model. Each table is a set of columns and rows, where the column
represents an object's attribute and the rows are records. A Relational Model has
provided the Basic for:
● Innumerable methods and techniques for database design
● Research on data theory/relationship/constraint
Data Structure
It is a format for data, management, organization and storage that allows efficient
access and alteration. Data is stored in relations(tables) in the relational model and is
expressed in the form of tuples(rows).
RDBMS: TABLE
A table is a slope of data elements organized in terms of rows and columns in the
Relational Database model. An instance of the Location Table is provided below.
LOCATIONS TABLE

BUILDING BUILDING ADDRESS CITY Zip BUILDING


NAME ID MANAGER
JONATHAN JT TOWER 22 JONATHTHANVILLE 55555 JT 324
TOWER 55555 ST.
NAKATOMI NK PLAZA 38 PLAZA NAKATOMI 88888 NKP 887
PLAZA 88888 AVE
MANIZAY MZ MART 12,13 MANIZAY 99999 MZ 222
MART 99999 M.ZAY
MART ST.
JACOB JB 72 JACOBCOBVILLE 22222 JBC 367
COMPLEX COMPLEX ST.
22222

A table can have duplicate rows of data, while duplicate data cannot be present in a true
relationship. The simplest type of data storage is a table

RDBMS: TUPLE
A single table entry is known as a Tuple, or a Record, or a Line. A tuple represents a
collection of related data inside a table. The LOCATIONS TABLE above, for
instance, has five tuples/records/rows. An example of a single record or tuple follows.

JONATHAN JT TOWER 22 THANVILL JT324


TOWER 55555 JONATH E 5555
ST. 5

RDBMS: ATTRIBUTE
Information can be broken down into many smaller pieces of data known as Attributes,
a table consisting of several records(row). The table of location above consists of six
characteristics: Building Name, Building ID, Address, City, Zip, Building Manager.
Cardinality
The word cardinality in Structured Query Language, it is the uniqueness of the data
values found in a certain row of a database table. The less the cardinality, the more a
column has duplicated components.
Domain
A domain is a group of appropriate values in layman terms that a column is permitted
to store.
Attribute domain
When an attribute is specified in a relationship (table), only a certain form of the value,
known as the Attribute Domain, is specified to hold.
Therefore, for each tuple, the attribute name will carry the building name. If we save
the ID of the building there, it will violate the Relational database model.

BUILDING NAME

JONATHAN TOWER

NK PLAZA 88888

MANIZAY MART

JACOB COMPLEX

Degree
A degree is a set of attributes that are allocated to a table. The Location table above
consists of six characteristics: Building Name, Building ID, Address, City, Zip,
Building Manager. The Location Table degree, then, is 6.

Database Keys
To build and define relations between tables and to define any record or data row
within a table in a specific way, keys are used. It may be an attribute or a group of
attributes, which can serve as a key for a combination.
An Employee Table/Entity;

Employee ID Name Phone Age


1 Adro 734562581 28
2 Adro 654387612 31
3 Taha 756465286 33
4 Ethan 887644491 27
5 Ayesha 522398061 28
Simple Employee Table, with fields, employee ID, name, phone and age.

Super Key
It is the Candidate Key superset. Within a table, it is described as a set of attributes
which can classify each record in a table uniquely. Since the employee ID for each row
of data is unique, it can be used to define each row quirky. Next (Employee ID, name),
the names of two employees are now the same, but their employee ID can’t be the
same, so this combination can be a key as well. Similarly, the phone number of each
employee will be unique, so that the phone is also a key.

Candidate Key
Candidate keys are recognized as the minimum gathering of fields that can identify
each record in a table in a specific way. There can be more than one key for an
applicant.
Employee ID and phone are both Employee Table candidate keys in our example.

It is not applicable to have a Candidate Key NULL or zero, and it should be unique in
its value. There can be more than one primary applicant for a table. There can be more
than one column(attributes) in a combination.

Primary Key
It is the candidate key, which is most suitable for every table to become the primary
key. The key that can classify every record in the table uniquely.
Employee ID Name Phone Age

In the above table, employee ID column is a primary key.

Composite Key
The Composite key is a key composed of two or more attributes that identify any
record in a table uniquely.
However, the attributes that together make up the Composite key are not separately or
individually a key.

Employee ID Employee ID Gender Wage

Score Table – To save scores of the employee for various assessment. Both the
attributes, employ ID together is a composite key.
Secondary or Alternative key;
Secondary keys or alternate keys are considered to be the candidate key that is not
chosen as the primary key.

Foreign Key
In one row, it is the key that is the primary key in the relevant row. Tables can be
linked by means of a foreign key.
Table 1
ID Name Title Age City Postal code

1 Alin Ms. 23 L.A 402

2 Mia Mrs. 27 L.A 404


In the above table 1, the attribute, ID is the primary key.
Table 2
Pet ID Name Gender Age DOB ID

1 Avion F 2 1/10/18 1

2 Milo F 4 9/5/16 1

3 Cruz M 6 2/9/14 1

4 Caspi F 3 7/3/17 2

5 Kery M 3 8/7/17 1
In the above table 2, Pet ID is the primary key and ID is the foreign key.

You might also like