Hi everyone!
I have a university project to design a database system consisting of a bunch of entity sets and relationships. I have a basic idea for a system which would benefit me in my electronics hobby, basically an application to help me keep track of what components I have where, how many, and how many of them are needed for a given project.
The requirements for the system is for all relation schemas to be in BCNF, and I basically know what this means. However, in choosing the schemas for my relations, I become unsure as to how functional dependencies are actually determined or "how they come about".
Take for example the case where I have an entity set Project(projectid, projectname, projectdescription). My idea is to have pID as the key for the relation and allow several projects with the same names (and theoretically even the same descriptions, down to the very last case-sensitive letter). Thus I would imagine that there would be a FD like this: pID -> pName pDesc. However, I start to wonder if simply using pID is enough of a key, or can there be another functional dependency between e.g. pDesc -> pName? Because it's very unlikely that I'll assign the same description to two projects, the description
could be used to identify a given project, though that's not the idea. My idea is to open my software application and display a list of all projects in the database (including their ID numbers) and select one that I want to work on. Fetch the ID number of the tuple and then continue work.
So basically what I'm asking is how do I know when functional dependencies appear? Do I choose them myself at design time e.g. by specifying that pID is the only property that can be guaranteed to be unique? Or are FDs determined all the time depending on what data is in the relation? If I have for example two tuples in the Project relation, (1, "Project name", "Description 1") and (2, "Project name", "Description 2") then judging from this there would be actually three FDs, right? pID -> pName, pDesc -> pName, pID pDesc -> pName. Most literature that I have read (books, webpages etc.) seem to derive functional dependencies from the actual tuples in a relation, rather than from the purpose and intended operation of the schema or relation as such.
I was hopeful that someone could set the records straight on this one. I'm so confused that I don't know what's left or right anymore.
Cheers
Mankku