Cpe El1 Table Restriction
Cpe El1 Table Restriction
Abstract
Keys are fundamental elements of the relational database because they establish a
relationship between a pair of tables and ensure each record in a table is uniquely identified. Keys
have a more particular significance than establishing relationships; they also help with Referential
Integrity and they are a major component of table-level integrity. Tables store huge chunks of data
in them which usually extend to thousands of records all of which are unsorted and disorganized.
Fetching a particular data from those numerous records can be difficult at times or sometimes
impossible.
I. INTRODUCTION
Data constraints: Besides the cell name, cell length and cell data type there are other
parameters i.e. other data constrains that can be passed to the DBA at check creation time. The
constraints can either be placed at column level or at the table level.
• Column Level Constraints: If the constraints are defined along with the column
definition, it is called a column level constraint.
• Table Level Constraints: If the data constraint attached to a specify cell in a table
reference the contents of another cell in the table then the user will have to use table level
constraints.
II. IMPLEMENTATION
In this chapter will discuss about the laboratory exercise procedure. The procedures of this
laboratory experiment will guide about the data that I came up.
This chapter is about the presentation of the output that I gathered based on the laboratory
exercise given.
a. Supplier_tbl
b. book_rental_tbl
c. book_rental_info_tbl
IV. CONCLUSIONS
This laboratory exercise guides me to learn about the SQL Primary Key and SQL Foreign
Key. I also learned at how SQL Create Table Primary Key and SQL Create table Foreign Key.
CPE 303B – LOGIC CIRCUITS AND SWITCHING THEORY Page 3 of 4
by: Engr. Jeremiah Dearborn F. Gangoso, CpE
Through the process, I understand that Primary key is a field in a table which distinguishes
each line or record in a database table while Foreign Key is used to connect two tables
together.
In conclusion, primary and foreign key are the restrictions that I can use on my tables in
the Database. After implementing the foreign and primary key and familiarize about the
data validation, I could use those things I learned in the future.
References
https://www.w3schools.com/sql/sql_primarykey.asp
https://data-flair.training/blogs/primary-and-foreign-key-in-sql/
http://www.differencebetween.net/technology/difference-between-primary-key-and-
foreign-key/