LIBRARY ISBN (Unique Key) Shelf Table Attributes 1. Shelf

LIBRARY
DATABASE

Books
Table Attributes

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

1.     
Book
Category (Fiction, Romance) –drop down list

2.     
Book
ID (Primary Key)

3.     
Book
Tittle

4.     
Shelf
No.

5.     
ISBN
(Unique Key)

Shelf
Table Attributes

1.     
Shelf
No. (Primary Key)

2.     
Shelf
Name

 

Library
Database traits

1.     
Book
Category (varchar 30)

2.     
Book
ID (varchar 10)

3.     
Book
Tittle (text 50)

4.     
Shelf
No (int 10)

5.     
ISBN
(int 20)

 

Key
words = Book ID

1.     
Shelf
No. (varchar 10)

2.     
Shelf
Name (text)

 

CUSTOMER SERVICE DATABASE

 

Customer
Table Attributes

1.     
Customer
ID (Primary key)

2.     
Customer
Name

3.     
Customer
Tel

4.     
Customer
Address

5.     
Type
of Service

6.     
Service
Code (Foreign Key)

 

Service
Table Attributes

1.     
Service
Code (Primary Key)

2.     
Service
Name

3.     
Service
Time Span

 

Customer
Service Database traits

1.     
Customer
ID  (varchar 30)

2.     
Customer
Name (text 50)

3.     
Customer
Tel  (varchar 20)

4.     
Customer
Address (varchar 30)

5.     
Type
of Service (text)

6.     
Service
Time Span (varchar 10)

 

Key
words = Customer ID

 

1.     
 Service code (varchar 20)

2.     
Service
Name (text)

3.     
Service
Time Span (varchar)

 

Attributes – these are the
characteristics of a table in a database. They define a table.

According
to Mike Chapple on a web page published On 28th December 2017, he
described Attributes as columns in a table which contain describing
characteristics of the rows. He further stated that an attribute is a column
name in a table

 

 

Primary Key- This is a
special key that uniquely identifies an attribute.

Hans
Petter Halvorsen in his book Introduction
to Database Systems pg 6 , he has explained a Primary key as a special case
of unique keys. He differentiated Primary keys and Unique keys by stating that
the former the constraint NOT NULL enforced and the latter is not automatically
enforced

 

Foreign Key- this is a
primary key of another table in a table.

According
to http://www.shumon.me/decode/wp-content/uploads/2015/05/db_keys.pdf  the author has explained that a Foreign key
is the Primary key of another table. The foreign key is used to enhance
referential integrity of data.  

 

 

 

 

References

1.      Mike
Chapple 28th Dec 2017 https://www.thoughtco.com/attribute-definition-1019244

2.     
Hans
Petter Halvorsen, 1st Nov 2016, Introduction
to Database Systems , pg 6

 

3.     
http://www.shumon.me/decode/wp-content/uploads/2015/05/db_keys.pdf  pg 2 explanation of Foreign Key