我在Mysql上的问题如何用单个电影插入多首歌曲,如果我点击那部电影只会显示歌曲.. [英] My Question On Mysql How To Insert Multiple Songs With Single Movie ,,If I Click On That Movie Only That Songs Will Display ..

查看:103
本文介绍了我在Mysql上的问题如何用单个电影插入多首歌曲,如果我点击那部电影只会显示歌曲..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题关于mysql如何用单个电影插入多首歌曲,如果我点击那部电影只会显示歌曲..

推荐答案

这是基本的参考数据库构造 - 我假设你很新。



首先,把电影放在他们自己的桌子里(没有歌曲) ),并在表格中有一个IDENTITY字段(如果你不知道它是什么,请查看它!)。您可能有其他数据字段,但主要的重要概念是电影独立于音乐存储,并且每个都有独特的参考。



其次,创建一个你的音乐表。它必须至少有两个字段。当然,一个领域是音乐。第二个字段是一个参考值,等于相关电影的唯一IDENTITY值。



现在,当您选择一部电影时,您可以请求它的身份。凭借此身份,您可以索取其独特的音乐列表。





This is basic referential database construction - I assume you're very new at this.

First, put the movies in their own table (without the songs), and have an IDENTITY field in the table (look that up if you don't know what it is!). You may have other data fields, but the main important concept is that the movies are stored independently of the music and they each have a unique reference.

Second, create a table for your music. It must have at least two fields. One field, of course, is the music. The second field is a reference value equal to the unique IDENTITY value for the related movie.

Now, when you pick a movie, you can request it's identity. With the identity, you can request its unique music list.


这篇关于我在Mysql上的问题如何用单个电影插入多首歌曲,如果我点击那部电影只会显示歌曲..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆