Bookid Bname Author Publisher Stock Price: Book Field Data Type Null Constraint
The document describes the structure of 3 database tables - Book, Customer, and Order. The Book table contains fields for book details like ID, name, author, publisher, stock, and price. The Customer table contains fields for customer details like ID, name, date of birth, email, and phone number. The Order table tracks order details by linking order time, location, salesperson ID, book ID, quantity, and customer ID as a composite primary key.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
29 views
Bookid Bname Author Publisher Stock Price: Book Field Data Type Null Constraint
The document describes the structure of 3 database tables - Book, Customer, and Order. The Book table contains fields for book details like ID, name, author, publisher, stock, and price. The Customer table contains fields for customer details like ID, name, date of birth, email, and phone number. The Order table tracks order details by linking order time, location, salesperson ID, book ID, quantity, and customer ID as a composite primary key.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Book
Field Data Type Null Constraint
BookID CHAR(10) NO PRIMARY KEY BName CHAR(100) NO Author CHAR(30) NO Publisher CHAR(30) NO Stock INT(6) NO Price DEC(5) NO
Customer
Field Data Type Null Constraint
CustID CHAR(7) NO PRIMARY KEY CustFirstName CHAR(20) NO CustLastName CHAR(20) NO Date of Birth DATE NO Email CHAR(30) YES Phone No CHAR(11) YES
Order
Field Data Type Null Constraint
OrderTime DATETIME2(100) NO COMPOSITE KEY OrderLocation CHAR(30) NO SalesmanID CHAR(30) NO COMPOSITE KEY BookID CHAR(6) NO COMPOSITE KEY Quantity INT(4) NO CustID CHAR(7) NO