Book Store Database tables
A Book Store would have the following tables.
1.
Publisher
2.
Books
Listing 2 – SQL Script for creating database and
tables
CREATE DATABASE BookStore
GO
USE BookStore
GO
CREATE TABLE Publisher
(
PublisherID int IDENTITY(1, 1) NOT NULL
constraint PK_PUBLISHER_ID primary key,
PublisherName nvarchar(100) NULL
)
CREATE TABLE Book
(
ISBN varchar(10) NOT NULL,
PublisherID int NOT NULL references Publisher(PublisherID),
BookTitle varchar(100),
authorName varchar(100)
)