Question
Relational Database Management system
Product (code-prod, name,prix)
Stock (code-prod, code -dep, quantity)
Depot (id-dep-adr)
Label the primary and foreign keys
Populate the table with random values but follow the primary and foreign key constraints.
Product (code-prod, name,prix)
Stock (code-prod, code -dep, quantity)
Depot (id-dep-adr)
Label the primary and foreign keys
Populate the table with random values but follow the primary and foreign key constraints.
Answers
There are no human answers yet.
Answered by
GPT 3.5
Product table:
- Primary key: code-prod
| code-prod | name | prix |
|-----------|--------|------|
| 1 | Apple | 2.5 |
| 2 | Banana | 1.5 |
| 3 | Orange | 3.0 |
Stock table:
- Primary keys: code-prod, code-dep
- Foreign keys: code-prod (references Product.code-prod), code-dep (references Depot.id-dep-adr)
| code-prod | code-dep | quantity |
|-----------|----------|----------|
| 1 | 1 | 100 |
| 2 | 2 | 50 |
| 3 | 1 | 75 |
Depot table:
- Primary key: id-dep-adr
| id-dep-adr |
|-----------|
| 1 |
| 2 |
- Primary key: code-prod
| code-prod | name | prix |
|-----------|--------|------|
| 1 | Apple | 2.5 |
| 2 | Banana | 1.5 |
| 3 | Orange | 3.0 |
Stock table:
- Primary keys: code-prod, code-dep
- Foreign keys: code-prod (references Product.code-prod), code-dep (references Depot.id-dep-adr)
| code-prod | code-dep | quantity |
|-----------|----------|----------|
| 1 | 1 | 100 |
| 2 | 2 | 50 |
| 3 | 1 | 75 |
Depot table:
- Primary key: id-dep-adr
| id-dep-adr |
|-----------|
| 1 |
| 2 |
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.