Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6970231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:41:00+00:00 2026-05-27T16:41:00+00:00

Ok Here is the situation. A university has more than one faculty. Each faculty

  • 0

Ok Here is the situation.

  • A university has more than one faculty.
  • Each faculty has more than one department.

I do not want any duplicated faculty or department. So I defined the three tables below.

CREATE TABLE university (
    id INT PRIMARY KEY AUTO_INCREMENT,
    long_name VARCHAR(255) UNIQUE NOT NULL,
    name VARCHAR(255) NOT NULL,
    country VARCHAR(45) NOT NULL,
) Engine=InnoDB;

CREATE TABLE school_faculty (
    id INT UNIQUE NOT NULL AUTO_INCREMENT,
    name VARCHAR(45),
    universityID INT,
    PRIMARY KEY (name, universityID),
    FOREIGN KEY (universityID) REFERENCES university (id)
) Engine=InnoDB;

CREATE TABLE department (
    id INT PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(45) NOT NULL,
    schoolfacultyID INT NOT NULL,
    FOREIGN KEY (schoolfacultyID)
        REFERENCES school_faculty (id)
) Engine=InnoDB;

Please tell me if it’s wrong or if there is a better way. I am struggling with it and kinda helpless.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:41:01+00:00Added an answer on May 27, 2026 at 4:41 pm

    Looks ok.

    You could normalize things a little more by having a table of just falculty/department names and convert your department/falculty tables to be (universityID, facultyNameID). But that level of normalization is probably overkill. While it’s highly likely there’s more that one Physics or Basket Weaving faculty in all the universities, the few extra bytes you’d use by keeping multiple copies of the word “Physics” in the table is not going to break the bank.

    The same applies to the departments, and the same “probably not a problem” as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation here there are two models User,Posts Now I want to
I have an interesting situation here this time. This more of a conceptual question,
I may have a unique situation here. I want gVim (gui version, in Linux)
I am dealing with a puzzling situation here,and need any help I can get
My situation here is that I need to send my program to my university's
Having trouble finding a solution for my situation here. Sorry if this has been
I've got a situation here and I'm not sure what the best way of
Okay, here a situation: 1) I have a Panel called panel1 that consist one
A simple situation here, If I got three threads, and one for window application,
Very odd situation here. For some reason I can't call 'Where', or any other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.